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 |
getCurrentPredescentNode() |
FleetingNode |
getLastPredescentNode() |
Sequence |
getPostDescentValue() |
Sequence |
getPreDescentValue(FleetingNode node) |
Sequence |
getPreDescentValueAtDepth(int depth) |
boolean |
isDonePostDescent() |
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 |
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, setSelection
getNamespaceResolver, getPipelineConfiguration, getReceiver, setNamespaceResolver, setPipelineConfiguration
public AccumulatorWatch(Accumulator accumulator)
public Accumulator getAccumulator()
public XPathContext getContext()
public FleetingNode getLastPredescentNode()
public void open(Terminator terminator) throws XPathException
PatternWatch
open
in interface Watch
open
in class PatternWatch
XPathException
- 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 locationIdXPathException
- May be raised if a dynamic error occurspublic FleetingNode getCurrentPredescentNode()
public void processItem(Item item) throws XPathException
processItem
in interface Watch
processItem
in class PatternWatch
item
- the node that was matched.XPathException
- May be raised if a dynamic error occurspublic void endSelectedParentNode(Location locationId) throws XPathException
locationId
- ValidationException
- May be raised if the constraint implemented by this
Watch is violated @param locationIdXPathException
- May be raised if a constraint implemented by this
Watch is violatedpublic void close() throws XPathException
PatternWatch
close
in interface Watch
close
in class PatternWatch
XPathException
- May be raised if a dynamic error occurspublic Sequence getPreDescentValue(FleetingNode node) throws XPathException
XPathException
public Sequence getPreDescentValueAtDepth(int depth) throws XPathException
XPathException
public Sequence getPostDescentValue() throws XPathException
XPathException
public boolean isDonePostDescent()
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.