org.jfree.xml

Class FrontendDefaultHandler

public abstract class FrontendDefaultHandler extends DefaultHandler implements Configuration

The frontenddefault handler connects the SAX-backend with the handler implementations. It must be the base class for all parser implementations used by the ParserFrontEnd.

Author: Thomas Morgner

Field Summary
static StringCONTENTBASE_KEY
A key for the content base.
Constructor Summary
protected FrontendDefaultHandler()
Default constructor.
Method Summary
Objectclone()
IteratorfindPropertyKeys(String prefix)
Returns all keys with the given prefix.
CommentHandlergetCommentHandler()
Returns the comment handler that is used to collect comments.
EnumerationgetConfigProperties()
StringgetConfigProperty(String key)
Returns the configuration property with the specified key.
StringgetConfigProperty(String key, String defaultValue)
Returns the configuration property with the specified key (or the specified default value if there is no such property).
URLgetContentBase()
Gets the ContentBase used to resolve relative URLs.
LocatorgetLocator()
Returns the current locator.
abstract ObjectgetResult()
Returns the parse result.
abstract FrontendDefaultHandlernewInstance()
Returns a new instance of the parser.
voidsetConfigProperty(String key, String value)
Sets a parser configuration value.
voidsetDocumentLocator(Locator locator)
Receive an object for locating the origin of SAX document events.

Field Detail

CONTENTBASE_KEY

public static final String CONTENTBASE_KEY
A key for the content base.

Constructor Detail

FrontendDefaultHandler

protected FrontendDefaultHandler()
Default constructor.

Method Detail

clone

public Object clone()

findPropertyKeys

public Iterator findPropertyKeys(String prefix)
Returns all keys with the given prefix.

Parameters: prefix the prefix

Returns: the iterator containing all keys with that prefix

getCommentHandler

public CommentHandler getCommentHandler()
Returns the comment handler that is used to collect comments.

Returns: the comment handler.

getConfigProperties

public Enumeration getConfigProperties()

getConfigProperty

public String getConfigProperty(String key)
Returns the configuration property with the specified key.

Parameters: key the property key.

Returns: the property value.

getConfigProperty

public String getConfigProperty(String key, String defaultValue)
Returns the configuration property with the specified key (or the specified default value if there is no such property).

If the property is not defined in this configuration, the code will lookup the property in the parent configuration.

Parameters: key the property key. defaultValue the default value.

Returns: the property value.

getContentBase

public URL getContentBase()
Gets the ContentBase used to resolve relative URLs.

Returns: the current contentbase, or null if no contentBase is set.

getLocator

public Locator getLocator()
Returns the current locator.

Returns: the locator.

getResult

public abstract Object getResult()
Returns the parse result. This method is called at the end of the parsing process and expects the generated object.

Returns: the object.

Throws: SAXException if something went wrong.

newInstance

public abstract FrontendDefaultHandler newInstance()
Returns a new instance of the parser.

Returns: a new instance of the parser.

setConfigProperty

public void setConfigProperty(String key, String value)
Sets a parser configuration value.

Parameters: key the key. value the value.

setDocumentLocator

public void setDocumentLocator(Locator locator)
Receive an object for locating the origin of SAX document events.

The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine.

Parameters: locator the locator.