Package com.saxonica.ee.stream.watch
Class AbstractWatch
java.lang.Object
com.saxonica.ee.stream.watch.AbstractWatch
- All Implemented Interfaces:
Watch
- Direct Known Subclasses:
PatternWatch
,StreamWatch
A Watch represents a class that is interested in looking at nodes for the purpose
of evaluating uniqueness and key constraints, or for XSLT streaming.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.final NamespaceResolver
Get the namespace resolver in use by the Watchfinal PipelineConfiguration
Get the pipeline configuration in usevoid
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.final void
setNamespaceResolver
(NamespaceResolver resolver) Set a NamespaceResolver for use by the Watchfinal void
Set the PipelineConfiguration in useMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.saxonica.ee.stream.watch.Watch
endSelectedParentNode, getAnchorNode, matchesNode, matchesNodesOfKind, setAnchorNode, startSelectedParentNode
-
Constructor Details
-
AbstractWatch
public AbstractWatch()
-
-
Method Details
-
setPipelineConfiguration
Set the PipelineConfiguration in use- Specified by:
setPipelineConfiguration
in interfaceWatch
- Parameters:
pipe
- the PipelineConfiguration in use
-
getPipelineConfiguration
Get the pipeline configuration in use- Specified by:
getPipelineConfiguration
in interfaceWatch
- Returns:
- the pipeline configuration
-
setNamespaceResolver
Set a NamespaceResolver for use by the Watch- Specified by:
setNamespaceResolver
in interfaceWatch
- Parameters:
resolver
- the namespace resolver to be used
-
getNamespaceResolver
Get the namespace resolver in use by the Watch- Specified by:
getNamespaceResolver
in interfaceWatch
- Returns:
- the namespace resolver
-
open
Open the watch. This is done at the point where it first starts watching for nodes that match the selection.- Specified by:
open
in interfaceWatch
- Parameters:
terminator
- action to be taken on failure- Throws:
XPathException
- May be raised if a dynamic error occurs
-
processItem
Signal that a node (other than an element) that matches the selection has been found.- Specified by:
processItem
in interfaceWatch
- Parameters:
item
- the node that was matched.- Throws:
XPathException
- May be raised if a dynamic error occurs
-
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. The default implementation does nothing.- Specified by:
close
in interfaceWatch
- Throws:
XPathException
- May be raised if a dynamic error occurs
-