Package com.saxonica.ee.stream
Class ManualGroupIterator
java.lang.Object
net.sf.saxon.tree.iter.ManualIterator
com.saxonica.ee.stream.ManualGroupIterator
- All Implemented Interfaces:
Closeable
,AutoCloseable
,LastPositionFinder
,GroupIterator
,FocusIterator
,SequenceIterator
,GroundedIterator
,LookaheadIterator
,ReversibleIterator
The class ManualGroupIterator represents an iterator that is never repositioned, but can
be used to represent the focus in the dynamic context. It is used as a snapshot copy of a real
grouping iterator for use when asynchronous threads are forked, as in xsl:result-document; the
purpose of taking a snapshot is to ensure that changes to the base iterator in one thread do not
affect the focus of another thread. It is also used when streaming with xsl:fork, which involves
pseudo-parallel processing of groups.
-
Constructor Summary
ConstructorsConstructorDescriptionManualGroupIterator
(Item item, int position) Create a manual grouping iterator -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendToCurrentGroup
(Item item) Get a sequence containing the members of the current group, in population order.boolean
currentGroupContains
(NodeInfo node) Get the grouping key of the current groupgetSnapShot
(XPathContext context) Get a pseudo-iterator which represents a snapshot of this sequence at the current positionvoid
setCurrentGroup
(GroundedValue group) void
void
startNewCurrentGroup
(Item item) Methods inherited from class net.sf.saxon.tree.iter.ManualIterator
current, getLength, getResidue, getReverseIterator, hasNext, incrementPosition, isActuallyGrounded, materialize, next, position, setContextItem, setLengthFinder, setPosition, supportsGetLength, supportsHasNext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.saxon.om.SequenceIterator
close, next
-
Constructor Details
-
ManualGroupIterator
Create a manual grouping iterator- Parameters:
item
- the context itemposition
- the context position
-
-
Method Details
-
getSnapShot
Description copied from interface:GroupIterator
Get a pseudo-iterator which represents a snapshot of this sequence at the current position- Specified by:
getSnapShot
in interfaceGroupIterator
- Parameters:
context
- the XPath context- Returns:
- the snapshot sequence
-
setCurrentGroupingKey
-
getCurrentGroupingKey
Description copied from interface:GroupIterator
Get the grouping key of the current group- Specified by:
getCurrentGroupingKey
in interfaceGroupIterator
- Returns:
- the current grouping key in the case of group-by or group-adjacent, or null in the case of group-starting-with and group-ending-with
-
setCurrentGroup
-
appendToCurrentGroup
-
startNewCurrentGroup
-
currentGroup
Description copied from interface:GroupIterator
Get a sequence containing the members of the current group, in population order. This may be a MemoSequence rather than a grounded value- Specified by:
currentGroup
in interfaceGroupIterator
- Returns:
- a sequence containing all the members of the current group, in population order.
- Throws:
XPathException
- if a dynamic error occurs
-
currentGroupContains
- Throws:
XPathException
-