public class Trigger extends PatternWatch
Constructor and Description |
---|
Trigger(Pattern selection,
Feed action) |
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.
|
Feed |
getAction()
Get the Feed representing the pipeline of operations performed by this Trigger
|
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.
|
Receiver |
startSelectedParentNode(FleetingParentNode node,
int locationId)
Signal that an element or document node 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 Feed getAction()
public void open(Terminator terminator) throws XPathException
open
in interface Watch
open
in class PatternWatch
terminator
- the callback to be used to signal early exitXPathException
- May be raised if a dynamic error occurspublic Receiver startSelectedParentNode(FleetingParentNode node, int 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)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 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 close() throws XPathException
close
in interface Watch
close
in class PatternWatch
XPathException
- May be raised if a dynamic error occursCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.