|
||||||||||
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.FromAncestors
public class FromAncestors
Implements the ancestor:: axis.
Field Summary |
---|
Fields inherited from class com.caucho.xpath.pattern.AbstractPattern |
---|
_child, _parent, log, XMLNS |
Constructor Summary | |
---|---|
FromAncestors(AbstractPattern parent,
boolean self)
|
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 the number of matching ancestors from 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()
Return true if the iterator is in document-order. |
boolean |
isStrictlyAscending()
Returns true if the pattern is strictly ascending. |
boolean |
isUnique()
Returns true if the pattern's selector returns unique nodes. |
boolean |
match(org.w3c.dom.Node node,
ExprEnvironment env)
Matches if a descendant matches the parent pattern. |
org.w3c.dom.Node |
nextNode(org.w3c.dom.Node node,
org.w3c.dom.Node last)
Returns the next node in the selection order. |
int |
position(org.w3c.dom.Node node,
Env env,
AbstractPattern pattern)
The ancestor position is the number of matching nodes between it and an axis-context. |
java.lang.String |
toString()
|
Methods inherited from class com.caucho.xpath.pattern.AbstractPattern |
---|
findAny, getNodeName, getParent, getPrefix, getPriority, lastNode, select, selectUnique, toPatternString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FromAncestors(AbstractPattern parent, boolean self)
Method Detail |
---|
public boolean match(org.w3c.dom.Node node, ExprEnvironment env) throws XPathException
match
in class AbstractPattern
node
- the current nodeenv
- the variable environment
XPathException
public boolean isAscending()
AbstractPattern
isAscending
in class AbstractPattern
public org.w3c.dom.Node firstNode(org.w3c.dom.Node node, ExprEnvironment env)
firstNode
in class AbstractPattern
node
- the current node
public org.w3c.dom.Node nextNode(org.w3c.dom.Node node, org.w3c.dom.Node last)
nextNode
in class AbstractPattern
node
- the current nodelast
- the last node
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)
node
- the current nodeenv
- the variable environmentpattern
- the position pattern
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 AbstractPattern
node
- the starting nodeenv
- the variable environmentmatch
- the axis match pattern
XPathException
public AbstractPattern copyAxis()
copyAxis
in class AbstractPattern
public AbstractPattern copyPosition()
copyPosition
in class AbstractPattern
public boolean isStrictlyAscending()
isStrictlyAscending
in class AbstractPattern
public boolean isUnique()
isUnique
in class AbstractPattern
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |