Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.aendvari.common.model.osm
Class OsmModelTree  view OsmModelTree download OsmModelTree.java

java.lang.Object
  extended bycom.aendvari.common.model.osm.OsmModelTree
All Implemented Interfaces:
com.aendvari.common.model.ModelTree

public class OsmModelTree
extends java.lang.Object
implements com.aendvari.common.model.ModelTree

An OSM implementation of the com.aendvari.common.model.ModelNode interface.


Field Summary
protected  com.aendvari.common.osm.Osm modelTreeOsm
          The OSM that represents the model tree
 
Constructor Summary
OsmModelTree()
          Constructs an OsmModelTree instance.
OsmModelTree(com.aendvari.common.osm.Osm setModelTree)
          Constructs an OsmModelNode instance wrapping the supplied com.aendvari.common.osm.Osm.
 
Method Summary
 com.aendvari.common.model.ModelNode createNode(com.aendvari.common.osm.OsmNode osmNode)
          Creates a com.aendvari.common.model.ModelNode object from an com.aendvari.common.osm.OsmNode
 com.aendvari.common.model.ModelNode createNode(java.lang.String name)
          Creates a com.aendvari.common.model.ModelNode object.
 com.aendvari.common.model.ModelNode createNode(java.lang.String name, java.lang.String value)
          Creates a com.aendvari.common.model.ModelNode object with the supplied value.
 com.aendvari.common.model.ModelTree createTree()
          Creates a new com.aendvari.common.model.ModelTree object.
 com.aendvari.common.osm.Osm getModelTree()
          Returns the internal com.aendvari.common.osm.Osm object wrapped by this com.aendvari.common.model.ModelTree.
 com.aendvari.common.model.ModelNode getNode(com.aendvari.common.model.ModelNode node, java.lang.String path)
          Returns the com.aendvari.common.model.ModelNode using the path provided.
 java.util.List getNodes(com.aendvari.common.model.ModelNode node, java.lang.String path)
          Returns a List of com.aendvari.common.model.ModelNode's using the path provided.
 com.aendvari.common.model.ModelNode getRootNode()
          Returns the com.aendvari.common.model.ModelNode of the OSM model space.
 void loadFromFile(java.lang.String xmlFile)
          Replaces the current com.aendvari.common.model.ModelTree with data prodivided by the file.
 void loadFromStream(java.io.InputStream xmlStream)
          Replaces the current com.aendvari.common.model.ModelTree with the given XML stream.
 void setModelTree(com.aendvari.common.osm.Osm setModelTree)
          Sets the internal com.aendvari.common.osm.Osm object wrapped by this com.aendvari.common.model.ModelTree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelTreeOsm

protected com.aendvari.common.osm.Osm modelTreeOsm
The OSM that represents the model tree

Constructor Detail

OsmModelTree

public OsmModelTree()
Constructs an OsmModelTree instance.


OsmModelTree

public OsmModelTree(com.aendvari.common.osm.Osm setModelTree)
Constructs an OsmModelNode instance wrapping the supplied com.aendvari.common.osm.Osm.

Method Detail

setModelTree

public void setModelTree(com.aendvari.common.osm.Osm setModelTree)
Sets the internal com.aendvari.common.osm.Osm object wrapped by this com.aendvari.common.model.ModelTree.


getModelTree

public com.aendvari.common.osm.Osm getModelTree()
Returns the internal com.aendvari.common.osm.Osm object wrapped by this com.aendvari.common.model.ModelTree.


createTree

public com.aendvari.common.model.ModelTree createTree()
Creates a new com.aendvari.common.model.ModelTree object.

Specified by:
createTree in interface com.aendvari.common.model.ModelTree

getRootNode

public com.aendvari.common.model.ModelNode getRootNode()
Returns the com.aendvari.common.model.ModelNode of the OSM model space.

Specified by:
getRootNode in interface com.aendvari.common.model.ModelTree

createNode

public com.aendvari.common.model.ModelNode createNode(com.aendvari.common.osm.OsmNode osmNode)
Creates a com.aendvari.common.model.ModelNode object from an com.aendvari.common.osm.OsmNode


createNode

public com.aendvari.common.model.ModelNode createNode(java.lang.String name)
Creates a com.aendvari.common.model.ModelNode object.

Specified by:
createNode in interface com.aendvari.common.model.ModelTree

createNode

public com.aendvari.common.model.ModelNode createNode(java.lang.String name,
                                                      java.lang.String value)
Creates a com.aendvari.common.model.ModelNode object with the supplied value.

Specified by:
createNode in interface com.aendvari.common.model.ModelTree

getNode

public com.aendvari.common.model.ModelNode getNode(com.aendvari.common.model.ModelNode node,
                                                   java.lang.String path)
                                            throws com.aendvari.common.model.ModelException
Returns the com.aendvari.common.model.ModelNode using the path provided.

Specified by:
getNode in interface com.aendvari.common.model.ModelTree

getNodes

public java.util.List getNodes(com.aendvari.common.model.ModelNode node,
                               java.lang.String path)
                        throws com.aendvari.common.model.ModelException
Returns a List of com.aendvari.common.model.ModelNode's using the path provided.

Specified by:
getNodes in interface com.aendvari.common.model.ModelTree

loadFromFile

public void loadFromFile(java.lang.String xmlFile)
                  throws com.aendvari.common.model.ModelParserException
Replaces the current com.aendvari.common.model.ModelTree with data prodivided by the file.

Specified by:
loadFromFile in interface com.aendvari.common.model.ModelTree

loadFromStream

public void loadFromStream(java.io.InputStream xmlStream)
                    throws com.aendvari.common.model.ModelParserException
Replaces the current com.aendvari.common.model.ModelTree with the given XML stream.

Specified by:
loadFromStream in interface com.aendvari.common.model.ModelTree