org.openstreetmap.osmosis.core.container.v0_5
Class RelationContainer

java.lang.Object
  extended by org.openstreetmap.osmosis.core.container.v0_5.EntityContainer
      extended by org.openstreetmap.osmosis.core.container.v0_5.RelationContainer
All Implemented Interfaces:
Storeable

public class RelationContainer
extends EntityContainer

Entity container implementation for relations.

Author:
Brett Henderson

Constructor Summary
RelationContainer(Relation relation)
          Creates a new instance.
RelationContainer(StoreReader sr, StoreClassRegister scr)
          Creates a new instance.
 
Method Summary
 Relation getEntity()
          Returns the contained entity.
 void process(EntityProcessor processor)
          Calls the appropriate process method with the contained entity.
 void store(StoreWriter sw, StoreClassRegister scr)
          Stores all state to the specified store writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationContainer

public RelationContainer(Relation relation)
Creates a new instance.

Parameters:
relation - The relation to wrap.

RelationContainer

public RelationContainer(StoreReader sr,
                         StoreClassRegister scr)
Creates a new instance.

Parameters:
sr - The store to read state from.
scr - Maintains the mapping between classes and their identifiers within the store.
Method Detail

store

public void store(StoreWriter sw,
                  StoreClassRegister scr)
Stores all state to the specified store writer.

Parameters:
sw - The writer that persists data to an underlying store.
scr - Maintains the mapping between classes and their identifiers within the store.

process

public void process(EntityProcessor processor)
Calls the appropriate process method with the contained entity.

Specified by:
process in class EntityContainer
Parameters:
processor - The processor to invoke.

getEntity

public Relation getEntity()
Returns the contained entity.

Specified by:
getEntity in class EntityContainer
Returns:
The entity.