|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.exolab.adaptx.xpath.engine.AbstractPathComponent
public abstract class AbstractPathComponent
The base class for paths (now basically called paths)
| Field Summary |
|---|
| Fields inherited from interface org.exolab.adaptx.xpath.XPathExpression |
|---|
BOOLEAN, ERROR, FILTER_EXPR, LOCATION_PATH, NODE_TEST, NUMBER, PATH_EXPR, PRIMARY, STEP, STRING, UNION_EXPR |
| Constructor Summary | |
|---|---|
AbstractPathComponent()
Creates a new AbstractPathComponent |
|
| Method Summary | |
|---|---|
void |
addPredicate(org.exolab.adaptx.xpath.engine.PredicateExprImpl predicate)
Adds the given Expression to this PathComponent's predicate List. |
void |
addPredicate(XPathExpression expr)
Adds the given Expression to this PathComponent's predicate List. |
abstract XPathResult |
evaluate(XPathContext context)
Evaluates the expression and returns the XPath result. |
void |
evaluatePredicates(NodeSet nodes,
XPathContext context)
Evaluates the PredicateExpr of this PathComponent against the given Node. |
abstract double |
getDefaultPriority()
Determines the priority of a PatternExpr as follows: |
abstract short |
getExprType()
Returns the type of this expression. |
PredicateExpr |
getPredicate()
Returns the PredicateExpr of this PathComponent |
abstract XPathExpression |
getSubExpression()
Returns the sub-expression encapsulated by this PathComponent. |
boolean |
hasPredicates()
Returns true if this FilterBase has predicates expressions. |
abstract boolean |
isFilterExpr()
Returns true if this PathComponent is a FilterExpr. |
abstract boolean |
isLocationStep()
Returns true if this PathComponent is a LocationStep. |
abstract boolean |
matches(XPathNode node,
XPathContext context)
Determines if the given node is matched by this MatchExpr with respect to the given context. |
java.lang.String |
toString()
Returns the String representation of this PathComponent |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPathComponent()
| Method Detail |
|---|
public void addPredicate(XPathExpression expr)
throws XPathException
expr - the Expr to add to the predicate list
XPathException
public void addPredicate(org.exolab.adaptx.xpath.engine.PredicateExprImpl predicate)
throws XPathException
expr - the Expr to add to the predicate list
XPathExceptionpublic abstract double getDefaultPriority()
From the 19991116 XSLT 1.0 Recommendation:
+ If the pattern has the form of a QName preceded by a
ChildOrAttributeAxisSpecifier or has the form
processing-instruction(Literal) then the priority is 0.
+ If the pattern has the form NCName:* preceded by a
ChildOrAttributeAxisSpecifier, then the priority is -0.25
+ Otherwise if the pattern consists of just a NodeTest
preceded by a ChildOrAttributeAxisSpecifier then the
priority is -0.5
+ Otherwise the priority is 0.5
getDefaultPriority in interface PathComponentpublic abstract XPathExpression getSubExpression()
getSubExpression in interface PathComponentpublic abstract short getExprType()
XPathExpression
getExprType in interface XPathExpression
public abstract XPathResult evaluate(XPathContext context)
throws XPathException
evaluate in interface XPathExpressioncontext - The XPathContext to use during evaluation.
XPathException - if an error occured while
evaluating this expression.public PredicateExpr getPredicate()
getPredicate in interface PathComponentpublic boolean hasPredicates()
hasPredicates in interface PathComponent
public void evaluatePredicates(NodeSet nodes,
XPathContext context)
throws XPathException
evaluatePredicates in interface PathComponentnodes - the current NodeSetcontextInfo - provides a way to retrieve additional context
information needed to evaluate some expressions
XPathExceptionpublic abstract boolean isFilterExpr()
isFilterExpr in interface PathComponentisLocationSteppublic abstract boolean isLocationStep()
isLocationStep in interface PathComponentisFilterExpr
public abstract boolean matches(XPathNode node,
XPathContext context)
throws XPathException
matches in interface MatchExpressionnode - the node to determine a match forcontext - the XPathContext
XPathException - when an error occurs during
evaluationpublic java.lang.String toString()
toString in interface XPathExpressiontoString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||