Class 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.
  • Constructor Details

  • Method Details

    • 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 WatchManager
      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
    • startElement

      public void startElement(NodeName elementName, SchemaType typeCode, AttributeMap attributes, NamespaceMap namespaces, Location location, int properties) throws XPathException
      Description copied from class: WatchManager
      Output element start tag
      Specified by:
      startElement in interface Receiver
      Overrides:
      startElement in class WatchManager
      Parameters:
      elementName - the name of the element.
      typeCode - the type annotation of the element.
      attributes - the attributes of this element
      namespaces - the in-scope namespaces of this element: generally this is all the in-scope namespaces, without relying on inheriting namespaces from parent elements
      location - an object providing information about the module, line, and column where the node originated
      properties - bit-significant properties of the element node. If there are no relevant properties, zero is supplied. The definitions of the bits are in class ReceiverOption
      Throws:
      XPathException - if an error occurs
    • endElement

      public void endElement() throws XPathException
      Description copied from class: WatchManager
      Notify end of element
      Specified by:
      endElement in interface Receiver
      Overrides:
      endElement in class WatchManager
      Throws:
      XPathException - if an error occurs
    • isSkipValidation

      protected boolean isSkipValidation()
      Overrides:
      isSkipValidation in class WatchManager