com.saxonica.validate

## Class ConstraintChecker

- java.lang.Object
- - net.sf.saxon.event.SequenceReceiver
  - - net.sf.saxon.event.ProxyReceiver
    - - com.saxonica.stream.watch.WatchManager
      - - com.saxonica.validate.ConstraintChecker

- All Implemented Interfaces:
    Result, Receiver, NamespaceResolver

      public class ConstraintChecker
      extends WatchManager

  This class handles the checking of Schema-defined unique, key, and keyref constraints. It keeps track of the nesting of elements, and notifies a Watcher class when an element is found that matches a particular Selector.

- - ### Field Summary

    - ### Fields inherited from class com.saxonica.stream.watch.WatchManager

      `activeWatchStack, elementStackTop, watchList`

    - ### Fields inherited from class net.sf.saxon.event.ProxyReceiver

      `nextReceiver`

    - ### Fields inherited from class net.sf.saxon.event.SequenceReceiver

      `pipelineConfiguration, previousAtomic, systemId`

    - ### Fields inherited from interface javax.xml.transform.Result

      `PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConstraintChecker(Receiver next)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addPrearrangedWatches()`
    `ValidationContext` | `getValidationContext()`
    `void` | `setElementDeclaration(ElementDecl decl)` setElementDeclaration is called immediately before the call on startElement.
    `void` | `setPipelineConfiguration(PipelineConfiguration pipe)` Set the pipeline configuration
    `void` | `setValidationContext(ValidationContext vc)`

    - ### Methods inherited from class com.saxonica.stream.watch.WatchManager

      `addWatch, attribute, characters, comment, endDocument, endElement, getAccumulatorWatchMap, getDocumentNode, getURIForPrefix, getXPathContext, iteratePrefixes, namespace, processingInstruction, setAccumulatorWatchMap, setStartTagBuffer, setXPathContext, startContent, startDocument, startElement, usesTypeAnnotations`

    - ### Methods inherited from class net.sf.saxon.event.ProxyReceiver

      `append, close, getNamePool, getUnderlyingReceiver, open, setSystemId, setUnderlyingReceiver, setUnparsedEntity`

    - ### Methods inherited from class net.sf.saxon.event.SequenceReceiver

      `append, getConfiguration, getPipelineConfiguration, getSystemId`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConstraintChecker

          public ConstraintChecker(Receiver next)

  - ### Method Detail

    - #### setValidationContext

          public void setValidationContext(ValidationContext vc)

    - #### getValidationContext

          public ValidationContext getValidationContext()

    - #### setPipelineConfiguration

          public void setPipelineConfiguration(PipelineConfiguration pipe)

      Description copied from interface: `Receiver`
      Set the pipeline configuration
      Specified by:
        `setPipelineConfiguration` in interface `Receiver`
      Overrides:
        `setPipelineConfiguration` in class `ProxyReceiver`
      Parameters:
        `pipe` - the pipeline configuration

    - #### setElementDeclaration

          public void setElementDeclaration(ElementDecl decl)
                                     throws XPathException

      setElementDeclaration is called immediately before the call on startElement. It identifies the element declaration that defines the just-started element, which in turn is used to create a Watch for constraints originating at this element.
      Parameters:
        `decl` - the element declaration
      Throws:
        `XPathException` - if an error occurs

    - #### addPrearrangedWatches

          protected void addPrearrangedWatches()
                                        throws XPathException

      Overrides:
        `addPrearrangedWatches` in class `WatchManager`
      Throws:
        `XPathException`

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.