org.openstreetmap.osmosis.core.customdb.v0_6
Class DumpDataset

java.lang.Object
  extended by org.openstreetmap.osmosis.core.customdb.v0_6.DumpDataset
All Implemented Interfaces:
Releasable, Task, DatasetSink, DatasetSinkSource, Source

public class DumpDataset
extends java.lang.Object
implements DatasetSinkSource

Reads all data from a dataset.

Author:
Brett Henderson

Constructor Summary
DumpDataset()
           
 
Method Summary
 void process(Dataset dataset)
          Process the dataset.
 void release()
          Performs resource cleanup tasks such as closing files, or database connections.
 void setSink(Sink sink)
          Sets the osm sink to send data to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DumpDataset

public DumpDataset()
Method Detail

setSink

public void setSink(Sink sink)
Sets the osm sink to send data to.

Specified by:
setSink in interface Source
Parameters:
sink - The sink for receiving all produced data.

process

public void process(Dataset dataset)
Process the dataset. This must only be called once. This will perform all finalisation tasks such as database commits as necessary to complete the task.

Specified by:
process in interface DatasetSink
Parameters:
dataset - The dataset to be processed.

release

public void release()
Performs resource cleanup tasks such as closing files, or database connections. This must be called after all processing is complete and may be called multiple times. Implementations must call release on any nested Releasable objects. It should be called within a finally block to ensure it is called in exception scenarios.

Specified by:
release in interface Releasable