java.lang.Object
com.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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
modelTreeOsm
protected com.aendvari.common.osm.Osm modelTreeOsm
- The OSM that represents the model tree
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.
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