Class CurrentGroupingKeyCall
- java.lang.Object
- 
- net.sf.saxon.expr.Expression
- 
- net.sf.saxon.functions.CurrentGroupingKeyCall
 
 
- 
- All Implemented Interfaces:
- Callable,- ExportAgent,- Locatable,- IdentityComparable,- Traceable
 
 public class CurrentGroupingKeyCall extends Expression implements Callable Implements the XSLT function current-grouping-key()
- 
- 
Field Summary- 
Fields inherited from class net.sf.saxon.expr.ExpressionEFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_COST, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
 
- 
 - 
Constructor SummaryConstructors Constructor Description CurrentGroupingKeyCall()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Sequencecall(XPathContext context, Sequence[] arguments)Call the Callable.protected intcomputeCardinality()Compute the static cardinality of this expressionExpressioncopy(RebindingMap rebindings)Copy an expression.voidexport(ExpressionPresenter out)Diagnostic print of expression structure.intgetImplementationMethod()An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().intgetIntrinsicDependencies()Determine the dependenciesItemTypegetItemType()Determine the data type of the expression, if possible.ExpressiongetScopingExpression()Get the innermost scoping expression of this expression, for expressions that directly depend on something in the dynamic context.SequenceIteratoriterate(XPathContext c)Evaluate the expression- 
Methods inherited from class net.sf.saxon.expr.ExpressionaddToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeHashCode, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, equals, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExpressionName, getExtraProperty, getIntegerBounds, getInterpretedExpression, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, getStreamerName, getTracingTag, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isInstruction, isLiftable, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operands, operandSparseList, optimize, optimizeChildren, prepareForStreaming, process, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheck, typeCheckChildren, typeError, unordered, verifyParentPointers
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface net.sf.saxon.trace.TraceablegatherProperties
 
- 
 
- 
- 
- 
Method Detail- 
getScopingExpressionpublic Expression getScopingExpression() Get the innermost scoping expression of this expression, for expressions that directly depend on something in the dynamic context. For example, in the case of a local variable reference this is the expression that causes the relevant variable to be bound; for a context item expression it is the innermost focus-setting container. For expressions that have no intrinsic dependency on the dynamic context, the value returned is null; the scoping container for such an expression is the innermost scoping container of its operands.- Overrides:
- getScopingExpressionin class- Expression
- Returns:
- the innermost scoping container of this expression
 
 - 
computeCardinalityprotected int computeCardinality() Compute the static cardinality of this expression- Specified by:
- computeCardinalityin class- Expression
- Returns:
- the computed cardinality, as one of the values StaticProperty.ALLOWS_ZERO_OR_ONE,StaticProperty.EXACTLY_ONE,StaticProperty.ALLOWS_ONE_OR_MORE,StaticProperty.ALLOWS_ZERO_OR_MORE
 
 - 
getImplementationMethodpublic int getImplementationMethod() An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process(). This method indicates which of these methods is provided directly. The other methods will always be available indirectly, using an implementation that relies on one of the other methods.- Specified by:
- getImplementationMethodin class- Expression
- Returns:
- the implementation method, for example Expression.ITERATE_METHODorExpression.EVALUATE_METHODorExpression.PROCESS_METHOD
 
 - 
getItemTypepublic ItemType getItemType() Determine the data type of the expression, if possible. All expression return sequences, in general; this method determines the type of the items within the sequence, assuming that (a) this is known in advance, and (b) it is the same for all items in the sequence.This method should always return a result, though it may be the best approximation that is available at the time. - Specified by:
- getItemTypein class- Expression
- Returns:
- a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE, or Type.ITEM (meaning not known at compile time)
 
 - 
exportpublic void export(ExpressionPresenter out) throws XPathException Diagnostic print of expression structure. The abstract expression tree is written to the supplied output destination.- Specified by:
- exportin interface- ExportAgent
- Specified by:
- exportin class- Expression
- Parameters:
- out- the expression presenter used to display the structure
- Throws:
- XPathException- if the export fails, for example if an expression is found that won't work in the target environment.
 
 - 
copypublic Expression copy(RebindingMap rebindings) Copy an expression. This makes a deep copy.- Specified by:
- copyin class- Expression
- Parameters:
- rebindings-
- Returns:
- the copy of the original expression
 
 - 
getIntrinsicDependenciespublic int getIntrinsicDependencies() Determine the dependencies- Overrides:
- getIntrinsicDependenciesin class- Expression
- Returns:
- a set of bit-significant flags identifying the "intrinsic" dependencies. The flags are documented in class net.sf.saxon.value.StaticProperty
 
 - 
iteratepublic SequenceIterator iterate(XPathContext c) throws XPathException Evaluate the expression- Overrides:
- iteratein class- Expression
- Parameters:
- c- supplies the context for evaluation
- Returns:
- a SequenceIterator that can be used to iterate over the result of the expression
- Throws:
- XPathException- if any dynamic error occurs evaluating the expression
 
 - 
callpublic Sequence call(XPathContext context, Sequence[] arguments) throws XPathException Call the Callable.- Specified by:
- callin interface- Callable
- Parameters:
- context- the dynamic evaluation context
- arguments- the values of the arguments, supplied as Sequences.- Generally it is advisable, if calling iterate() to process a supplied sequence, to call it only once; if the value is required more than once, it should first be converted to a - GroundedValueby calling the utility method SequenceTool.toGroundedValue().- If the expected value is a single item, the item should be obtained by calling Sequence.head(): it cannot be assumed that the item will be passed as an instance of - Itemor- AtomicValue.- It is the caller's responsibility to perform any type conversions required to convert arguments to the type expected by the callee. An exception is where this Callable is explicitly an argument-converting wrapper around the original Callable. 
- Returns:
- the result of the evaluation, in the form of a Sequence. It is the responsibility of the callee to ensure that the type of result conforms to the expected result type.
- Throws:
- XPathException- if a dynamic error occurs during the evaluation of the expression
 
 
- 
 
-