Interface Handler

All Known Subinterfaces:
AttributeHandler, DocumentHandler, ElementHandler
All Known Implementing Classes:
DelegatingHandler, DocumentHandlerImpl, ElementHandlerImpl, HandlerImpl

public interface Handler
Class implementing this interface serve has handlers for content of an instance document as it is parsed.

A handler is repsonsible for parsing and validating content. Upon a successful parse and validation, the handler must return the "parsed" content from a call to #getValue.

A handler corresponds to a specific component in a schema. Processing is delegated to the handler when an instance of the component is encountered in an instance document.

Author:
Justin Deoliveira,Refractions Research Inc.,jdeolive@refractions.net
  • Method Details

    • getSchemaContent

      XSDSchemaContent getSchemaContent()
      Returns:
      The entity of the schema that corresponds to the handler.
    • getComponent

      InstanceComponent getComponent()
      Returns:
      The instance of the schema content that is currently being handled.
    • getParseNode

      Node getParseNode()
      Returns:
      The parse tree for the handler.
    • getContext

      MutablePicoContainer getContext()
      Returns:
      The context or container in which the instance is to be parsed in.
    • setContext

      void setContext(MutablePicoContainer context)
      Parameters:
      context - The context in which the the instance is to be parsed in.
    • getParentHandler

      Handler getParentHandler()
      Returns:
      The parent handler.
      See Also:
      • Handler#getChildHandler(QName, SchemaBuilder)
    • createChildHandler

      Handler createChildHandler(QName qName)
      Returns a handler for a component in the schema which is a child of this component.

      This method will return null in two situations:

      1. The schema component being handled does not support children (for example, an attribute).
      2. A child with the specified qName could not be found.
      Parameters:
      qName - The qualified name of the schema component.
      Returns:
      A new handler, or null if one cannot be created.
    • startChildHandler

      void startChildHandler(Handler child)
      Called when a child handler is started, on the leading edge of the child element.
      Parameters:
      child - The executing child handler.
    • endChildHandler

      void endChildHandler(Handler child)
      Called when a child handler is finished, on the trailing edge of the child element.
      Parameters:
      child - The executing child handler.
    • startPrefixMapping

      void startPrefixMapping(String prefix, String uri) throws SAXException
      Called when a prefix mapping is registred with ParserHandler.
      Parameters:
      prefix - Namespace prefix.
      uri - Namespace uri.
      Throws:
      SAXException
    • endPrefixMapping

      void endPrefixMapping(String prefix) throws SAXException
      Called when a prefix mapping is de-registred with ParserHandler.
      Parameters:
      prefix - Namespace prefix.
      Throws:
      SAXException