public abstract class CollatingFunction extends SystemFunctionCall
Modifier and Type | Field and Description |
---|---|
protected StringCollator |
staticCollation |
operation
argument
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD
Constructor and Description |
---|
CollatingFunction() |
Modifier and Type | Method and Description |
---|---|
void |
bindStaticContext(StaticContext env)
Bind aspects of the static context on which the particular function depends
|
void |
checkArguments(ExpressionVisitor visitor)
Method called during static type checking
|
Expression |
copy()
Copy an expression.
|
boolean |
equals(Object o)
Determine whether two expressions are equivalent
|
static String |
expandCollationURI(String collationName,
URI expressionBaseURI)
Expand a collation URI, which may be a relative URI reference
|
AtomicComparer |
getAtomicComparer(StringCollator collator,
XPathContext context)
During evaluation, get the pre-allocated atomic comparer if available, or allocate a new one otherwise
|
protected abstract int |
getCollationArgument()
Get the argument position (0-based) containing the collation name
|
StringCollator |
getCollator(XPathContext context)
Get a collator suitable for comparing strings.
|
protected StringCollator |
getCollatorFromLastArgument(Sequence[] arguments,
int arg,
XPathContext context)
Get a collator suitable for comparing strings.
|
URI |
getExpressionBaseURI()
Get the saved static base URI
|
AtomicComparer |
getPreAllocatedAtomicComparer()
Get the pre-allocated atomic comparer, if available
|
StringCollator |
getStaticCollation()
Get the collation if known statically, as a StringCollator object
|
protected void |
preAllocateComparer(AtomicType type0,
AtomicType type1,
StaticContext env,
boolean NaNequalsNaN)
During static analysis, if types are known and the collation is known, pre-allocate a comparer
for comparing atomic values.
|
addContextDocumentArgument, addDocToPathMap, computeCardinality, computeSpecialProperties, equalOrNull, getContextNode, getConvertingCallable, getDefaultArgumentNode, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getImplementationMethod, getItemType, getOperation, getRequiredType, makeSystemFunction, operands, optimize, setDetails, toShortString, useContextItemAsDefault
addExternalFunctionCallToPathMap, checkArgumentCount, explain, getArguments, getDisplayName, getExpressionName, getFunctionName, getNumberOfArguments, hashCode, preEvaluate, promote, replaceOperand, setArguments, setFunctionName, simplifyArguments, toString, typeCheck
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getConfiguration, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExpressionCompiler, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLocationId, getObjectName, getPosture, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getStreamability, getStreamingAdjunct, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isIdentical, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, setPostureAndSweep, simplify, staticTypeCheck, suppressValidation, toPattern, toStreamingPattern, typeError, unordered
protected StringCollator staticCollation
public void bindStaticContext(StaticContext env) throws XPathException
bindStaticContext
in class SystemFunctionCall
env
- the static context of the function callXPathException
- if execution with this static context will inevitably failprotected abstract int getCollationArgument()
public void checkArguments(ExpressionVisitor visitor) throws XPathException
SystemFunctionCall
checkArguments
in class SystemFunctionCall
visitor
- the expression visitorXPathException
- if the arguments are incorrectpublic URI getExpressionBaseURI()
public StringCollator getStaticCollation()
public Expression copy()
copy
in class SystemFunctionCall
public boolean equals(Object o)
equals
in class SystemFunctionCall
public StringCollator getCollator(XPathContext context) throws XPathException
This method is used only when evaluating static function calls.
context
- The dynamic contextXPathException
- if a failure occurs evaluating the collation argument, or if the
specified collation is not recognizedprotected StringCollator getCollatorFromLastArgument(Sequence[] arguments, int arg, XPathContext context) throws XPathException
This method is used only when evaluating dynamic function calls.
arguments
- The arguments supplied to the function callarg
- The position of the argument (base 0) containing the collation namecontext
- The dynamic contextXPathException
- if a failure occurs evaluating the collation argument, or if the
specified collation is not recognizedpublic static String expandCollationURI(String collationName, URI expressionBaseURI) throws XPathException
collationName
- the collation URI as providedexpressionBaseURI
- the base URI against which the collation URI will be resolved if it is relativeXPathException
- if the collation URI cannot be resolvedprotected void preAllocateComparer(AtomicType type0, AtomicType type1, StaticContext env, boolean NaNequalsNaN)
type0
- the type of the first comparandtype1
- the type of the second comparandenv
- the static contextNaNequalsNaN
- true if two NaN values are to be considered equalpublic AtomicComparer getPreAllocatedAtomicComparer()
public AtomicComparer getAtomicComparer(StringCollator collator, XPathContext context)
collator
- the collation for stringscontext
- the dynamic evaluation contextCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.