public interface XPathFactory
Modifier and Type | Method and Description |
---|---|
LocationPath |
createAbsoluteLocationPath()
Create a new empty absolute location path.
|
BinaryExpr |
createAdditiveExpr(Expr lhs,
Expr rhs,
int additiveOperator)
Returns a new XPath additive expression.
|
Step |
createAllNodeStep(int axis)
Create a step with a node() node-test.
|
BinaryExpr |
createAndExpr(Expr lhs,
Expr rhs)
Returns a new XPath And expression.
|
Step |
createCommentNodeStep(int axis)
Create a step with a
comment() node-test. |
BinaryExpr |
createEqualityExpr(Expr lhs,
Expr rhs,
int equalityOperator)
Returns a new XPath equality expression.
|
FilterExpr |
createFilterExpr(Expr expr)
Returns a new XPath filter expression.
|
FunctionCallExpr |
createFunctionCallExpr(String prefix,
String functionName)
Create a new function call expression.
|
LiteralExpr |
createLiteralExpr(String literal)
Create a string literal expression.
|
BinaryExpr |
createMultiplicativeExpr(Expr lhs,
Expr rhs,
int multiplicativeOperator)
Returns a new XPath multiplicative expression.
|
Step |
createNameStep(int axis,
String prefix,
String localName)
Create a step with a named node-test.
|
NumberExpr |
createNumberExpr(double number)
Create a number expression.
|
NumberExpr |
createNumberExpr(int number)
Create a number expression.
|
BinaryExpr |
createOrExpr(Expr lhs,
Expr rhs)
Returns a new XPath Or expression.
|
PathExpr |
createPathExpr(FilterExpr filterExpr,
LocationPath locationPath)
Create a new path expression.
|
Predicate |
createPredicate(Expr predicateExpr)
Create from the supplied expression.
|
PredicateSet |
createPredicateSet()
Create an empty predicate set.
|
Step |
createProcessingInstructionNodeStep(int axis,
String name)
Create a step with a
processing-instruction() node-test. |
BinaryExpr |
createRelationalExpr(Expr lhs,
Expr rhs,
int relationalOperator)
Returns a new XPath relational expression.
|
LocationPath |
createRelativeLocationPath()
Create a new empty relative location path.
|
Step |
createTextNodeStep(int axis)
Create a step with a
text() node-test. |
Expr |
createUnaryExpr(Expr expr,
int unaryOperator)
Returns a new XPath unary expression.
|
UnionExpr |
createUnionExpr(Expr lhs,
Expr rhs)
Returns a new XPath union expression.
|
VariableReferenceExpr |
createVariableReferenceExpr(String prefix,
String variableName)
Create a new variable reference expression.
|
XPathExpr |
createXPath(Expr rootExpr)
Create a new
XPathExpr from an Expr . |
XPathExpr createXPath(Expr rootExpr) throws JaxenException
XPathExpr
from an Expr
.rootExpr
- the expression wrapped by the resulting XPathExprJaxenException
- if expression evaluation failsPathExpr createPathExpr(FilterExpr filterExpr, LocationPath locationPath) throws JaxenException
filterExpr
- the filter expression that starts the path expressionlocationPath
- the location path that follows the filter expressionJaxenException
- if expression evaluation failsLocationPath createRelativeLocationPath() throws JaxenException
JaxenException
- neverLocationPath createAbsoluteLocationPath() throws JaxenException
JaxenException
- neverBinaryExpr createOrExpr(Expr lhs, Expr rhs) throws JaxenException
lhs
- the left hand side of the expressionrhs
- the right hand side of the expressionlhs or rhs
JaxenException
- if expression evaluation failsBinaryExpr createAndExpr(Expr lhs, Expr rhs) throws JaxenException
lhs
- the left hand side of the expressionrhs
- the right hand side of the expressionlhs and rhs
JaxenException
- if expression evaluation failsBinaryExpr createEqualityExpr(Expr lhs, Expr rhs, int equalityOperator) throws JaxenException
lhs
- the left hand side of the expressionrhs
- the right hand side of the expressionequalityOperator
- Operator.EQUALS
or Operator.NOT_EQUALS
lhs = rhs
or lhs != rhs
JaxenException
- if the third argument is not
Operator.EQUALS
or Operator.NOT_EQUALS
BinaryExpr createRelationalExpr(Expr lhs, Expr rhs, int relationalOperator) throws JaxenException
lhs
- the left hand side of the expressionrhs
- the right hand side of the expressionrelationalOperator
- Operator.LESS_THAN
, Operator.GREATER_THAN
,
Operator.LESS_THAN_EQUALS
, or Operator.GREATER_THAN_EQUALS
lhs relationalOperator rhs
or lhs != rhs
JaxenException
- if the third argument is not a relational operator constantBinaryExpr createAdditiveExpr(Expr lhs, Expr rhs, int additiveOperator) throws JaxenException
lhs
- the left hand side of the expressionrhs
- the right hand side of the expressionadditiveOperator
- Operator.ADD
or Operator.SUBTRACT
lhs + rhs
or lhs - rhs
JaxenException
- if the third argument is not
Operator.ADD
or Operator.SUBTRACT
BinaryExpr createMultiplicativeExpr(Expr lhs, Expr rhs, int multiplicativeOperator) throws JaxenException
lhs
- the left hand side of the expressionrhs
- the right hand side of the expressionmultiplicativeOperator
- Operator.MULTIPLY
,
Operator.DIV
, or Operator.MOD
lhs * rhs
, lhs div rhs
,
or lhs mod rhs
JaxenException
- if the third argument is not a multiplicative operator constantExpr createUnaryExpr(Expr expr, int unaryOperator) throws JaxenException
expr
- the expression to be negatedunaryOperator
- Operator.NEGATIVE
- expr
or expr
JaxenException
- if expression evaluation failsUnionExpr createUnionExpr(Expr lhs, Expr rhs) throws JaxenException
lhs
- the left hand side of the expressionrhs
- the right hand side of the expressionlhs | rhs
JaxenException
- if expression evaluation failsFilterExpr createFilterExpr(Expr expr) throws JaxenException
expr
- the basic expression to which the predicate will be addedJaxenException
- if expression evaluation failsFunctionCallExpr createFunctionCallExpr(String prefix, String functionName) throws JaxenException
prefix
- the namespace prefix of the functionfunctionName
- the local name of the functionJaxenException
- if expression evaluation failsNumberExpr createNumberExpr(int number) throws JaxenException
number
- the valueJaxenException
- if expression evaluation failsNumberExpr createNumberExpr(double number) throws JaxenException
number
- the valueJaxenException
- if expression evaluation failsLiteralExpr createLiteralExpr(String literal) throws JaxenException
literal
- the valueJaxenException
- if expression evaluation failsVariableReferenceExpr createVariableReferenceExpr(String prefix, String variableName) throws JaxenException
prefix
- the namespace prefix of the variablevariableName
- the local name of the variableJaxenException
- if expression evaluation failsStep createNameStep(int axis, String prefix, String localName) throws JaxenException
axis
- the axis to create the name-test onprefix
- the namespace prefix for the testlocalName
- the local name for the testJaxenException
- if axis
is not one of the axis constantsStep createAllNodeStep(int axis) throws JaxenException
axis
- the axis to create the node-test onJaxenException
- if axis
is not one of the axis constantsStep createCommentNodeStep(int axis) throws JaxenException
comment()
node-test.axis
- the axis to create the comment()
node-test onJaxenException
- if axis
is not one of the axis constantsStep createTextNodeStep(int axis) throws JaxenException
text()
node-test.axis
- the axis to create the text()
node-test onJaxenException
- if axis
is not one of the axis constantsStep createProcessingInstructionNodeStep(int axis, String name) throws JaxenException
processing-instruction()
node-test.axis
- the axis to create the processing-instruction()
node-test onname
- the target to match, may be emptyJaxenException
- if axis
is not one of the axis constantsPredicate createPredicate(Expr predicateExpr) throws JaxenException
predicateExpr
- the expression to evaluate in the predicateJaxenException
- if expression evaluation failsPredicateSet createPredicateSet() throws JaxenException
JaxenException
- neverCopyright 2001–2022 The Jaxen Project. All rights reserved.