|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.apache.avalon.framework.configuration.SAXConfigurationHandler
org.apache.avalon.framework.configuration.NamespacedSAXConfigurationHandler
public class NamespacedSAXConfigurationHandler
A SAXConfigurationHandler helps build Configurations out of sax events, including namespace information.
| Field Summary | |
|---|---|
private static int |
EXPECTED_DEPTH
Likely number of nested configuration items. |
private org.apache.avalon.framework.configuration.Configuration |
m_configuration
|
private java.util.ArrayList |
m_elements
|
private org.xml.sax.Locator |
m_locator
|
private org.xml.sax.helpers.NamespaceSupport |
m_namespaceSupport
|
private java.util.ArrayList |
m_prefixes
|
private java.util.BitSet |
m_preserveSpace
Contains true at index n if space in the configuration with depth n is to be preserved. |
private java.util.ArrayList |
m_values
|
| Constructor Summary | |
|---|---|
NamespacedSAXConfigurationHandler()
|
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int end)
Handling hook for character data. |
void |
clear()
Clears all data from this configuration handler. |
protected DefaultConfiguration |
createConfiguration(java.lang.String localName,
java.lang.String namespaceURI,
java.lang.String location)
Create a new DefaultConfiguration with the specified
local name, namespace, and location. |
void |
endDocument()
Handling hook for ending the document parsing. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName)
Handling hook for finishing parsing of an element. |
void |
error(org.xml.sax.SAXParseException exception)
This just throws an exception on a parse error. |
void |
fatalError(org.xml.sax.SAXParseException exception)
This just throws an exception on a parse error. |
org.apache.avalon.framework.configuration.Configuration |
getConfiguration()
Get the configuration object that was built. |
protected java.lang.String |
getLocationString()
Returns a string showing the current system ID, line number and column number. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Set the document Locator to use. |
void |
startDocument()
Handling hook for starting the document parsing. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes attributes)
Handling hook for starting parsing of an element. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
Handling hook for starting prefix mapping. |
void |
warning(org.xml.sax.SAXParseException exception)
This just throws an exception on a parse error. |
| Methods inherited from class org.apache.avalon.framework.configuration.SAXConfigurationHandler |
|---|
createConfiguration |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int EXPECTED_DEPTH
private final java.util.ArrayList m_elements
private final java.util.ArrayList m_prefixes
private final java.util.ArrayList m_values
private final java.util.BitSet m_preserveSpace
private org.apache.avalon.framework.configuration.Configuration m_configuration
private org.xml.sax.Locator m_locator
private org.xml.sax.helpers.NamespaceSupport m_namespaceSupport
| Constructor Detail |
|---|
public NamespacedSAXConfigurationHandler()
| Method Detail |
|---|
public org.apache.avalon.framework.configuration.Configuration getConfiguration()
getConfiguration in class SAXConfigurationHandlerConfiguration objectpublic void clear()
clear in class SAXConfigurationHandlerpublic void setDocumentLocator(org.xml.sax.Locator locator)
Locator to use.
setDocumentLocator in interface org.xml.sax.ContentHandlersetDocumentLocator in class SAXConfigurationHandlerlocator - a Locator value
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException - if an error occurs
public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException - if an error occurs
public void characters(char[] ch,
int start,
int end)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class SAXConfigurationHandlerch - a char[] of datastart - offset in the character array from which to start readingend - length of character data
org.xml.sax.SAXException - if an error occurs
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class SAXConfigurationHandlernamespaceURI - a String valuelocalName - a String valuerawName - a String value
org.xml.sax.SAXException - if an error occurs
protected DefaultConfiguration createConfiguration(java.lang.String localName,
java.lang.String namespaceURI,
java.lang.String location)
DefaultConfiguration with the specified
local name, namespace, and location.
localName - a String valuenamespaceURI - a String valuelocation - a String value
DefaultConfiguration value
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class SAXConfigurationHandlernamespaceURI - a String valuelocalName - a String valuerawName - a String valueattributes - an Attributes value
org.xml.sax.SAXException - if an error occurs
public void error(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlererror in class SAXConfigurationHandlerexception - the parse error
org.xml.sax.SAXException - if an error occurs
public void warning(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
warning in interface org.xml.sax.ErrorHandlerwarning in class SAXConfigurationHandlerexception - the parse error
org.xml.sax.SAXException - if an error occurs
public void fatalError(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerfatalError in class SAXConfigurationHandlerexception - the parse error
org.xml.sax.SAXException - if an error occursprotected java.lang.String getLocationString()
getLocationString in class SAXConfigurationHandlerString value
public void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
startPrefixMapping in interface org.xml.sax.ContentHandlerstartPrefixMapping in class org.xml.sax.helpers.DefaultHandlerprefix - a String valueuri - a String value
org.xml.sax.SAXException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||