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 TypeMethodDescriptionvoidclose()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 NamespaceResolverGet the namespace resolver in use by the Watchfinal PipelineConfigurationGet the pipeline configuration in usevoidopen(Terminator terminator) Open the watch.voidprocessItem(Item item) Signal that a node (other than an element) that matches the selection has been found.final voidsetNamespaceResolver(NamespaceResolver resolver) Set a NamespaceResolver for use by the Watchfinal voidSet the PipelineConfiguration in useMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
setPipelineConfigurationin interfaceWatch- Parameters:
pipe- the PipelineConfiguration in use
-
getPipelineConfiguration
Get the pipeline configuration in use- Specified by:
getPipelineConfigurationin interfaceWatch- Returns:
- the pipeline configuration
-
setNamespaceResolver
Set a NamespaceResolver for use by the Watch- Specified by:
setNamespaceResolverin interfaceWatch- Parameters:
resolver- the namespace resolver to be used
-
getNamespaceResolver
Get the namespace resolver in use by the Watch- Specified by:
getNamespaceResolverin 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:
openin 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:
processItemin 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:
closein interfaceWatch- Throws:
XPathException- May be raised if a dynamic error occurs
-