Class EntityMerger
java.lang.Object
org.openstreetmap.osmosis.set.v0_6.EntityMerger
- All Implemented Interfaces:
Runnable,org.openstreetmap.osmosis.core.task.common.Task,org.openstreetmap.osmosis.core.task.v0_6.MultiSink,org.openstreetmap.osmosis.core.task.v0_6.MultiSinkRunnableSource,org.openstreetmap.osmosis.core.task.v0_6.RunnableSource,org.openstreetmap.osmosis.core.task.v0_6.Source
public class EntityMerger
extends Object
implements org.openstreetmap.osmosis.core.task.v0_6.MultiSinkRunnableSource
Merges two sources into a single data set. Conflicting elements are resolved
by using either the latest timestamp (default) or always selecting the second
source.
-
Constructor Summary
ConstructorsConstructorDescriptionEntityMerger(org.openstreetmap.osmosis.core.merge.common.ConflictResolutionMethod conflictResolutionMethod, int inputBufferCapacity, BoundRemovedAction boundRemovedAction) Creates a new instance. -
Method Summary
-
Constructor Details
-
EntityMerger
public EntityMerger(org.openstreetmap.osmosis.core.merge.common.ConflictResolutionMethod conflictResolutionMethod, int inputBufferCapacity, BoundRemovedAction boundRemovedAction) Creates a new instance.- Parameters:
conflictResolutionMethod- The method to used to resolve conflict when two sources contain the same entity.inputBufferCapacity- The size of the buffers to use for input sources.boundRemovedAction- The action to take if the merge operation removes a bound entity.
-
-
Method Details
-
getSink
public org.openstreetmap.osmosis.core.task.v0_6.Sink getSink(int instance) - Specified by:
getSinkin interfaceorg.openstreetmap.osmosis.core.task.v0_6.MultiSink
-
getSinkCount
public int getSinkCount()This implementation always returns 2.- Specified by:
getSinkCountin interfaceorg.openstreetmap.osmosis.core.task.v0_6.MultiSink- Returns:
- 2
-
setSink
public void setSink(org.openstreetmap.osmosis.core.task.v0_6.Sink sink) - Specified by:
setSinkin interfaceorg.openstreetmap.osmosis.core.task.v0_6.Source
-
run
public void run()
-