Class 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 Detail

      • AbstractWatch

        public AbstractWatch()
    • Method Detail

      • setPipelineConfiguration

        public final void setPipelineConfiguration​(PipelineConfiguration pipe)
        Set the PipelineConfiguration in use
        Specified by:
        setPipelineConfiguration in interface Watch
        Parameters:
        pipe - the PipelineConfiguration in use
      • setNamespaceResolver

        public final void setNamespaceResolver​(NamespaceResolver resolver)
        Set a NamespaceResolver for use by the Watch
        Specified by:
        setNamespaceResolver in interface Watch
        Parameters:
        resolver - the namespace resolver to be used
      • getNamespaceResolver

        public final NamespaceResolver getNamespaceResolver()
        Get the namespace resolver in use by the Watch
        Specified by:
        getNamespaceResolver in interface Watch
        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:
        open in interface Watch
        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:
        processItem in interface Watch
        Parameters:
        item - the node that was matched.
        Throws:
        XPathException - May be raised if a dynamic error occurs
      • close

        public void close()
                   throws XPathException
        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 interface Watch
        Throws:
        XPathException - May be raised if a dynamic error occurs