org.jbind.xml.instance.builder
Class ImplBuilder

java.lang.Object
  extended byorg.jbind.xml.instance.builder.ImplBuilder
All Implemented Interfaces:
IContentHandler, IErrorHandler, IImplBuilder

public class ImplBuilder
extends java.lang.Object
implements IImplBuilder, IContentHandler, IErrorHandler

Builds implementation documents.


Constructor Summary
ImplBuilder(org.xml.sax.EntityResolver anEntityResolver, IDataImplFactory anImplFactory, IDataBuilder aDataBuilder, IDataValidator aDataValidator, IDataContext aDataContext)
           
 
Method Summary
 IDocumentImpl buildDocument(org.xml.sax.InputSource anInputSource)
           
 IDocumentImpl buildDocument(java.net.URL aUrl)
          Builds a data document.
 void endDocument(org.xml.sax.InputSource anInputSource, INamespaceContext aNamespaceContext)
          Signals the end of a document.
 void endElement(QualifiedName aQName, java.util.Map anAttributes, int aLine, int aColumn, org.xml.sax.InputSource anInputSource, INamespaceContext aNamespaceContext)
          Signals the end of an element.
 void endXInclude()
          Signals the end of an XInclude.
 boolean error(IMessage aMessage)
          Signals an error.
 void exception(java.lang.Exception anException, org.xml.sax.InputSource anInputSource)
          Signals that an exception occured.
 void fatalError(IMessage aMessage)
          Signals a fatal error.
 void startDocument(org.xml.sax.InputSource anInputSource, INamespaceContext aNamespaceContext)
          Signals the start of a document.
 void startElement(QualifiedName aQName, java.util.Map anAttributes, int aLine, int aColumn, org.xml.sax.InputSource anInputSource, INamespaceContext aNamespaceContext)
          Signals the start of an element.
 void startXInclude(java.lang.String aParseMethod, java.net.URL aUrl, java.lang.String aFragementId)
          Signals that an XInclude started.
 void text(java.lang.String aString, int aLine, int aColumn, org.xml.sax.InputSource anInputSource, INamespaceContext aNamespaceContext)
          Signals text.
 boolean warning(IMessage aMessage)
          Signals a warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImplBuilder

public ImplBuilder(org.xml.sax.EntityResolver anEntityResolver,
                   IDataImplFactory anImplFactory,
                   IDataBuilder aDataBuilder,
                   IDataValidator aDataValidator,
                   IDataContext aDataContext)
Method Detail

buildDocument

public IDocumentImpl buildDocument(java.net.URL aUrl)
                            throws XmlException
Description copied from interface: IImplBuilder
Builds a data document.

Specified by:
buildDocument in interface IImplBuilder
Parameters:
aUrl - (required).
Returns:
(required).
Throws:
XmlException - Raised iff the no valid document can be returned.

buildDocument

public IDocumentImpl buildDocument(org.xml.sax.InputSource anInputSource)
                            throws XmlException
Specified by:
buildDocument in interface IImplBuilder
Throws:
XmlException

startDocument

public void startDocument(org.xml.sax.InputSource anInputSource,
                          INamespaceContext aNamespaceContext)
Description copied from interface: IContentHandler
Signals the start of a document.

Specified by:
startDocument in interface IContentHandler
Parameters:
anInputSource - (required).
aNamespaceContext - (required).

endDocument

public void endDocument(org.xml.sax.InputSource anInputSource,
                        INamespaceContext aNamespaceContext)
Description copied from interface: IContentHandler
Signals the end of a document.

Specified by:
endDocument in interface IContentHandler
Parameters:
anInputSource - (required).
aNamespaceContext - (required).

startElement

public void startElement(QualifiedName aQName,
                         java.util.Map anAttributes,
                         int aLine,
                         int aColumn,
                         org.xml.sax.InputSource anInputSource,
                         INamespaceContext aNamespaceContext)
                  throws java.lang.Exception
Description copied from interface: IContentHandler
Signals the start of an element.

Specified by:
startElement in interface IContentHandler
Parameters:
aQName - (required). The name of the element.
anAttributes - (required). Maps IQNames to AttributeData.
aLine - The current line.
aColumn - The current column.
anInputSource - (required).
aNamespaceContext - (required).
Throws:
java.lang.Exception

endElement

public void endElement(QualifiedName aQName,
                       java.util.Map anAttributes,
                       int aLine,
                       int aColumn,
                       org.xml.sax.InputSource anInputSource,
                       INamespaceContext aNamespaceContext)
                throws java.lang.Exception
Description copied from interface: IContentHandler
Signals the end of an element.

Specified by:
endElement in interface IContentHandler
Parameters:
aQName - (required). The name of the element.
anAttributes - (required). Maps IQNames to AttributeData.
aLine - The current line.
aColumn - The current column.
anInputSource - (required).
aNamespaceContext - (required).
Throws:
java.lang.Exception

text

public void text(java.lang.String aString,
                 int aLine,
                 int aColumn,
                 org.xml.sax.InputSource anInputSource,
                 INamespaceContext aNamespaceContext)
          throws java.lang.Exception
Description copied from interface: IContentHandler
Signals text.

Specified by:
text in interface IContentHandler
Parameters:
aString - (required).
aLine - The current line.
aColumn - The current column.
anInputSource - (required).
aNamespaceContext - (required).
Throws:
java.lang.Exception

startXInclude

public void startXInclude(java.lang.String aParseMethod,
                          java.net.URL aUrl,
                          java.lang.String aFragementId)
Description copied from interface: IContentHandler
Signals that an XInclude started.

Specified by:
startXInclude in interface IContentHandler
Parameters:
aParseMethod - (required). There are 3 possible values:
  1. "xml"
  2. "text"
  3. "fallback": This type is used to indicate a content handler that a resource could not be included but that its fallback content is going to be used.
aUrl - (required). The resource that is included or that could not be accessed (in case that the parse method is "fallback"). A content handler may use this URL for example to generate xml:base attributes for included elements.

endXInclude

public void endXInclude()
Description copied from interface: IContentHandler
Signals the end of an XInclude.

Specified by:
endXInclude in interface IContentHandler

fatalError

public void fatalError(IMessage aMessage)
Description copied from interface: IErrorHandler
Signals a fatal error. The parser stops imediately to report any further events.

Specified by:
fatalError in interface IErrorHandler
Parameters:
aMessage - (required).

error

public boolean error(IMessage aMessage)
Description copied from interface: IErrorHandler
Signals an error.

Specified by:
error in interface IErrorHandler
Parameters:
aMessage - (required).
Returns:
If true is returned then the parsing is aborted otherwise the parsing is continued.

warning

public boolean warning(IMessage aMessage)
Description copied from interface: IErrorHandler
Signals a warning.

Specified by:
warning in interface IErrorHandler
Parameters:
aMessage - (required).
Returns:
If true is returned then the parsing is aborted otherwise the parsing is continued.

exception

public void exception(java.lang.Exception anException,
                      org.xml.sax.InputSource anInputSource)
Description copied from interface: IErrorHandler
Signals that an exception occured. The parser stops imediately to report any further events.

Specified by:
exception in interface IErrorHandler
Parameters:
anException - (required).
anInputSource - (required). The source that is parsed.