org.openstreetmap.osmosis.core.report.v0_5
Class IntegrityReporter

java.lang.Object
  extended by org.openstreetmap.osmosis.core.report.v0_5.IntegrityReporter
All Implemented Interfaces:
EntityProcessor, Completable, Releasable, Task, Sink

public class IntegrityReporter
extends java.lang.Object
implements Sink, EntityProcessor

A sink that verifies the referential integrity of all data passing through it.

Author:
Brett Henderson

Constructor Summary
IntegrityReporter(java.io.File file)
          Creates a new instance.
 
Method Summary
 void complete()
          Flushes all changes to file.
protected  void initialize()
          Initialises the output file for writing.
 void process(BoundContainer bound)
          Process the bound.
 void process(EntityContainer entityContainer)
          Process the entity.
 void process(NodeContainer node)
          Process the node.
 void process(RelationContainer relationContainer)
          Process the relation.
 void process(WayContainer wayContainer)
          Process the way.
 void release()
          Cleans up any open file handles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegrityReporter

public IntegrityReporter(java.io.File file)
Creates a new instance.

Parameters:
file - The file to write.
Method Detail

initialize

protected void initialize()
Initialises the output file for writing. This must be called by sub-classes before any writing is performed. This method may be called multiple times without adverse affect allowing sub-classes to invoke it every time they perform processing.


process

public void process(EntityContainer entityContainer)
Process the entity.

Specified by:
process in interface Sink
Parameters:
entityContainer - The entity to be processed.

process

public void process(BoundContainer bound)
Process the bound.

Specified by:
process in interface EntityProcessor
Parameters:
bound - The bound to be processed.

process

public void process(NodeContainer node)
Process the node.

Specified by:
process in interface EntityProcessor
Parameters:
node - The node to be processed.

process

public void process(WayContainer wayContainer)
Process the way.

Specified by:
process in interface EntityProcessor
Parameters:
wayContainer - The way to be processed.

process

public void process(RelationContainer relationContainer)
Process the relation.

Specified by:
process in interface EntityProcessor
Parameters:
relationContainer - The relation to be processed.

complete

public void complete()
Flushes all changes to file.

Specified by:
complete in interface Completable

release

public void release()
Cleans up any open file handles.

Specified by:
release in interface Releasable