An abstract factory used to create individual path component objects.
createAbsoluteLocationPath
public LocationPath createAbsoluteLocationPath()
throws JaxenException
Create a new empty absolute location path.
- an empty absolute location path
createAdditiveExpr
public BinaryExpr createAdditiveExpr(Expr lhs,
Expr rhs,
int additiveOperator)
throws JaxenException
Returns a new XPath additive expression.
lhs
- the left hand side of the expressionrhs
- the right hand side of the expressionadditiveOperator
- Operator.ADD
or Operator.SUBTRACT
JaxenException
- if the third argument is not
Operator.ADD
or Operator.SUBTRACT
createAllNodeStep
public Step createAllNodeStep(int axis)
throws JaxenException
Create a step with a node() node-test.
axis
- the axis to create the node-test on
createAndExpr
public BinaryExpr createAndExpr(Expr lhs,
Expr rhs)
throws JaxenException
Returns a new XPath And expression.
lhs
- the left hand side of the expressionrhs
- the right hand side of the expression
createCommentNodeStep
public Step createCommentNodeStep(int axis)
throws JaxenException
Create a step with a comment()
node-test.
axis
- the axis to create the comment()
node-test on
createEqualityExpr
public BinaryExpr createEqualityExpr(Expr lhs,
Expr rhs,
int equalityOperator)
throws JaxenException
Returns a new XPath equality expression.
lhs
- the left hand side of the expressionrhs
- the right hand side of the expressionequalityOperator
- Operator.EQUALS
or Operator.NOT_EQUALS
JaxenException
- if the third argument is not
Operator.EQUALS
or Operator.NOT_EQUALS
createFilterExpr
public FilterExpr createFilterExpr(Expr expr)
throws JaxenException
Returns a new XPath filter expression.
expr
- the basic expression to which the predicate will be added
- the expression with an empty predicate set
createFunctionCallExpr
public FunctionCallExpr createFunctionCallExpr(String prefix,
String functionName)
throws JaxenException
Create a new function call expression.
prefix
- the namespace prefix of the functionfunctionName
- the local name of the function
- a function with an empty argument list
createLiteralExpr
public LiteralExpr createLiteralExpr(String literal)
throws JaxenException
Create a string literal expression.
- a literal expression wrapping that value
createMultiplicativeExpr
public BinaryExpr createMultiplicativeExpr(Expr lhs,
Expr rhs,
int multiplicativeOperator)
throws JaxenException
Returns a new XPath multiplicative expression.
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 constant
createNameStep
public Step createNameStep(int axis,
String prefix,
String localName)
throws JaxenException
Create a step with a named node-test.
axis
- the axis to create the name-test onprefix
- the namespace prefix for the testlocalName
- the local name for the test
createNumberExpr
public NumberExpr createNumberExpr(double number)
throws JaxenException
Create a number expression.
- a number expression wrapping that value
createNumberExpr
public NumberExpr createNumberExpr(int number)
throws JaxenException
Create a number expression.
- a number expression wrapping that value
createOrExpr
public BinaryExpr createOrExpr(Expr lhs,
Expr rhs)
throws JaxenException
Returns a new XPath Or expression.
lhs
- the left hand side of the expressionrhs
- the right hand side of the expression
createPathExpr
public PathExpr createPathExpr(FilterExpr filterExpr,
LocationPath locationPath)
throws JaxenException
Create a new path expression.
filterExpr
- the filter expression that starts the path expressionlocationPath
- the location path that follows the filter expression
- a path expression formed by concatenating the two arguments
createPredicate
public Predicate createPredicate(Expr predicateExpr)
throws JaxenException
Create from the supplied expression.
predicateExpr
- the expression to evaluate in the predicate
createProcessingInstructionNodeStep
public Step createProcessingInstructionNodeStep(int axis,
String name)
throws JaxenException
Create a step with a processing-instruction()
node-test.
axis
- the axis to create the processing-instruction()
node-test onname
- the target to match, may be empty
- a processing instruction node step
createRelationalExpr
public BinaryExpr createRelationalExpr(Expr lhs,
Expr rhs,
int relationalOperator)
throws JaxenException
Returns a new XPath relational expression.
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 constant
createRelativeLocationPath
public LocationPath createRelativeLocationPath()
throws JaxenException
Create a new empty relative location path.
- an empty relative location path
createTextNodeStep
public Step createTextNodeStep(int axis)
throws JaxenException
Create a step with a text()
node-test.
axis
- the axis to create the text()
node-test on
createUnaryExpr
public Expr createUnaryExpr(Expr expr,
int unaryOperator)
throws JaxenException
Returns a new XPath unary expression.
expr
- the expression to be negatedunaryOperator
- Operator.NEGATIVE
createUnionExpr
public UnionExpr createUnionExpr(Expr lhs,
Expr rhs)
throws JaxenException
Returns a new XPath union expression.
lhs
- the left hand side of the expressionrhs
- the right hand side of the expression
createVariableReferenceExpr
public VariableReferenceExpr createVariableReferenceExpr(String prefix,
String variableName)
throws JaxenException
Create a new variable reference expression.
prefix
- the namespace prefix of the variablevariableName
- the local name of the variable
createXPath
public XPathExpr createXPath(Expr rootExpr)
throws JaxenException
Create a new XPathExpr
from an Expr
.
rootExpr
- the expression wrapped by the resuolting XPathExpr
- an XPathExpr wrapping the root expression