public class DatasetConsistencyTest extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private DataSet |
dataSet |
private int |
errorCount |
private static int |
MAX_ERRORS |
private java.io.PrintWriter |
writer |
Constructor and Description |
---|
DatasetConsistencyTest(DataSet dataSet,
java.io.Writer writer)
Constructs a new
DatasetConsistencyTest . |
Modifier and Type | Method and Description |
---|---|
void |
checkCompleteNodesWithoutCoordinates()
Checks for complete nodes without coordinates.
|
void |
checkCompleteWaysWithIncompleteNodes()
Checks for womplete ways with incomplete nodes.
|
private void |
checkReferredPrimitive(OsmPrimitive primitive,
OsmPrimitive parent) |
void |
checkReferrers()
Checks that parent primitive is referred from its child members
|
void |
checkZeroNodesWays()
Checks for zero and one-node ways.
|
private void |
printElapsedTime(Stopwatch stopwatch) |
private void |
printError(java.lang.String type,
java.lang.String message,
java.lang.Object... args) |
void |
referredPrimitiveNotInDataset()
Checks that referred primitives are present in dataset.
|
void |
runTest()
Runs test.
|
static java.lang.String |
runTests(DataSet dataSet)
Runs test on the given dataset.
|
void |
searchNodes()
Checks that nodes can be retrieved through their coordinates.
|
void |
searchWays()
Checks that ways can be retrieved through their bounding box.
|
private static final int MAX_ERRORS
private final java.io.PrintWriter writer
private int errorCount
public DatasetConsistencyTest(DataSet dataSet, java.io.Writer writer)
DatasetConsistencyTest
.dataSet
- The dataset to testwriter
- The writer used to write resultsprivate void printError(java.lang.String type, java.lang.String message, java.lang.Object... args)
public void checkReferrers()
public void checkCompleteWaysWithIncompleteNodes()
public void checkCompleteNodesWithoutCoordinates()
public void searchNodes()
public void searchWays()
private void checkReferredPrimitive(OsmPrimitive primitive, OsmPrimitive parent)
public void referredPrimitiveNotInDataset()
public void checkZeroNodesWays()
private void printElapsedTime(Stopwatch stopwatch)
public void runTest()