org.apache.avalon.framework.configuration

Class NamespacedSAXConfigurationHandler

Implemented Interfaces:
ErrorHandler

public class NamespacedSAXConfigurationHandler
extends SAXConfigurationHandler

A SAXConfigurationHandler helps build Configurations out of sax events, including namespace information.

Version:
CVS $Revision: 1.17 $ $Date: 2003/02/11 15:58:39 $

Author:
Avalon Development Team

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(String localName, String namespaceURI, 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(String namespaceURI, String localName, String rawName)
Handling hook for finishing parsing of an element.
void
error(SAXParseException exception)
This just throws an exception on a parse error.
void
fatalError(SAXParseException exception)
This just throws an exception on a parse error.
Configuration
getConfiguration()
Get the configuration object that was built.
protected String
getLocationString()
Returns a string showing the current system ID, line number and column number.
void
setDocumentLocator(Locator locator)
Set the document Locator to use.
void
startDocument()
Handling hook for starting the document parsing.
void
startElement(String namespaceURI, String localName, String rawName, Attributes attributes)
Handling hook for starting parsing of an element.
void
startPrefixMapping(String prefix, String uri)
Handling hook for starting prefix mapping.
void
warning(SAXParseException exception)
This just throws an exception on a parse error.

Methods inherited from class org.apache.avalon.framework.configuration.SAXConfigurationHandler

characters, clear, createConfiguration, endElement, error, fatalError, getConfiguration, getLocationString, setDocumentLocator, startElement, warning

Method Details

characters

public void characters(char[] ch,
                       int start,
                       int end)
            throws SAXException
Handling hook for character data.
Overrides:
characters in interface SAXConfigurationHandler

Parameters:
ch - a char[] of data
start - offset in the character array from which to start reading
end - length of character data


clear

public void clear()
Clears all data from this configuration handler.
Overrides:
clear in interface SAXConfigurationHandler


createConfiguration

protected DefaultConfiguration createConfiguration(String localName,
                                                   String namespaceURI,
                                                   String location)
Create a new DefaultConfiguration with the specified local name, namespace, and location.

Parameters:
localName - a String value
namespaceURI - a String value
location - a String value

Returns:
a DefaultConfiguration value


endDocument

public void endDocument()
            throws SAXException
Handling hook for ending the document parsing.


endElement

public void endElement(String namespaceURI,
                       String localName,
                       String rawName)
            throws SAXException
Handling hook for finishing parsing of an element.
Overrides:
endElement in interface SAXConfigurationHandler

Parameters:
namespaceURI - a String value
localName - a String value
rawName - a String value


error

public void error(SAXParseException exception)
            throws SAXException
This just throws an exception on a parse error.
Overrides:
error in interface SAXConfigurationHandler

Parameters:
exception - the parse error


fatalError

public void fatalError(SAXParseException exception)
            throws SAXException
This just throws an exception on a parse error.
Overrides:
fatalError in interface SAXConfigurationHandler

Parameters:
exception - the parse error


getConfiguration

public Configuration getConfiguration()
Get the configuration object that was built.
Overrides:
getConfiguration in interface SAXConfigurationHandler

Returns:
a Configuration object


getLocationString

protected String getLocationString()
Returns a string showing the current system ID, line number and column number.
Overrides:
getLocationString in interface SAXConfigurationHandler

Returns:
a String value


setDocumentLocator

public void setDocumentLocator(Locator locator)
Set the document Locator to use.
Overrides:
setDocumentLocator in interface SAXConfigurationHandler

Parameters:
locator - a Locator value


startDocument

public void startDocument()
            throws SAXException
Handling hook for starting the document parsing.


startElement

public void startElement(String namespaceURI,
                         String localName,
                         String rawName,
                         Attributes attributes)
            throws SAXException
Handling hook for starting parsing of an element.
Overrides:
startElement in interface SAXConfigurationHandler

Parameters:
namespaceURI - a String value
localName - a String value
rawName - a String value
attributes - an Attributes value


startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
            throws SAXException
Handling hook for starting prefix mapping.

Parameters:
prefix - a String value
uri - a String value


warning

public void warning(SAXParseException exception)
            throws SAXException
This just throws an exception on a parse error.
Overrides:
warning in interface SAXConfigurationHandler

Parameters:
exception - the parse error


"Copyright B) 2001 Apache Jakarta Project. All Rights Reserved."