public abstract class GroupingWatch extends EventPushingWatch
Constructor and Description |
---|
GroupingWatch(GroupVariableReference expression,
Feed out,
Stack<XPathContext> contextStack) |
Modifier and Type | Method and Description |
---|---|
void |
close()
The close() method is called immediately before the Watch is destroyed, that is,
when the element whose declaration scopes the constraint implemented by this
Watch goes out of scope.
|
void |
endSelectedParentNode(int locationId)
Signal that the endElement event has occurred for the element whose startElement
event caused the Watch to be activated.
|
ForEachGroup |
getControllingExpression() |
protected XPathContext |
getLocalContext() |
protected abstract boolean |
isStartOfNewGroup(boolean atStart,
XPathContext context)
Determine whether the current item is the start of a new group
|
void |
open()
Called at the start of the for-each-group instruction
|
void |
setControllingExpression(ForEachGroup controllingExpression) |
void |
setOuterFeed(Feed out)
Set the outer feed; the feed to be notified (via its open() and close() methods)
of the start of the grouping population and the end of the grouping population
|
void |
setWatchManager(WatchManager watchManager) |
Receiver |
startSelectedParentNode(FleetingNode node,
int locationId)
Supply one item towards the streamed input of the expression (that is, one item of the grouping population)
|
getContext, getContextStack, getExpression, getParentExpressionFeed, getResult, setParentExpressionFeed
getAnchorNode, getNamespaceResolver, getPipelineConfiguration, getSelection, notifySelectedLeafNode, setAnchorNode, setNamespaceResolver, setPipelineConfiguration, setSelection
public GroupingWatch(GroupVariableReference expression, Feed out, Stack<XPathContext> contextStack)
public void setWatchManager(WatchManager watchManager)
public void setOuterFeed(Feed out)
out
- the outer feedprotected XPathContext getLocalContext()
public void setControllingExpression(ForEachGroup controllingExpression)
public ForEachGroup getControllingExpression()
public void open() throws XPathException
open
in interface Watch
open
in class EventPushingWatch
XPathException
public Receiver startSelectedParentNode(FleetingNode node, int locationId) throws XPathException
node
- the next item from the populationlocationId
- the location associated with the element or document node (may be
the location of the instruction that created it)XPathException
- May be raised if a dynamic error occurspublic void endSelectedParentNode(int locationId) throws XPathException
locationId
- the location of the elementXPathException
- May be raised if a constraint implemented by this
Watch is violatedpublic void close() throws XPathException
AbstractWatch
close
in interface Watch
close
in class EventPushingWatch
XPathException
protected abstract boolean isStartOfNewGroup(boolean atStart, XPathContext context) throws XPathException
atStart
- true if this item is the first in the populationcontext
- the evaluation context. The item in question will be the
context itemXPathException
- if a dynamic error occursCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.