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
    --- | --- | ---
    `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.
    `NamespaceResolver` | `getNamespaceResolver()` | Get the namespace resolver in use by the Watch
    `PipelineConfiguration` | `getPipelineConfiguration()` | Get the pipeline configuration in use
    `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.
    `void` | `setNamespaceResolver​(NamespaceResolver resolver)` | Set a NamespaceResolver for use by the Watch
    `void` | `setPipelineConfiguration​(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`

- - ### 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

    - #### getPipelineConfiguration

          public final PipelineConfiguration getPipelineConfiguration()

      Get the pipeline configuration in use
      Specified by:
        `getPipelineConfiguration` in interface `Watch`
      Returns:
        the pipeline configuration

    - #### 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