jgb.builder
Interface Builder

All Superinterfaces:
org.xml.sax.ContentHandler, WindowContext
All Known Implementing Classes:
DefaultBuilder

public interface Builder
extends org.xml.sax.ContentHandler, WindowContext


Method Summary
 void addResolver(org.xml.sax.EntityResolver resolver)
          Adds an EntityResolver through which this Builder should try to resolve entities before letting the default handling do it's job.
 Component build(org.xml.sax.InputSource in)
          Initiates building of the objects by reading the specified InputSource.
 Component build(InputStream in)
          Initiates building of the objects by reading the specified InputStream.
 void setLoggingStream(PrintWriter logStream)
          Specifies the stream to which warnings, errors, fatal errors and elements should be reported.
 void setQuiet(boolean quiet)
          Initiates or terminates quiet mode.
 void setVerbose(boolean verbose)
          Makes the Builder more verbose than normal.
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 
Methods inherited from interface jgb.builder.WindowContext
getObject
 

Method Detail

setQuiet

public void setQuiet(boolean quiet)
Initiates or terminates quiet mode.

When in quiet mode, the Builder will not report any messages to the logging stream. By default, the Builder is NOT quiet.

This attribute is mutually exclusive with verbose.

Parameters:
quiet - true to make the Builder quiet, false otherwise.

setVerbose

public void setVerbose(boolean verbose)
Makes the Builder more verbose than normal.

If the Builder is verbose, it should log all start and end elements to the logging stream.

This attribute is mutually exclusive with quiet.

Parameters:
verbose - true to make the Builder verbose, false otherwise.

build

public Component build(InputStream in)
                throws IOException,
                       org.xml.sax.SAXException
Initiates building of the objects by reading the specified InputStream. This stream will be parsed as an XML file. The parser used to parse the file will be validating.

Throws:
org.xml.sax.SAXException - If a parser could not be instantiated, or a build error occurs.
IOException - If an I/O error occurs while reading the stream.
IllegalArgumentException - If the input stream is null.

build

public Component build(org.xml.sax.InputSource in)
                throws IOException,
                       org.xml.sax.SAXException
Initiates building of the objects by reading the specified InputSource. The parser used to parse the source will be validating.

Throws:
org.xml.sax.SAXException - If a parser could not be instantiated, or a build error occurs.
IOException - If an I/O error occurs while reading the stream.
IllegalArgumentException - If the input source is null.

setLoggingStream

public void setLoggingStream(PrintWriter logStream)
Specifies the stream to which warnings, errors, fatal errors and elements should be reported.

Parameters:
logStream - The stream to which information will be sent.

addResolver

public void addResolver(org.xml.sax.EntityResolver resolver)
Adds an EntityResolver through which this Builder should try to resolve entities before letting the default handling do it's job.

Parameters:
resolver - An EntityResolver that will be used while building the window.


Copyright 2002-2003, François Beausoleil, All Rights Reserved