|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.xpath.pattern.AbstractPattern
com.caucho.xpath.pattern.FromPrevious
public class FromPrevious
Matches nodes preceding the current node, not counting descendants.
| Field Summary |
|---|
| Fields inherited from class com.caucho.xpath.pattern.AbstractPattern |
|---|
_child, _parent, log, XMLNS |
| Constructor Summary | |
|---|---|
FromPrevious(AbstractPattern parent)
|
|
| Method Summary | |
|---|---|
AbstractPattern |
copyAxis()
Returns the node itself for the axis. |
AbstractPattern |
copyPosition()
Returns null since the axis isn't part of the position pattern. |
int |
count(org.w3c.dom.Node node,
Env env,
AbstractPattern pattern)
counts matching nodes preceding the axis context. |
NodeIterator |
createNodeIterator(org.w3c.dom.Node node,
ExprEnvironment env,
AbstractPattern match)
Creates a new node iterator. |
org.w3c.dom.Node |
firstNode(org.w3c.dom.Node node,
ExprEnvironment env)
Returns the first node in the selection order. |
boolean |
isAscending()
The iterator is in reverse document order. |
boolean |
isStrictlyAscending()
Returns true if the pattern is strictly ascending. |
boolean |
isUnique()
Returns true if the pattern is strictly ascending. |
org.w3c.dom.Node |
lastNode(org.w3c.dom.Node node)
Returns the last node in the selection order. |
boolean |
match(org.w3c.dom.Node node,
ExprEnvironment env)
matches if we can find a following node matching the parent pattern. |
org.w3c.dom.Node |
nextNode(org.w3c.dom.Node node,
org.w3c.dom.Node lastNode)
Returns the next node in the selection order. |
int |
position(org.w3c.dom.Node node,
Env env,
AbstractPattern pattern)
Calculates position by counting next nodes matching the pattern. |
java.lang.String |
toString()
|
| Methods inherited from class com.caucho.xpath.pattern.AbstractPattern |
|---|
findAny, getNodeName, getParent, getPrefix, getPriority, select, selectUnique, toPatternString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FromPrevious(AbstractPattern parent)
| Method Detail |
|---|
public boolean match(org.w3c.dom.Node node,
ExprEnvironment env)
throws XPathException
match in class AbstractPatternnode - the node to testenv - the variable environment.
XPathExceptionpublic boolean isAscending()
isAscending in class AbstractPattern
public int position(org.w3c.dom.Node node,
Env env,
AbstractPattern pattern)
throws XPathException
node - the current nodeenv - the variable environmentpattern - the position pattern
XPathException
public int count(org.w3c.dom.Node node,
Env env,
AbstractPattern pattern)
throws XPathException
node - the current nodeenv - the variable environmentpattern - the position pattern
XPathExceptionpublic boolean isUnique()
public org.w3c.dom.Node firstNode(org.w3c.dom.Node node,
ExprEnvironment env)
firstNode in class AbstractPatternnode - the current node
public org.w3c.dom.Node nextNode(org.w3c.dom.Node node,
org.w3c.dom.Node lastNode)
nextNode in class AbstractPatternnode - the current nodelastNode - the original node (for checking ancestors)
public org.w3c.dom.Node lastNode(org.w3c.dom.Node node)
lastNode in class AbstractPatternnode - the current node
public java.lang.String toString()
toString in class java.lang.Object
public NodeIterator createNodeIterator(org.w3c.dom.Node node,
ExprEnvironment env,
AbstractPattern match)
throws XPathException
createNodeIterator in class AbstractPatternnode - the starting nodeenv - the variable environmentmatch - the axis match pattern
XPathExceptionpublic AbstractPattern copyAxis()
copyAxis in class AbstractPatternpublic AbstractPattern copyPosition()
copyPosition in class AbstractPatternpublic boolean isStrictlyAscending()
isStrictlyAscending in class AbstractPattern
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||