public class XPathPathExpr extends XPathExpression
| Modifier and Type | Field and Description |
|---|---|
XPathFilterExpr |
filtExpr |
int |
init_context |
static int |
INIT_CONTEXT_EXPR |
static int |
INIT_CONTEXT_RELATIVE |
static int |
INIT_CONTEXT_ROOT |
XPathStep[] |
steps |
| Constructor and Description |
|---|
XPathPathExpr() |
XPathPathExpr(int init_context,
XPathStep[] steps) |
XPathPathExpr(XPathFilterExpr filtExpr,
XPathStep[] steps) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
XPathNodeset |
eval(DataInstance unusedDataInstance,
EvaluationContext ec) |
static XPathPathExpr |
fromRef(TreeReference ref) |
TreeReference |
getReference()
translate an xpath path reference into a TreeReference
TreeReferences only support a subset of true xpath paths; restrictions are:
simple child name tests 'child::name', '.', and '..' allowed only
no predicates
all '..' steps must come before anything else
|
static Object |
getRefValue(DataInstance model,
EvaluationContext ec,
TreeReference ref) |
boolean |
matches(XPathExpression o)
Warning: this method has somewhat unclear semantics.
|
Object |
pivot(DataInstance model,
EvaluationContext evalContext,
List<Object> pivots,
Object sentinal)
Pivot this expression, returning values if appropriate, and adding any pivots to the list.
|
void |
readExternal(DataInputStream in,
PrototypeFactory pf) |
String |
toString() |
static Object |
unpackValue(IAnswerData val) |
void |
writeExternal(DataOutputStream out) |
eval, hashCode, pivot, print, printParseTreepublic static final int INIT_CONTEXT_ROOT
public static final int INIT_CONTEXT_RELATIVE
public static final int INIT_CONTEXT_EXPR
public int init_context
public XPathStep[] steps
public XPathFilterExpr filtExpr
public XPathPathExpr()
public XPathPathExpr(int init_context,
XPathStep[] steps)
public XPathPathExpr(XPathFilterExpr filtExpr, XPathStep[] steps)
public TreeReference getReference() throws XPathUnsupportedException
XPathUnsupportedExceptionpublic XPathNodeset eval(DataInstance unusedDataInstance, EvaluationContext ec)
eval in class XPathExpressionpublic static Object getRefValue(DataInstance model, EvaluationContext ec, TreeReference ref)
public static Object unpackValue(IAnswerData val)
public boolean matches(XPathExpression o)
even though they are not equal.
Matching is reflexive, consistent, and symmetric, but _not_ transitive.
o - public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException
IOExceptionDeserializationExceptionpublic void writeExternal(DataOutputStream out) throws IOException
IOExceptionpublic static XPathPathExpr fromRef(TreeReference ref)
public Object pivot(DataInstance model, EvaluationContext evalContext, List<Object> pivots, Object sentinal) throws UnpivotableExpressionException
XPathExpressionpivot in class XPathExpressionmodel - The model to evaluate the current expression againstevalContext - The evaluation context to evaluate againstpivots - The list of pivot points in the xpath being evaluated. Pivots should be added to this list.sentinal - The value which is being pivoted around.UnpivotableExpressionException - If the expression is too complex to pivotCopyright © 2022. All rights reserved.