org.openstreetmap.josm.data.validation.tests
Class NameMismatch
java.lang.Object
org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
org.openstreetmap.josm.data.validation.Test
org.openstreetmap.josm.data.validation.tests.NameMismatch
- All Implemented Interfaces:
- Visitor
public class NameMismatch
- extends Test
Check for missing name:* translations.
This test finds multilingual objects whose 'name' attribute is not
equal to any 'name:*' attribute and not a composition of some
'name:*' attributes separated by ' - '.
For example, a node with name=Europe, name:de=Europa should have
name:en=Europe to avoid triggering this test. An object with
name='Suomi - Finland' should have at least name:fi=Suomi and
name:sv=Finland to avoid a warning (name:et=Soome would not
matter). Also, complain if an object has some name:* attribute but
no name.
Methods inherited from class org.openstreetmap.josm.data.validation.Test |
addGui, deletePrimitivesIfNeeded, endTest, fixError, getErrors, getName, initialize, isBuilding, isCanceled, isFixable, ok, setBeforeUpload, setPartialSelection, startTest, testBeforeUpload, visit, visit, visit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME_MISSING
protected static final int NAME_MISSING
- See Also:
- Constant Field Values
NAME_TRANSLATION_MISSING
protected static final int NAME_TRANSLATION_MISSING
- See Also:
- Constant Field Values
NameMismatch
public NameMismatch()
missingTranslation
private void missingTranslation(OsmPrimitive p)
- Report a missing translation.
- Parameters:
p
- The primitive whose translation is missing
check
public void check(OsmPrimitive p)
- Check a primitive for a name mismatch.
- Parameters:
p
- The primitive to be tested
visit
public void visit(java.util.Collection<OsmPrimitive> selection)
- Checks a name mismatch in all primitives.
- Overrides:
visit
in class Test
- Parameters:
selection
- The primitives to be tested
JOSM