public abstract class VennPattern extends Pattern
Modifier and Type | Field and Description |
---|---|
protected Pattern |
p1 |
protected Pattern |
p2 |
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 |
---|
VennPattern(Pattern p1,
Pattern p2)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
allocateSlots(SlotManager slotManager,
int nextFree)
Allocate slots to any variables used within the pattern
|
void |
bindCurrent(LocalBinding binding)
Replace any calls on current() by a variable reference bound to the supplied binding
|
int |
computeHashCode()
Hashcode supporting equals()
|
boolean |
equals(java.lang.Object other)
Determine whether this pattern is the same as another pattern
|
void |
export(ExpressionPresenter presenter)
Diagnostic print of expression structure.
|
void |
gatherComponentPatterns(java.util.Set<Pattern> set)
Gather the component (non-Venn) patterns of this Venn pattern
|
int |
getDependencies()
Get the dependencies of the pattern.
|
Pattern |
getLHS()
Get the LHS of the union
|
protected abstract java.lang.String |
getOperatorName()
Get the relevant operator: "union", "intersect", or "except"
|
Pattern |
getRHS()
Get the RHS of the union
|
boolean |
isMotionless()
Test whether a pattern is motionless, that is, whether it can be evaluated against a node
without repositioning the input stream.
|
boolean |
matchesCurrentGroup()
Ask whether the pattern is anchored on a call on current-group()
|
java.lang.Iterable<Operand> |
operands()
Get the immediate sub-expressions of this expression, with information about the relationship
of each expression to its parent expression.
|
void |
setOriginalText(java.lang.String pattern)
Set the original text
|
Pattern |
simplify()
Simplify the pattern: perform any context-independent optimisations
|
java.lang.String |
toString()
Get the original pattern text
|
Pattern |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Type-check the pattern.
|
convertToTypedPattern, copy, effectiveBooleanValue, getDefaultPriority, getFingerprint, getHostLanguage, getItemType, getUType, handleDynamicError, isLiftable, isRecoverable, make, matches, matchesBeneathAnchor, optimize, patternContainsVariable, replaceCurrent, selectNodes, setPriority, setRecoverable, toShortString
computeCardinality, evaluateAsString, evaluateItem, getImplementationMethod, iterate, process
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getCost, getEvaluationMethod, getExpressionName, getExtraProperty, getIntegerBounds, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, getStreamerName, hasCompatibleStaticContext, hashCode, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isInstruction, isMultiThreaded, isSameExpression, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, typeCheckChildren, typeError, unordered, verifyParentPointers, verifyParentPointers
public java.lang.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 Pattern simplify() throws XPathException
simplify
in class Pattern
XPathException
- if an error is discovered during expression
rewritingpublic 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 void bindCurrent(LocalBinding binding)
bindCurrent
in class Pattern
public void setOriginalText(java.lang.String pattern)
setOriginalText
in class Pattern
pattern
- the original text of the patternpublic boolean isMotionless()
isMotionless
in class Pattern
public int allocateSlots(SlotManager slotManager, int nextFree)
allocateSlots
in class Pattern
slotManager
- represents the stack frame on which slots are allocatednextFree
- the next slot that is free to be allocated @return the next slot that is free to be allocatedpublic void gatherComponentPatterns(java.util.Set<Pattern> set)
set
- the set into which the components will be addedpublic int getDependencies()
getDependencies
in class Pattern
public Pattern getLHS()
public Pattern getRHS()
public boolean matchesCurrentGroup()
matchesCurrentGroup
in class Pattern
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other objectpublic int computeHashCode()
computeHashCode
in class Expression
protected abstract java.lang.String getOperatorName()
public java.lang.String toString()
public void export(ExpressionPresenter presenter) throws XPathException
Expression
export
in interface ExportAgent
export
in class Pattern
presenter
- the expression presenter used to display the structureXPathException
- if the export fails, for example if an expression is found that won't work
in the target environment.Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.