Class TurnrestrictionTest
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.Test
-
- org.openstreetmap.josm.data.validation.tests.TurnrestrictionTest
-
- All Implemented Interfaces:
OsmPrimitiveVisitor
public class TurnrestrictionTest extends Test
Checks if turn restrictions are valid- Since:
- 3669
-
-
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 intFROM_CLOSED_WAYprotected static intFROM_EQUALS_TOprotected static intFROM_VIA_NODEprotected static intFROM_VIA_WAYprotected static intMIX_VIAprotected static intMORE_FROMprotected static intMORE_TOprotected static intMORE_VIAprotected static intNO_FROMprotected static intNO_TOprotected static intNO_VIAprotected static intSUPERFLUOUSprivate static java.util.List<java.lang.String>SUPPORTED_RESTRICTIONSprotected static intTO_CLOSED_WAYprotected static intTO_VIA_NODEprotected static intTO_VIA_WAYprotected static intUNCONNECTED_VIAprotected static intUNEXPECTED_ROLEprotected static intUNEXPECTED_TYPEprotected static intUNKNOWN_RESTRICTION-
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 TurnrestrictionTest()Constructs a newTurnrestrictionTest.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckIfConnected(Relation r, Way previous, Way current, java.lang.String msg, int code)private static booleanhasSupportedRestrictionTag(Relation r)private static booleanisFullOneway(Way w)voidvisit(Relation r)Visiting call for relations.-
Methods inherited from class org.openstreetmap.josm.data.validation.Test
addGui, clear, deletePrimitivesIfNeeded, endTest, fixError, getErrors, getName, getSource, initialize, isBuilding, isCanceled, isFixable, isPrimitiveUsable, isResidentialArea, ok, removeIrrelevantErrors, setBeforeUpload, setPartialSelection, setShowElements, startTest, testBeforeUpload, visit, visit, visit
-
-
-
-
Field Detail
-
NO_VIA
protected static final int NO_VIA
- See Also:
- Constant Field Values
-
NO_FROM
protected static final int NO_FROM
- See Also:
- Constant Field Values
-
NO_TO
protected static final int NO_TO
- See Also:
- Constant Field Values
-
MORE_VIA
protected static final int MORE_VIA
- See Also:
- Constant Field Values
-
MORE_FROM
protected static final int MORE_FROM
- See Also:
- Constant Field Values
-
MORE_TO
protected static final int MORE_TO
- See Also:
- Constant Field Values
-
UNEXPECTED_ROLE
protected static final int UNEXPECTED_ROLE
- See Also:
- Constant Field Values
-
UNEXPECTED_TYPE
protected static final int UNEXPECTED_TYPE
- See Also:
- Constant Field Values
-
FROM_VIA_NODE
protected static final int FROM_VIA_NODE
- See Also:
- Constant Field Values
-
TO_VIA_NODE
protected static final int TO_VIA_NODE
- See Also:
- Constant Field Values
-
FROM_VIA_WAY
protected static final int FROM_VIA_WAY
- See Also:
- Constant Field Values
-
TO_VIA_WAY
protected static final int TO_VIA_WAY
- See Also:
- Constant Field Values
-
MIX_VIA
protected static final int MIX_VIA
- See Also:
- Constant Field Values
-
UNCONNECTED_VIA
protected static final int UNCONNECTED_VIA
- See Also:
- Constant Field Values
-
SUPERFLUOUS
protected static final int SUPERFLUOUS
- See Also:
- Constant Field Values
-
FROM_EQUALS_TO
protected static final int FROM_EQUALS_TO
- See Also:
- Constant Field Values
-
UNKNOWN_RESTRICTION
protected static final int UNKNOWN_RESTRICTION
- See Also:
- Constant Field Values
-
TO_CLOSED_WAY
protected static final int TO_CLOSED_WAY
- See Also:
- Constant Field Values
-
FROM_CLOSED_WAY
protected static final int FROM_CLOSED_WAY
- See Also:
- Constant Field Values
-
SUPPORTED_RESTRICTIONS
private static final java.util.List<java.lang.String> SUPPORTED_RESTRICTIONS
-
-
Constructor Detail
-
TurnrestrictionTest
public TurnrestrictionTest()
Constructs a newTurnrestrictionTest.
-
-
Method Detail
-
hasSupportedRestrictionTag
private static boolean hasSupportedRestrictionTag(Relation r)
-
visit
public void visit(Relation r)
Description copied from interface:OsmPrimitiveVisitorVisiting call for relations.- Specified by:
visitin interfaceOsmPrimitiveVisitor- Overrides:
visitin classTest- Parameters:
r- The relation to inspect.
-
isFullOneway
private static boolean isFullOneway(Way w)
-
checkIfConnected
private void checkIfConnected(Relation r, Way previous, Way current, java.lang.String msg, int code)
-
-