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

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

public class NodeContainer
extends EntityContainer

Entity container implementation for nodes.

Author:
Brett Henderson

Constructor Summary
NodeContainer(Node node)
          Creates a new instance.
NodeContainer(StoreReader sr, StoreClassRegister scr)
          Creates a new instance.
 
Method Summary
 Node 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

NodeContainer

public NodeContainer(Node node)
Creates a new instance.

Parameters:
node - The node to wrap.

NodeContainer

public NodeContainer(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 Node getEntity()
Returns the contained entity.

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