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

Quick Search    Search Deep

com.aendvari.common.model
Interface ModelTree  view ModelTree download ModelTree.java


public interface ModelTree

The ModelTree interface represents a XML DOM or OSM implementation. Typically the implementation would include a reference to the OSM or DOM (XML) object,


Method Summary
 ModelNode createNode(java.lang.String name)
          Creates a ModelNode object.
 ModelNode createNode(java.lang.String name, java.lang.String value)
          Creates a ModelNode object with the supplied value.
 ModelTree createTree()
          Creates a new ModelTree object.
 ModelNode getNode(ModelNode node, java.lang.String path)
          Returns the ModelNode using the path provided.
 java.util.List getNodes(ModelNode node, java.lang.String path)
          Returns an List of ModelNode's using the path provided.
 ModelNode getRootNode()
          Returns the ModelNode of the DOM/OSM model space.
 void loadFromFile(java.lang.String file)
          Replaces the current ModelTree with data prodivided by the file.
 void loadFromStream(java.io.InputStream stream)
          Replaces the current ModelTree with the given XML stream.
 

Method Detail

createNode

public ModelNode createNode(java.lang.String name)
Creates a ModelNode object.


createNode

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


createTree

public ModelTree createTree()
Creates a new ModelTree object.


getNode

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


getNodes

public java.util.List getNodes(ModelNode node,
                               java.lang.String path)
                        throws ModelException
Returns an List of ModelNode's using the path provided.


getRootNode

public ModelNode getRootNode()
Returns the ModelNode of the DOM/OSM model space.


loadFromFile

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


loadFromStream

public void loadFromStream(java.io.InputStream stream)
                    throws ModelParserException
Replaces the current ModelTree with the given XML stream.