public class BooleanExpressionPattern extends Pattern
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
Constructor and Description |
---|
BooleanExpressionPattern(Expression expression)
Create a BooleanExpressionPattern
|
Modifier and Type | Method and Description |
---|---|
int |
allocateSlots(SlotManager slotManager,
int nextFree)
Allocate slots to any variables used within the pattern
|
Pattern |
copy()
Copy a pattern.
|
boolean |
equals(Object other)
Determine whether this pattern is the same as another pattern
|
void |
export(ExpressionPresenter presenter)
Diagnostic print of expression structure.
|
Expression |
getExpression() |
int |
getFingerprint()
Determine the name fingerprint of nodes to which this pattern applies.
|
ItemType |
getItemType()
Get an Itemtype that all the items matching this pattern must satisfy
|
UType |
getUType()
Get a UType indicating which kinds of items this Pattern can match.
|
int |
hashCode()
Hashcode supporting equals()
|
Iterator<Expression> |
iterateSubExpressions()
Iterate over the subexpressions within this pattern
|
boolean |
matches(Item item,
XPathContext context)
Determine whether this Pattern matches the given item.
|
Iterable<Operand> |
operands()
Get the immediate sub-expressions of this expression, with information about the relationship
of each expression to its parent expression.
|
String |
toString()
Display the pattern for diagnostics
|
Pattern |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Type-check the pattern.
|
bindCurrent, convertToTypedPattern, effectiveBooleanValue, getDefaultPriority, getDependencies, getHostLanguage, isMotionless, make, matchesBeneathAnchor, optimize, promote, replaceCurrent, selectNodes, setOriginalText, setPriority, simplify
computeCardinality, evaluateAsString, evaluateItem, getImplementationMethod, iterate, iterateEvents, process
addToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeDependencies, computeSpecialProperties, computeStaticProperties, doPromotion, dynamicError, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getCost, getEvaluationMethod, getExpressionCompiler, getExpressionName, getIntegerBounds, getIntrinsicDependencies, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getPosture, getPostureAndSweepIfKnown, getProperties, getProperty, getRetainedStaticContext, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStreamability, getStreamingAdjunct, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, makeStreamingAdjunct, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, optimizeForType, promote, promoteChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setFiltered, setFlattened, setLocation, setParentExpression, setPostureAndSweep, setRetainedStaticContext, setRetainedStaticContextLocally, setStaticProperty, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toStreamingPattern, typeCheckChildren, typeError, unordered
public BooleanExpressionPattern(Expression expression)
expression
- the expression to be evaluated (the expression in the predicate)public Iterable<Operand> operands()
If the expression is a Callable, then it is required that the order of the operands returned by this function is the same as the order of arguments supplied to the corresponding call() method.
operands
in class Expression
public UType getUType()
public int allocateSlots(SlotManager slotManager, int nextFree)
allocateSlots
in class Pattern
slotManager
- holds details of the allocated slotsnextFree
- the next slot that is free to be allocated @return the next slot that is free to be allocatedpublic Iterator<Expression> iterateSubExpressions()
iterateSubExpressions
in class Pattern
public Pattern typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
typeCheck
in class Pattern
visitor
- the expression visitorcontextItemType
- the type of the context item at the point where the pattern
is defined. Set to null if it is known that the context item is undefined.XPathException
- if an error is discovered during this phase
(typically a type error)public boolean matches(Item item, XPathContext context)
matches
in class Pattern
item
- The item to be tested against the Patterncontext
- The context in which the match is to take place. Only relevant if the pattern
uses variables, or contains calls on functions such as document() or key().public ItemType getItemType()
getItemType
in class Pattern
public int getFingerprint()
getFingerprint
in class Pattern
public String toString()
public boolean equals(Object other)
public Pattern copy()
public void export(ExpressionPresenter presenter)
Expression
public Expression getExpression()
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.