public abstract class FrontendDefaultHandler extends org.xml.sax.helpers.DefaultHandler implements Configuration
Modifier and Type | Field and Description |
---|---|
private CommentHandler |
commentHandler
The current comment handler used to receive xml comments.
|
static java.lang.String |
CONTENTBASE_KEY
A key for the content base.
|
private org.xml.sax.Locator |
locator
The DocumentLocator can be used to resolve the current parse position.
|
private DefaultConfiguration |
parserConfiguration
Storage for the parser configuration.
|
Modifier | Constructor and Description |
---|---|
protected |
FrontendDefaultHandler()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a clone of this instance.
|
java.util.Iterator |
findPropertyKeys(java.lang.String prefix)
Returns all keys with the given prefix.
|
CommentHandler |
getCommentHandler()
Returns the comment handler that is used to collect comments.
|
java.util.Enumeration |
getConfigProperties()
Returns the configuration properties.
|
java.lang.String |
getConfigProperty(java.lang.String key)
Returns the configuration property with the specified key.
|
java.lang.String |
getConfigProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the configuration property with the specified key (or the specified default value
if there is no such property).
|
java.net.URL |
getContentBase()
Gets the ContentBase used to resolve relative URLs.
|
org.xml.sax.Locator |
getLocator()
Returns the current locator.
|
abstract java.lang.Object |
getResult()
Returns the parse result.
|
abstract FrontendDefaultHandler |
newInstance()
Returns a new instance of the parser.
|
void |
setConfigProperty(java.lang.String key,
java.lang.String value)
Sets a parser configuration value.
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
Receive an object for locating the origin of SAX document events.
|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
public static final java.lang.String CONTENTBASE_KEY
private DefaultConfiguration parserConfiguration
private org.xml.sax.Locator locator
private final CommentHandler commentHandler
public CommentHandler getCommentHandler()
public void setDocumentLocator(org.xml.sax.Locator locator)
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.
setDocumentLocator
in interface org.xml.sax.ContentHandler
setDocumentLocator
in class org.xml.sax.helpers.DefaultHandler
locator
- the locator.public org.xml.sax.Locator getLocator()
public java.lang.String getConfigProperty(java.lang.String key)
getConfigProperty
in interface Configuration
key
- the property key.public java.lang.String getConfigProperty(java.lang.String key, java.lang.String defaultValue)
If the property is not defined in this configuration, the code will lookup the property in the parent configuration.
getConfigProperty
in interface Configuration
key
- the property key.defaultValue
- the default value.public void setConfigProperty(java.lang.String key, java.lang.String value)
key
- the key.value
- the value.public java.util.Enumeration getConfigProperties()
getConfigProperties
in interface Configuration
public abstract FrontendDefaultHandler newInstance()
public java.util.Iterator findPropertyKeys(java.lang.String prefix)
findPropertyKeys
in interface Configuration
prefix
- the prefixpublic abstract java.lang.Object getResult() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- if something went wrong.public java.net.URL getContentBase()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface Configuration
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if there is a problem cloning.