Package | Description |
---|---|
org.apache.commons.jxpath.ri |
Reference implementation of JXPath.
|
org.apache.commons.jxpath.ri.axes |
Implementations of EvalContext used for different XPath axes (child::, parent:: etc).
|
org.apache.commons.jxpath.ri.compiler |
XPath parse tree.
|
Modifier and Type | Field and Description |
---|---|
protected EvalContext |
EvalContext.parentContext
parent context
|
Modifier and Type | Method and Description |
---|---|
EvalContext |
JXPathContextReferenceImpl.getAbsoluteRootContext()
Get the absolute root context.
|
private EvalContext |
JXPathContextReferenceImpl.getEvalContext()
Get the evaluation context.
|
Constructor and Description |
---|
EvalContext(EvalContext parentContext)
Create a new EvalContext.
|
Modifier and Type | Class and Description |
---|---|
class |
AncestorContext
EvalContext that walks the "ancestor::" and "ancestor-or-self::" axes.
|
class |
AttributeContext
EvalContext that walks the "attribute::" axis.
|
class |
ChildContext
EvalContext that can walk the "child::", "following-sibling::" and
"preceding-sibling::" axes.
|
class |
DescendantContext
An EvalContext that walks the "descendant::" and "descendant-or-self::"
axes.
|
class |
InitialContext
A single-set EvalContext that provides access to the current node of
the parent context and nothing else.
|
class |
NamespaceContext
EvalContext that walks the "namespace::" axis.
|
class |
NodeSetContext
A simple context that is based on a
NodeSet . |
class |
ParentContext
EvalContext that walks the "parent::" axis.
|
class |
PrecedingOrFollowingContext
EvalContext that walks the "preceding::" and "following::" axes.
|
class |
PredicateContext
EvalContext that checks predicates.
|
class |
RootContext
EvalContext that is used to hold the root node for the path traversal.
|
class |
SelfContext
EvalContext that returns the current node from the parent context if the
test succeeds.
|
class |
UnionContext
EvalContext that represents a union between other contexts - result
of a union operation like (a | b)
|
Modifier and Type | Field and Description |
---|---|
private EvalContext[] |
UnionContext.contexts |
Modifier and Type | Method and Description |
---|---|
EvalContext |
RootContext.getAbsoluteRootContext()
Get absolute root context
|
EvalContext |
RootContext.getConstantContext(java.lang.Object constant)
Get a context that points to the specified object.
|
EvalContext |
RootContext.getVariableContext(QName variableName)
Get variable context.
|
Modifier and Type | Method and Description |
---|---|
static NodePointer |
SimplePathInterpreter.createNullPointer(EvalContext context,
NodePointer parent,
Step[] steps,
int currentStep)
Creates a "null pointer" that
a) represents the requested path and
b) can be used for creation of missing nodes in the path.
|
private static NodePointer |
SimplePathInterpreter.createNullPointerForPredicates(EvalContext context,
NodePointer parent,
Step[] steps,
int currentStep,
Expression[] predicates,
int currentPredicate)
Creates a "null pointer" that starts with predicates.
|
private static NodePointer |
SimplePathInterpreter.doPredicate(EvalContext context,
NodePointer parent,
Step[] steps,
int currentStep,
Expression[] predicates,
int currentPredicate)
Evaluates predicates and proceeds with the subsequent steps
of the path.
|
private static NodePointer |
SimplePathInterpreter.doPredicateIndex(EvalContext context,
NodePointer parent,
Step[] steps,
int currentStep,
Expression[] predicates,
int currentPredicate)
Evaluate a subscript predicate: see if the node is a collection and
if the index is inside the collection.
|
private static NodePointer |
SimplePathInterpreter.doPredicateName(EvalContext context,
NodePointer parent,
Step[] steps,
int currentStep,
Expression[] predicates,
int currentPredicate)
Execute a NameAttributeTest predicate
|
private static NodePointer |
SimplePathInterpreter.doPredicatesStandard(EvalContext context,
java.util.List parents,
Step[] steps,
int currentStep,
Expression[] predicates,
int currentPredicate)
Called exclusively for standard InfoSet nodes, e.g.
|
private static NodePointer |
SimplePathInterpreter.doStep(EvalContext context,
NodePointer parent,
Step[] steps,
int currentStep)
Recursive evaluation of a path.
|
private static NodePointer |
SimplePathInterpreter.doStepNoPredicatesPropertyOwner(EvalContext context,
PropertyOwnerPointer parentPointer,
Step[] steps,
int currentStep)
We have a step that starts with a property owner (bean, map, etc) and has
no predicates.
|
private static NodePointer |
SimplePathInterpreter.doStepNoPredicatesStandard(EvalContext context,
NodePointer parentPointer,
Step[] steps,
int currentStep)
A path that starts with a standard InfoSet node (e.g.
|
private static NodePointer |
SimplePathInterpreter.doStepPredicatesPropertyOwner(EvalContext context,
PropertyOwnerPointer parentPointer,
Step[] steps,
int currentStep)
A path that starts with a property owner.
|
private static NodePointer |
SimplePathInterpreter.doStepPredicatesStandard(EvalContext context,
NodePointer parent,
Step[] steps,
int currentStep)
A path that starts with a standard InfoSet node, e.g.
|
private static NodeIterator |
SimplePathInterpreter.getNodeIterator(EvalContext context,
NodePointer pointer,
Step step)
Get a NodeIterator.
|
private static int |
SimplePathInterpreter.indexFromPredicate(EvalContext context,
Expression predicate)
Extract an integer from a subscript predicate.
|
static NodePointer |
SimplePathInterpreter.interpretSimpleExpressionPath(EvalContext context,
NodePointer root,
Expression[] predicates,
Step[] steps)
Interpret the steps of a simple expression path that
starts with the given root, which is the result of evaluation
of the root expression of the expression path, applies the
given predicates to it and then follows the given steps.
|
static NodePointer |
SimplePathInterpreter.interpretSimpleLocationPath(EvalContext context,
NodePointer root,
Step[] steps)
Interpret a simple path that starts with the given root and
follows the given steps.
|
private static java.lang.String |
SimplePathInterpreter.keyFromPredicate(EvalContext context,
Expression predicate)
Extracts the string value of the expression from a predicate like
[@name=expression].
|
Constructor and Description |
---|
AncestorContext(EvalContext parentContext,
boolean includeSelf,
NodeTest nodeTest)
Create a new AncestorContext.
|
AttributeContext(EvalContext parentContext,
NodeTest nodeTest)
Create a new AttributeContext.
|
ChildContext(EvalContext parentContext,
NodeTest nodeTest,
boolean startFromParentLocation,
boolean reverse)
Create a new ChildContext.
|
DescendantContext(EvalContext parentContext,
boolean includeSelf,
NodeTest nodeTest)
Create a new DescendantContext.
|
InitialContext(EvalContext parentContext)
Create a new InitialContext.
|
NamespaceContext(EvalContext parentContext,
NodeTest nodeTest) |
NodeSetContext(EvalContext parentContext,
NodeSet nodeSet)
Create a new NodeSetContext.
|
ParentContext(EvalContext parentContext,
NodeTest nodeTest)
Create a new ParentContext.
|
PrecedingOrFollowingContext(EvalContext parentContext,
NodeTest nodeTest,
boolean reverse)
Create a new PrecedingOrFollowingContext.
|
PredicateContext(EvalContext parentContext,
Expression expression)
Create a new PredicateContext.
|
SelfContext(EvalContext parentContext,
NodeTest nodeTest)
Create a new SelfContext.
|
UnionContext(EvalContext parentContext,
EvalContext[] contexts)
Create a new UnionContext.
|
UnionContext(EvalContext parentContext,
EvalContext[] contexts)
Create a new UnionContext.
|
Modifier and Type | Method and Description |
---|---|
protected EvalContext |
Path.buildContextChain(EvalContext context,
int stepCount,
boolean createInitialContext)
Build a context from a chain of contexts.
|
protected EvalContext |
Path.createContextForStep(EvalContext context,
int axis,
NodeTest nodeTest)
Different axes are serviced by different contexts.
|
protected EvalContext |
Path.evalSteps(EvalContext context)
Given a root context, walks a path therefrom and builds a context
that contains all nodes matching the path.
|
Modifier and Type | Method and Description |
---|---|
protected EvalContext |
Path.buildContextChain(EvalContext context,
int stepCount,
boolean createInitialContext)
Build a context from a chain of contexts.
|
java.lang.Object |
Constant.compute(EvalContext context) |
java.lang.Object |
CoreFunction.compute(EvalContext context) |
java.lang.Object |
CoreOperation.compute(EvalContext context) |
abstract java.lang.Object |
Expression.compute(EvalContext context)
Evaluates the expression.
|
java.lang.Object |
ExpressionPath.compute(EvalContext context) |
java.lang.Object |
ExtensionFunction.compute(EvalContext context) |
java.lang.Object |
LocationPath.compute(EvalContext context) |
java.lang.Object |
VariableReference.compute(EvalContext context) |
java.lang.Object |
Constant.computeValue(EvalContext context) |
java.lang.Object |
CoreFunction.computeValue(EvalContext context) |
abstract java.lang.Object |
CoreOperation.computeValue(EvalContext context) |
java.lang.Object |
CoreOperationAdd.computeValue(EvalContext context) |
java.lang.Object |
CoreOperationAnd.computeValue(EvalContext context) |
java.lang.Object |
CoreOperationCompare.computeValue(EvalContext context) |
java.lang.Object |
CoreOperationDivide.computeValue(EvalContext context) |
java.lang.Object |
CoreOperationMod.computeValue(EvalContext context) |
java.lang.Object |
CoreOperationMultiply.computeValue(EvalContext context) |
java.lang.Object |
CoreOperationNegate.computeValue(EvalContext context) |
java.lang.Object |
CoreOperationOr.computeValue(EvalContext context) |
java.lang.Object |
CoreOperationRelationalExpression.computeValue(EvalContext context) |
java.lang.Object |
CoreOperationSubtract.computeValue(EvalContext context) |
java.lang.Object |
CoreOperationUnion.computeValue(EvalContext context) |
abstract java.lang.Object |
Expression.computeValue(EvalContext context)
Evaluates the expression.
|
java.lang.Object |
ExpressionPath.computeValue(EvalContext context) |
java.lang.Object |
ExtensionFunction.computeValue(EvalContext context) |
java.lang.Object |
LocationPath.computeValue(EvalContext context) |
java.lang.Object |
VariableReference.computeValue(EvalContext context)
Returns the value of the variable.
|
protected EvalContext |
Path.createContextForStep(EvalContext context,
int axis,
NodeTest nodeTest)
Different axes are serviced by different contexts.
|
protected boolean |
CoreOperationCompare.equal(EvalContext context,
Expression left,
Expression right)
Compares two values.
|
protected EvalContext |
Path.evalSteps(EvalContext context)
Given a root context, walks a path therefrom and builds a context
that contains all nodes matching the path.
|
protected java.lang.Object |
ExpressionPath.expressionPath(EvalContext evalContext,
boolean firstMatch)
Walks an expression path (a path that starts with an expression)
|
protected java.lang.Object |
CoreFunction.functionBoolean(EvalContext context)
boolean() implementation.
|
protected java.lang.Object |
CoreFunction.functionCeiling(EvalContext context)
ceiling() implementation.
|
protected java.lang.Object |
CoreFunction.functionConcat(EvalContext context)
concat() implementation.
|
protected java.lang.Object |
CoreFunction.functionContains(EvalContext context)
contains() implementation.
|
protected java.lang.Object |
CoreFunction.functionCount(EvalContext context)
count() implementation.
|
protected java.lang.Object |
CoreFunction.functionFalse(EvalContext context)
false() implementation.
|
protected java.lang.Object |
CoreFunction.functionFloor(EvalContext context)
floor() implementation.
|
private java.lang.Object |
CoreFunction.functionFormatNumber(EvalContext context)
format-number() implementation.
|
protected java.lang.Object |
CoreFunction.functionID(EvalContext context)
id() implementation.
|
protected java.lang.Object |
CoreFunction.functionKey(EvalContext context)
key() implementation.
|
protected java.lang.Object |
CoreFunction.functionLang(EvalContext context)
lang() implementation.
|
protected java.lang.Object |
CoreFunction.functionLast(EvalContext context)
last() implementation.
|
protected java.lang.Object |
CoreFunction.functionLocalName(EvalContext context)
local-name() implementation.
|
protected java.lang.Object |
CoreFunction.functionName(EvalContext context)
name() implementation.
|
protected java.lang.Object |
CoreFunction.functionNamespaceURI(EvalContext context)
namespace-uri() implementation.
|
protected java.lang.Object |
CoreFunction.functionNormalizeSpace(EvalContext context)
normalize-space() implementation.
|
protected java.lang.Object |
CoreFunction.functionNot(EvalContext context)
not() implementation.
|
protected java.lang.Object |
CoreFunction.functionNull(EvalContext context)
null() implementation.
|
protected java.lang.Object |
CoreFunction.functionNumber(EvalContext context)
number() implementation.
|
protected java.lang.Object |
CoreFunction.functionPosition(EvalContext context)
position() implementation.
|
protected java.lang.Object |
CoreFunction.functionRound(EvalContext context)
round() implementation.
|
protected java.lang.Object |
CoreFunction.functionStartsWith(EvalContext context)
starts-with() implementation.
|
protected java.lang.Object |
CoreFunction.functionString(EvalContext context)
string() implementation.
|
protected java.lang.Object |
CoreFunction.functionStringLength(EvalContext context)
string-length() implementation.
|
protected java.lang.Object |
CoreFunction.functionSubstring(EvalContext context)
substring() implementation.
|
protected java.lang.Object |
CoreFunction.functionSubstringAfter(EvalContext context)
substring-after() implementation.
|
protected java.lang.Object |
CoreFunction.functionSubstringBefore(EvalContext context)
substring-before() implementation.
|
protected java.lang.Object |
CoreFunction.functionSum(EvalContext context)
sum() implementation.
|
protected java.lang.Object |
CoreFunction.functionTranslate(EvalContext context)
translate() implementation.
|
protected java.lang.Object |
CoreFunction.functionTrue(EvalContext context)
true() implementation.
|
protected Pointer |
Path.getSingleNodePointerForSteps(EvalContext context)
Given a root context, walks a path therefrom and finds the
pointer to the first element matching the path.
|
java.util.Iterator |
Expression.iterate(EvalContext context)
Iterate over the values from the specified context.
|
java.util.Iterator |
Expression.iteratePointers(EvalContext context)
Iterate over the pointers from the specified context.
|
protected Pointer |
Path.searchForPath(EvalContext context)
The idea here is to return a NullPointer rather than null if that's at
all possible.
|