org.openstreetmap.josm.data.validation.tests
Class UntaggedWay

java.lang.Object
  extended by org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
      extended by org.openstreetmap.josm.data.validation.Test
          extended by org.openstreetmap.josm.data.validation.tests.UntaggedWay
All Implemented Interfaces:
Visitor

public class UntaggedWay
extends Test

Checks for untagged ways


Field Summary
protected static int COMMENTED_WAY
          Untagged, but commented way error
protected static int EMPTY_WAY
          Empty way error
static java.util.Set<java.lang.String> NAMED_WAYS
          Ways that must have a name
protected static int ONE_NODE_WAY
          One node way error
protected static int UNNAMED_JUNCTION
          Unnamed junction error
protected static int UNNAMED_WAY
          Unnamed way error
protected static int UNTAGGED_WAY
          Untagged way error
private  java.util.Set<Way> waysUsedInRelations
           
static java.util.Set<java.lang.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, isBeforeUpload, name, partialSelection, progressMonitor, testBeforeUpload
 
Constructor Summary
UntaggedWay()
          Constructor
 
Method Summary
 void endTest()
          Notification of the end of the test.
 Command fixError(TestError testError)
          Fixes the error with the appropriate command
 boolean isFixable(TestError testError)
          Returns true if the given error can be fixed automatically
 void startTest(ProgressMonitor monitor)
          Start the test using a given progress monitor
 void visit(Way w)
          Visiting call for lines.
 
Methods inherited from class org.openstreetmap.josm.data.validation.Test
addGui, deletePrimitivesIfNeeded, getErrors, getName, initialize, isBuilding, isCanceled, ok, setBeforeUpload, setPartialSelection, testBeforeUpload, visit, visit, visit
 
Methods inherited from class org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 java.util.Set<Way> waysUsedInRelations

NAMED_WAYS

public static final java.util.Set<java.lang.String> NAMED_WAYS
Ways that must have a name


WHITELIST

public static final java.util.Set<java.lang.String> WHITELIST
Whitelist of roles allowed to reference an untagged way

Constructor Detail

UntaggedWay

public UntaggedWay()
Constructor

Method Detail

visit

public void visit(Way w)
Description copied from interface: Visitor
Visiting call for lines.

Specified by:
visit in interface Visitor
Overrides:
visit in class Test
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

Overrides:
startTest in class Test
Parameters:
monitor - the 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 Test.progressMonitor (most overrides call super.endTest() to do this).

Overrides:
endTest in class Test

isFixable

public boolean isFixable(TestError testError)
Description copied from class: Test
Returns true if the given error can be fixed automatically

Overrides:
isFixable in class Test
Parameters:
testError - The error to check if can be fixed
Returns:
true if the error can be fixed

fixError

public Command fixError(TestError testError)
Description copied from class: Test
Fixes the error with the appropriate command

Overrides:
fixError in class Test
Returns:
The command to fix the error


JOSM