com.jeceira.syntax
Class Path.Normalizer

java.lang.Object
  extended bycom.jeceira.syntax.Path.Normalizer
Enclosing class:
Path

static class Path.Normalizer
extends java.lang.Object

Normalizes any given path by resolving '.' and '..' elements. Note that the start node of the path can change during the normalization process and thus, a PathNotFoundException might occur. Also note that the array of normalized path elements can be empty. In this case, the start node is the element that the path points to.

Author:
Valeri Felberg, Kristian Duske

Constructor Summary
(package private) Path.Normalizer(SessionNode startNode)
          Creates a path normalizer with the specified start node.
 
Method Summary
(package private)  void addElement(PathElement pathElement)
          Adds the specified path element to the normalized path.
(package private)  PathElement[] getElements()
          Returns the path elements of the normalized path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Path.Normalizer

Path.Normalizer(SessionNode startNode)
Creates a path normalizer with the specified start node.

Method Detail

addElement

void addElement(PathElement pathElement)
          throws PathNotFoundException,
                 RepositoryException
Adds the specified path element to the normalized path.

Throws:
PathNotFoundException - if the specified element is the first element of the currently normalized path and equal to PathElement.DOUBLE_DOT and the start node is a root node
RepositoryException

getElements

PathElement[] getElements()
Returns the path elements of the normalized path.



Copyright © 2005 Aparzev Software Ltd. All Rights Reserved.