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 |
---|---|
private Expression |
JXPathCompiledExpression.expression |
Modifier and Type | Method and Description |
---|---|
private Expression |
JXPathContextReferenceImpl.compileExpression(java.lang.String xpath)
Compile the given expression.
|
protected Expression |
JXPathCompiledExpression.getExpression()
Get the compiled expression.
|
Modifier and Type | Method and Description |
---|---|
private void |
JXPathContextReferenceImpl.checkSimplePath(Expression expr)
Checks if the path follows the JXPath restrictions on the type
of path that can be passed to create...
|
Pointer |
JXPathContextReferenceImpl.createPath(java.lang.String xpath,
Expression expr)
Create the given path.
|
Pointer |
JXPathContextReferenceImpl.createPathAndSetValue(java.lang.String xpath,
Expression expr,
java.lang.Object value)
Create the given path setting its value to value.
|
Pointer |
JXPathContextReferenceImpl.getPointer(java.lang.String xpath,
Expression expr)
Get a pointer to the specified path/expression.
|
java.lang.Object |
JXPathContextReferenceImpl.getValue(java.lang.String xpath,
Expression expr)
Get the value indicated.
|
java.lang.Object |
JXPathContextReferenceImpl.getValue(java.lang.String xpath,
Expression expr,
java.lang.Class requiredType)
Get the value indicated.
|
java.util.Iterator |
JXPathContextReferenceImpl.iterate(java.lang.String xpath,
Expression expr)
Traverses the xpath and returns a Iterator of all results found
for the path.
|
java.util.Iterator |
JXPathContextReferenceImpl.iteratePointers(java.lang.String xpath,
Expression expr)
Traverses the xpath and returns an Iterator of Pointers.
|
void |
JXPathContextReferenceImpl.removeAll(java.lang.String xpath,
Expression expr)
Remove all matching nodes.
|
void |
JXPathContextReferenceImpl.removePath(java.lang.String xpath,
Expression expr)
Remove the specified path.
|
void |
JXPathContextReferenceImpl.setValue(java.lang.String xpath,
Expression expr,
java.lang.Object value)
Set the value of xpath to value.
|
private Pointer |
JXPathContextReferenceImpl.setValue(java.lang.String xpath,
Expression expr,
java.lang.Object value,
boolean create)
Set the specified value.
|
Constructor and Description |
---|
JXPathCompiledExpression(java.lang.String xpath,
Expression expression)
Create a new JXPathCompiledExpression.
|
Modifier and Type | Field and Description |
---|---|
private Expression |
PredicateContext.expression |
private Expression |
PredicateContext.nameTestExpression |
Modifier and Type | Method and Description |
---|---|
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 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.
|
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 |
---|
PredicateContext(EvalContext parentContext,
Expression expression)
Create a new PredicateContext.
|
Modifier and Type | Class and Description |
---|---|
class |
Constant
A compile tree element containing a constant number or string.
|
class |
CoreFunction
An element of the compile tree representing one of built-in functions
like "position()" or "number()".
|
class |
CoreOperation
The common subclass for tree elements representing core operations like "+",
"- ", "*" etc.
|
class |
CoreOperationAdd
Implementation of
Expression for the operation "+". |
class |
CoreOperationAnd
Implementation of
Expression for the operation "and". |
class |
CoreOperationCompare
Common superclass for the implementations of Expression for the operations
"=" and "!=".
|
class |
CoreOperationDivide
Implementation of
Expression for the operation "div". |
class |
CoreOperationEqual
Implementation of
Expression for the operation "=". |
class |
CoreOperationGreaterThan
Implementation of
Expression for the operation ">". |
class |
CoreOperationGreaterThanOrEqual
Implementation of
Expression for the operation ">=". |
class |
CoreOperationLessThan
Implementation of
Expression for the operation "<". |
class |
CoreOperationLessThanOrEqual
Implementation of
Expression for the operation "<=". |
class |
CoreOperationMod
Implementation of
Expression for the operation "mod". |
class |
CoreOperationMultiply
Implementation of
Expression for the operation "*". |
class |
CoreOperationNegate
Implementation of
Expression for the operation unary "-". |
class |
CoreOperationNotEqual
Implementation of
Expression for the operation "!=". |
class |
CoreOperationOr
Implementation of
Expression for the operation "or". |
class |
CoreOperationRelationalExpression
Base implementation of Expression for the operations ">", ">=", "<", "<=".
|
class |
CoreOperationSubtract
Implementation of
Expression for the operation "-". |
class |
CoreOperationUnion
Implementation of
Expression for the operation "|". |
class |
ExpressionPath
An element of the parse tree that represents an expression path, which is a
path that starts with an expression like a function call:
getFoo(.)
/bar . |
class |
ExtensionFunction
Represents an element of the parse tree representing an extension function
call.
|
class |
LocationPath |
class |
NameAttributeTest
Captures the
foo[@name=expr] expression. |
class |
Operation |
class |
Path |
class |
VariableReference
An element of the compile tree holding a variable reference.
|
Modifier and Type | Field and Description |
---|---|
protected Expression[] |
Operation.args
Expression[] of arguments
|
private Expression |
ExpressionPath.expression |
private Expression[] |
ExpressionPath.predicates |
private Expression[] |
Step.predicates |
Modifier and Type | Method and Description |
---|---|
Expression |
CoreFunction.getArg1()
Convenience method to return the first argument.
|
Expression |
CoreFunction.getArg2()
Convenience method to return the second argument.
|
Expression |
CoreFunction.getArg3()
Convenience method to return the third argument.
|
Expression[] |
Operation.getArguments()
Get the arguments.
|
Expression |
ExpressionPath.getExpression()
Get the expression.
|
Expression |
NameAttributeTest.getNameTestExpression()
Get the name test expression.
|
Expression[] |
ExpressionPath.getPredicates()
Predicates are the expressions in brackets that may follow
the root expression of the path.
|
Expression[] |
Step.getPredicates()
Get the predicates.
|
private Expression[] |
TreeCompiler.toExpressionArray(java.lang.Object[] array)
Get an Object[] as an Expression[].
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
Path.areBasicPredicates(Expression[] predicates)
Learn whether the elements of the specified array are "basic" predicates.
|
protected boolean |
CoreOperationCompare.equal(EvalContext context,
Expression left,
Expression right)
Compares two values.
|
private boolean |
TreeCompiler.isNameAttributeTest(Expression arg)
Learn whether arg is a name attribute test.
|
private java.lang.String |
CoreOperation.parenthesize(Expression expression,
boolean left)
Wrap an expression in parens if necessary.
|
Constructor and Description |
---|
CoreFunction(int functionCode,
Expression[] args)
Create a new CoreFunction.
|
CoreOperation(Expression[] args)
Create a new CoreOperation.
|
CoreOperationAdd(Expression[] args)
Create a new CoreOperationAdd.
|
CoreOperationAnd(Expression[] args)
Create a new CoreOperationAnd.
|
CoreOperationCompare(Expression arg1,
Expression arg2)
Create a new CoreOperationCompare.
|
CoreOperationCompare(Expression arg1,
Expression arg2,
boolean invert)
Create a new CoreOperationCompare.
|
CoreOperationDivide(Expression arg1,
Expression arg2)
Create a new CoreOperationDivide.
|
CoreOperationEqual(Expression arg1,
Expression arg2)
Create a new CoreOperationEqual
|
CoreOperationGreaterThan(Expression arg1,
Expression arg2)
Create a new CoreOperationGreaterThan.
|
CoreOperationGreaterThanOrEqual(Expression arg1,
Expression arg2)
Create a new CoreOperationGreaterThanOrEqual.
|
CoreOperationLessThan(Expression arg1,
Expression arg2)
Create a new CoreOperationLessThan.
|
CoreOperationLessThanOrEqual(Expression arg1,
Expression arg2)
Create a new CoreOperationLessThanOrEqual.
|
CoreOperationMod(Expression arg1,
Expression arg2)
Create a new CoreOperationMod.
|
CoreOperationMultiply(Expression arg1,
Expression arg2)
Create a new CoreOperationMultiply.
|
CoreOperationNegate(Expression arg)
Create a new CoreOperationNegate.
|
CoreOperationNotEqual(Expression arg1,
Expression arg2)
Create a new CoreOperationNotEqual.
|
CoreOperationOr(Expression[] args)
Create a new CoreOperationOr.
|
CoreOperationRelationalExpression(Expression[] args)
Create a new CoreOperationRelationalExpression.
|
CoreOperationSubtract(Expression arg1,
Expression arg2)
Create a new CoreOperationSubtract.
|
CoreOperationUnion(Expression[] args)
Create a new CoreOperationUnion.
|
ExpressionPath(Expression expression,
Expression[] predicates,
Step[] steps)
Create a new ExpressionPath.
|
ExpressionPath(Expression expression,
Expression[] predicates,
Step[] steps)
Create a new ExpressionPath.
|
ExtensionFunction(QName functionName,
Expression[] args)
Create a new ExtensionFunction.
|
NameAttributeTest(Expression namePath,
Expression nameValue)
Create a new NameAttributeTest.
|
Operation(Expression[] args)
Create a new Operation.
|
Step(int axis,
NodeTest nodeTest,
Expression[] predicates)
Create a new Step.
|