public class KeyFn extends SystemFunctionCall
| Modifier and Type | Class and Description |
|---|---|
static class |
KeyFn.SubtreeFilter
Mapping class to filter nodes that have the origin node as an ancestor-or-self
|
operationargumentEFFECTIVE_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 |
|---|
KeyFn() |
| Modifier and Type | Method and Description |
|---|---|
PathMap.PathMapNodeSet |
addToPathMap(PathMap pathMap,
PathMap.PathMapNodeSet pathMapNodeSet)
Add a representation of a doc() call or similar function to a PathMap.
|
Sequence |
call(XPathContext context,
Sequence[] arguments)
Evaluate the expression
|
void |
checkArguments(ExpressionVisitor visitor)
Method called during static type checking
|
int |
computeSpecialProperties()
Get the static properties of this expression (other than its type).
|
Expression |
copy()
Copy an expression.
|
boolean |
equals(Object o)
Determine whether two expressions are equivalent
|
ExpressionCompiler |
getExpressionCompiler()
Return the compiler of the KeyFn expression
|
boolean |
getInternal() |
KeyManager |
getKeyManager() |
NamespaceResolver |
getNamespaceResolver() |
StructuredQName |
getStaticKeyName()
Get the key name, if known statically.
|
KeyDefinitionSet |
getStaticKeySet() |
static KeyFn |
internalKeyCall(KeyManager keyManager,
KeyDefinitionSet keySet,
String name,
Expression value,
Expression doc)
Non-standard constructor to create an internal call on key() with a known key definition
|
SequenceIterator |
iterate(XPathContext context)
Enumerate the results of the expression
|
Expression |
preEvaluate(ExpressionVisitor visitor)
preEvaluate: this method suppresses compile-time evaluation by doing nothing
|
Expression |
simplify(ExpressionVisitor visitor)
Simplify: add a third implicit argument, the context document
|
Expression |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Type-check the expression.
|
addContextDocumentArgument, addDocToPathMap, bindStaticContext, computeCardinality, equalOrNull, getContextNode, getConvertingCallable, getDefaultArgumentNode, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getImplementationMethod, getItemType, getOperation, getRequiredType, makeSystemFunction, operands, optimize, setDetails, toShortString, useContextItemAsDefaultaddExternalFunctionCallToPathMap, checkArgumentCount, explain, getArguments, getDisplayName, getExpressionName, getFunctionName, getNumberOfArguments, hashCode, promote, replaceOperand, setArguments, setFunctionName, simplifyArguments, toStringadoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getConfiguration, getConstructType, getContainer, getDependencies, getEvaluationMethod, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLocationId, getObjectName, getPosture, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getStreamability, getStreamingAdjunct, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isIdentical, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, setPostureAndSweep, staticTypeCheck, suppressValidation, toPattern, toStreamingPattern, typeError, unorderedpublic StructuredQName getStaticKeyName()
public KeyDefinitionSet getStaticKeySet()
public KeyManager getKeyManager()
public boolean getInternal()
public NamespaceResolver getNamespaceResolver()
public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
typeCheck in class FunctionCallvisitor - an expression visitorcontextInfo - Information available statically about the context item: whether it is (possibly)
absent; its static type; its streaming posture.XPathException - if an error is discovered during this phase
(typically a type error)public static KeyFn internalKeyCall(KeyManager keyManager, KeyDefinitionSet keySet, String name, Expression value, Expression doc)
keySet - the set of KeyDefinitions (always a single KeyDefinition)name - the name allocated to the key (first argument of the function)value - the value being searched for (second argument of the function)doc - the document being searched (third argument)public Expression simplify(ExpressionVisitor visitor) throws XPathException
simplify in class Expressionvisitor - the expression visitorXPathException - if an error is discovered during expression
rewritingpublic void checkArguments(ExpressionVisitor visitor) throws XPathException
SystemFunctionCallcheckArguments in class SystemFunctionCallvisitor - the expression visitorXPathException - if the arguments are incorrectpublic int computeSpecialProperties()
computeSpecialProperties in class SystemFunctionCallpublic Expression preEvaluate(ExpressionVisitor visitor)
preEvaluate in class FunctionCallvisitor - the expression visitorpublic PathMap.PathMapNodeSet addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
addToPathMap in class ExpressionpathMap - the PathMap to which the expression should be addedpathMapNodeSet - the PathMapNodeSet to which the paths embodied in this expression should be addedpublic Expression copy()
copy in class SystemFunctionCallpublic boolean equals(Object o)
equals in class SystemFunctionCallpublic SequenceIterator iterate(XPathContext context) throws XPathException
iterate in class Expressioncontext - supplies the context for evaluationXPathException - if any dynamic error occurs evaluating the
expressionpublic ExpressionCompiler getExpressionCompiler()
getExpressionCompiler in class Expressionpublic Sequence call(XPathContext context, Sequence[] arguments) throws XPathException
context - the dynamic evaluation contextarguments - the values of the arguments, supplied as SequencesXPathException - if a dynamic error occurs during the evaluation of the expressionCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.