net.sf.xmlmatcher.rex
Class PositionImpl

java.lang.Object
  extended by net.sf.xmlmatcher.rex.PositionImpl
All Implemented Interfaces:
Position
Direct Known Subclasses:
AnyElementPosition, TemplateElementPosition

public abstract class PositionImpl
extends java.lang.Object
implements Position


Constructor Summary
protected PositionImpl(org.w3c.dom.Element template)
           
 
Method Summary
 void addNext(Position nextSibling)
          Used by Glushkov graph builder to add sibling position that may *follow* this one in some valid input sequence
 org.w3c.dom.Element getElement()
           
 java.util.List<Position> getNextSiblings()
           
 boolean isFinal()
           
 void setFinal()
          Used by Glushkov graph builder to mark position as final
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.xmlmatcher.rex.Position
match
 

Constructor Detail

PositionImpl

protected PositionImpl(org.w3c.dom.Element template)
Method Detail

getElement

public org.w3c.dom.Element getElement()
Specified by:
getElement in interface Position
Returns:
Element of pattern DOM tree that corresponds to this position. Each position has an element, but some elements like xr:choice may not have corresponding position.

addNext

public void addNext(Position nextSibling)
Description copied from interface: Position
Used by Glushkov graph builder to add sibling position that may *follow* this one in some valid input sequence

Specified by:
addNext in interface Position

getNextSiblings

public java.util.List<Position> getNextSiblings()
Specified by:
getNextSiblings in interface Position
Returns:
List of next possible positions, can be null

isFinal

public boolean isFinal()
Specified by:
isFinal in interface Position
Returns:
true if this position may terminate sequence of siblings in some valid input sequence. (Derived from 'Last' set during Glushkov graph building phase.)

setFinal

public void setFinal()
Description copied from interface: Position
Used by Glushkov graph builder to mark position as final

Specified by:
setFinal in interface Position


Copyright © 2007. All Rights Reserved.