Class UntaggedWay
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.Test
-
- org.openstreetmap.josm.data.validation.tests.UntaggedWay
-
- All Implemented Interfaces:
OsmPrimitiveVisitor
public class UntaggedWay extends Test
Checks for untagged ways
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.data.validation.Test
Test.TagTest
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
COMMENTED_WAY
Untagged, but commented way errorprotected static int
EMPTY_WAY
Empty way error(package private) static Set<String>
NAMED_WAYS
Ways that must have a nameprotected static int
ONE_NODE_WAY
One node way errorprotected static int
UNNAMED_JUNCTION
Unnamed junction errorprotected static int
UNNAMED_WAY
Unnamed way errorprotected static int
UNTAGGED_WAY
Untagged way errorprivate Set<Way>
waysUsedInRelations
(package private) static Set<String>
WHITELIST
Whitelist of roles allowed to reference an untagged way-
Fields inherited from class org.openstreetmap.josm.data.validation.Test
checkBeforeUpload, checkEnabled, description, enabled, errors, IN_DOWNLOADED_AREA, IN_DOWNLOADED_AREA_STRICT, isBeforeUpload, name, partialSelection, progressMonitor, stopwatch, testBeforeUpload
-
-
Constructor Summary
Constructors Constructor Description UntaggedWay()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endTest()
Notification of the end of the test.Command
fixError(TestError testError)
Fixes the error with the appropriate commandboolean
isFixable(TestError testError)
Returns true if the given error can be fixed automaticallyboolean
isPrimitiveUsable(OsmPrimitive p)
Determines if the primitive is usable for tests.void
startTest(ProgressMonitor monitor)
Start the test using a given progress monitorvoid
visit(Way w)
Visiting call for lines.-
Methods inherited from class org.openstreetmap.josm.data.validation.Test
addGui, clear, deletePrimitivesIfNeeded, getErrors, getName, getSource, initialize, isBuilding, isCanceled, isResidentialArea, ok, setBeforeUpload, setPartialSelection, setShowElements, testBeforeUpload, visit, visit, visit
-
-
-
-
Field Detail
-
EMPTY_WAY
protected static final int EMPTY_WAY
Empty way error- See Also:
- Constant Field Values
-
UNTAGGED_WAY
protected static final int UNTAGGED_WAY
Untagged way error- See Also:
- Constant Field Values
-
UNNAMED_WAY
protected static final int UNNAMED_WAY
Unnamed way error- See Also:
- Constant Field Values
-
ONE_NODE_WAY
protected static final int ONE_NODE_WAY
One node way error- See Also:
- Constant Field Values
-
UNNAMED_JUNCTION
protected static final int UNNAMED_JUNCTION
Unnamed junction error- See Also:
- Constant Field Values
-
COMMENTED_WAY
protected static final int COMMENTED_WAY
Untagged, but commented way error- See Also:
- Constant Field Values
-
waysUsedInRelations
private Set<Way> waysUsedInRelations
-
NAMED_WAYS
static final Set<String> NAMED_WAYS
Ways that must have a name
-
-
Constructor Detail
-
UntaggedWay
public UntaggedWay()
Constructor
-
-
Method Detail
-
visit
public void visit(Way w)
Description copied from interface:OsmPrimitiveVisitor
Visiting call for lines.- Specified by:
visit
in interfaceOsmPrimitiveVisitor
- Overrides:
visit
in classTest
- Parameters:
w
- The way to inspect.
-
startTest
public void startTest(ProgressMonitor monitor)
Description copied from class:Test
Start the test using a given progress monitor
-
endTest
public void endTest()
Description copied from class:Test
Notification of the end of the test. The tester may perform additional actions and destroy the used structures.If you override this method, don't forget to cleanup
progressMonitor
(most overrides callsuper.endTest()
to do this).
-
isFixable
public boolean isFixable(TestError testError)
Description copied from class:Test
Returns true if the given error can be fixed automatically
-
fixError
public Command fixError(TestError testError)
Description copied from class:Test
Fixes the error with the appropriate command
-
isPrimitiveUsable
public boolean isPrimitiveUsable(OsmPrimitive p)
Description copied from class:Test
Determines if the primitive is usable for tests.- Overrides:
isPrimitiveUsable
in classTest
- Parameters:
p
- The primitive- Returns:
true
if the primitive can be tested,false
otherwise
-
-