public class DuplicateRelation extends Test
Modifier and Type | Class and Description |
---|---|
private static class |
DuplicateRelation.RelationMembers
Class to store relation members
|
private static class |
DuplicateRelation.RelationPair
Class to store relation data (keys are usually cleanup and may not be equal to original relation)
|
static class |
DuplicateRelation.RelMember
Class to store one relation members and information about it
|
Test.TagTest
Modifier and Type | Field and Description |
---|---|
protected static int |
DUPLICATE_RELATION
Code number of completely duplicated relation error
|
private java.util.Set<java.lang.String> |
ignoreKeys
List of keys without useful information
|
private MultiMap<DuplicateRelation.RelationPair,OsmPrimitive> |
relations
MultiMap of all relations
|
private MultiMap<java.util.List<RelationMember>,OsmPrimitive> |
relationsNoKeys
MultiMap of all relations, regardless of keys
|
protected static int |
SAME_RELATION
Code number of relation with same members error
|
checkBeforeUpload, checkEnabled, description, enabled, errors, IN_DOWNLOADED_AREA, IN_DOWNLOADED_AREA_STRICT, isBeforeUpload, name, partialSelection, progressMonitor, startTime, testBeforeUpload
Constructor and Description |
---|
DuplicateRelation()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
endTest()
Notification of the end of the test.
|
Command |
fixError(TestError testError)
Fix the error by removing all but one instance of duplicate relations
|
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(Relation r)
Visiting call for relations.
|
addGui, clear, deletePrimitivesIfNeeded, getErrors, getName, initialize, isBuilding, isCanceled, isPrimitiveUsable, isResidentialArea, ok, setBeforeUpload, setPartialSelection, setShowElements, testBeforeUpload, visit, visit, visit
protected static final int DUPLICATE_RELATION
protected static final int SAME_RELATION
private MultiMap<DuplicateRelation.RelationPair,OsmPrimitive> relations
private MultiMap<java.util.List<RelationMember>,OsmPrimitive> relationsNoKeys
private final java.util.Set<java.lang.String> ignoreKeys
public DuplicateRelation()
public void startTest(ProgressMonitor monitor)
Test
public void endTest()
Test
If you override this method, don't forget to cleanup progressMonitor
(most overrides call super.endTest()
to do this).
public void visit(Relation r)
OsmPrimitiveVisitor
visit
in interface OsmPrimitiveVisitor
visit
in class Test
r
- The relation to inspect.public Command fixError(TestError testError)
fixError
in class Test
testError
- The error to fix, must be of type DUPLICATE_RELATION