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
public abstract class AbstractWatch extends java.lang.Object implements Watch
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 Constructor Description AbstractWatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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.NamespaceResolvergetNamespaceResolver()Get the namespace resolver in use by the WatchPipelineConfigurationgetPipelineConfiguration()Get 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.voidsetNamespaceResolver(NamespaceResolver resolver)Set a NamespaceResolver for use by the WatchvoidsetPipelineConfiguration(PipelineConfiguration pipe)Set the PipelineConfiguration in use-
Methods 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
-
-
-
-
Method Detail
-
setPipelineConfiguration
public final void setPipelineConfiguration(PipelineConfiguration pipe)
Set the PipelineConfiguration in use- Specified by:
setPipelineConfigurationin interfaceWatch- Parameters:
pipe- the PipelineConfiguration in use
-
getPipelineConfiguration
public final PipelineConfiguration getPipelineConfiguration()
Get the pipeline configuration in use- Specified by:
getPipelineConfigurationin interfaceWatch- Returns:
- the pipeline configuration
-
setNamespaceResolver
public final void setNamespaceResolver(NamespaceResolver resolver)
Set a NamespaceResolver for use by the Watch- Specified by:
setNamespaceResolverin interfaceWatch- Parameters:
resolver- the namespace resolver to be used
-
getNamespaceResolver
public final NamespaceResolver getNamespaceResolver()
Get the namespace resolver in use by the Watch- Specified by:
getNamespaceResolverin interfaceWatch- Returns:
- the namespace resolver
-
open
public void open(Terminator terminator) throws XPathException
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-- Throws:
XPathException- May be raised if a dynamic error occurs
-
processItem
public void processItem(Item item) throws XPathException
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
public void close() throws XPathExceptionThe 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
-
-