public class AccumulatorWatch extends PatternWatch
| Constructor and Description |
|---|
AccumulatorWatch(Accumulator accumulator) |
| 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(Location locationId)
Signal that the endElement event has occurred for the element whose startElement
event caused the Watch to be activated.
|
Accumulator |
getAccumulator() |
XPathContext |
getContext() |
FleetingNode |
getLastPredescentNode() |
Sequence<?> |
getPostDescentValue(FleetingNode node) |
Sequence<?> |
getPreDescentValue(FleetingNode node) |
Sequence<?> |
getPreDescentValueAtDepth(int depth) |
boolean |
isBeingComputed() |
void |
open(Terminator terminator)
Open the watch.
|
void |
processItem(Item<?> item)
Signal that a node (other than an element) that matches the selection
has been found.
|
void |
setNodeStack(java.util.Stack<FleetingNode> stack) |
void |
setWatchManager(WatchManager watchManager) |
Receiver |
startSelectedParentNode(FleetingParentNode node,
Location locationId)
Signal that an element has been found that matches the selection that this
Watch is looking for.
|
getAnchorNode, getSelection, matchesNode, matchesNodesOfKind, setAnchorNode, setSelectiongetNamespaceResolver, getPipelineConfiguration, getReceiver, setNamespaceResolver, setPipelineConfigurationpublic AccumulatorWatch(Accumulator accumulator)
public void setNodeStack(java.util.Stack<FleetingNode> stack)
public Accumulator getAccumulator()
public XPathContext getContext()
public FleetingNode getLastPredescentNode()
public void open(Terminator terminator) throws XPathException
PatternWatchopen in interface Watchopen in class PatternWatchXPathException - May be raised if a dynamic error occurspublic void setWatchManager(WatchManager watchManager)
public Receiver startSelectedParentNode(FleetingParentNode node, Location locationId) throws XPathException
node - the element or document node whose start event has been matchedlocationId - the location associated with the element or document node (may be
the location of the instruction that created it)ValidationException - May be raised if the constraint implemented by this
Watch is violated @param locationId the location of the node in the source, or of the instruction that created itXPathException - May be raised if a dynamic error occurspublic boolean isBeingComputed()
public void processItem(Item<?> item) throws XPathException
processItem in interface WatchprocessItem in class PatternWatchitem - the node that was matched.XPathException - May be raised if a dynamic error occurspublic void endSelectedParentNode(Location locationId) throws XPathException
locationId - the location of the parsing eventValidationException - May be raised if the constraint implemented by this
Watch is violated @param locationId the location of the node in the source, or of the instruction that created itXPathException - May be raised if a constraint implemented by this
Watch is violatedpublic void close()
throws XPathException
PatternWatchclose in interface Watchclose in class PatternWatchXPathException - May be raised if a dynamic error occurspublic Sequence<?> getPreDescentValue(FleetingNode node) throws XPathException
XPathExceptionpublic Sequence<?> getPreDescentValueAtDepth(int depth) throws XPathException
XPathExceptionpublic Sequence<?> getPostDescentValue(FleetingNode node) throws XPathException
XPathExceptionCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.