public class InternetTags extends Test
Test.TagTest| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String[] |
EMAIL_KEYS
List of keys subject to email validation.
|
static int |
INVALID_EMAIL
Error code for an invalid e-mail
|
static int |
INVALID_URL
Error code for an invalid URL
|
private static java.lang.String[] |
URL_KEYS
List of keys subject to URL validation.
|
checkBeforeUpload, checkEnabled, description, enabled, errors, IN_DOWNLOADED_AREA, IN_DOWNLOADED_AREA_STRICT, isBeforeUpload, name, partialSelection, progressMonitor, stopwatch, testBeforeUpload| Constructor and Description |
|---|
InternetTags()
Constructs a new
InternetTags test. |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
doTest(OsmPrimitive p,
java.lang.String k,
java.lang.String[] keys,
AbstractValidator validator,
int code)
Potentially validates a given primitive key against a given validator.
|
private java.util.List<TestError> |
doValidateTag(OsmPrimitive p,
java.lang.String k,
java.lang.String v,
AbstractValidator validator,
int code)
Validates a given primitive tag against a given validator.
|
private void |
test(OsmPrimitive p) |
java.util.List<TestError> |
validateTag(OsmPrimitive p,
java.lang.String k,
AbstractValidator validator,
int code)
Validates a given primitive tag against a given validator.
|
void |
visit(Node n)
Visiting call for points.
|
void |
visit(Relation r)
Visiting call for relations.
|
void |
visit(Way w)
Visiting call for lines.
|
addGui, clear, deletePrimitivesIfNeeded, endTest, fixError, getErrors, getName, initialize, isBuilding, isCanceled, isFixable, isPrimitiveUsable, isResidentialArea, ok, setBeforeUpload, setPartialSelection, setShowElements, startTest, testBeforeUpload, visitpublic static final int INVALID_URL
public static final int INVALID_EMAIL
private static final java.lang.String[] URL_KEYS
private static final java.lang.String[] EMAIL_KEYS
public InternetTags()
InternetTags test.private boolean doTest(OsmPrimitive p, java.lang.String k, java.lang.String[] keys, AbstractValidator validator, int code)
p - The OSM primitive to testk - The key to validatekeys - The list of keys to check. If k is not inside this collection, do nothingvalidator - The validator to run if k is inside keyscode - The error code to set if the validation failstrue if the validation fails. In this case, a new error has been created.public java.util.List<TestError> validateTag(OsmPrimitive p, java.lang.String k, AbstractValidator validator, int code)
p - The OSM primitive to testk - The key to validatevalidator - The validator to runcode - The error code to set if the validation failsnull otherwiseprivate java.util.List<TestError> doValidateTag(OsmPrimitive p, java.lang.String k, java.lang.String v, AbstractValidator validator, int code)
p - The OSM primitive to testk - The key to validatev - The value to validate. May be null to use p.get(k)validator - The validator to runcode - The error code to set if the validation failsnull otherwiseprivate void test(OsmPrimitive p)
public void visit(Node n)
OsmPrimitiveVisitorvisit in interface OsmPrimitiveVisitorvisit in class Testn - The node to inspect.public void visit(Way w)
OsmPrimitiveVisitorvisit in interface OsmPrimitiveVisitorvisit in class Testw - The way to inspect.public void visit(Relation r)
OsmPrimitiveVisitorvisit in interface OsmPrimitiveVisitorvisit in class Testr - The relation to inspect.