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

Quick Search    Search Deep

com.aendvari.common.osm
Class SimpleOsmPath  view SimpleOsmPath download SimpleOsmPath.java

java.lang.Object
  extended bycom.aendvari.common.osm.SimpleOsmPath

public class SimpleOsmPath
extends java.lang.Object

Provides the ability to access nodes within an Object Space Model using an expression.

This class allows only simple path expressions. It supports the ability to create a node at the specified path if one does not exist.


Nested Class Summary
protected static class SimpleOsmPath.Tokenizer
          Parses an expression for segments separated by "/" or ".".
 
Field Summary
protected static java.lang.String segmentDelimiters
          The delimiters used to separate segments of the path expression.
 
Constructor Summary
SimpleOsmPath()
           
 
Method Summary
static OsmNode getNode(OsmNode context, java.lang.String path, boolean build)
          Returns the node at the specified path.
protected static OsmNode getNodeBuild(OsmNode parent, java.lang.String path)
          Returns the node at the specified path.
protected static OsmNode getNodeNoBuild(OsmNode parent, java.lang.String path)
          Returns the node at the specified path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

segmentDelimiters

protected static java.lang.String segmentDelimiters
The delimiters used to separate segments of the path expression.

Constructor Detail

SimpleOsmPath

public SimpleOsmPath()
Method Detail

getNode

public static OsmNode getNode(OsmNode context,
                              java.lang.String path,
                              boolean build)
                       throws OsmException
Returns the node at the specified path. Optionally all non existing nodes found on the path can be created.


getNodeNoBuild

protected static OsmNode getNodeNoBuild(OsmNode parent,
                                        java.lang.String path)
                                 throws OsmException
Returns the node at the specified path. Returns null if the path is not valid.


getNodeBuild

protected static OsmNode getNodeBuild(OsmNode parent,
                                      java.lang.String path)
                               throws OsmException
Returns the node at the specified path. Builds all non existing nodes found on the path.