SAXConfigurationHandler (Avalon Framework 4.1.5 API)
Keywords: org.apache.avalon.framework.configuration.SAXConfigurationHandler class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.avalon.framework.configuration
Class SAXConfigurationHandler

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          org.apache.avalon.framework.configuration.SAXConfigurationHandler

All Implemented Interfaces:
  ContentHandler, DTDHandler, EntityResolver, ErrorHandler

Direct Known Subclasses:
  NamespacedSAXConfigurationHandler

public class SAXConfigurationHandler
extends DefaultHandler
implements ErrorHandler

A SAXConfigurationHandler helps build Configurations out of sax events.

Version:
  CVS $Revision: 1.30 $ $Date: 2003/06/13 08:45:46 $
Author:
  Avalon Development Team

Constructor Summary
`SAXConfigurationHandler()`

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 location)` Create a new `DefaultConfiguration` with the specified local name and location.
`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` | `startElement(String namespaceURI, String localName, String rawName, Attributes attributes)` Handling hook for starting parsing of an element.
`void` | `warning(SAXParseException exception)` This just throws an exception on a parse error.

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SAXConfigurationHandler

    public SAXConfigurationHandler()

Method Detail

### getConfiguration

    public Configuration getConfiguration()

  Get the configuration object that was built.

  Returns:
    a `Configuration` object

### clear

    public void clear()

  Clears all data from this configuration handler.

### setDocumentLocator

    public void setDocumentLocator(Locator locator)

  Set the document `Locator` to use.

  Specified by:
    `setDocumentLocator` in interface `ContentHandler`
  Parameters:
    `locator` - a `Locator` value

### characters

    public void characters(char[] ch,
                           int start,
                           int end)
                    throws SAXException

  Handling hook for character data.

  Specified by:
    `characters` in interface `ContentHandler`
  Parameters:
    `ch` - a `char[]` of data
    `start` - offset in the character array from which to start reading
    `end` - length of character data
  Throws:
    `SAXException` - if an error occurs

### endElement

    public void endElement(String namespaceURI,
                           String localName,
                           String rawName)
                    throws SAXException

  Handling hook for finishing parsing of an element.

  Specified by:
    `endElement` in interface `ContentHandler`
  Parameters:
    `namespaceURI` - a `String` value
    `localName` - a `String` value
    `rawName` - a `String` value
  Throws:
    `SAXException` - if an error occurs

### createConfiguration

    protected DefaultConfiguration createConfiguration(String localName,
                                                       String location)

  Create a new `DefaultConfiguration` with the specified local name and location.

  Parameters:
    `localName` - a `String` value
    `location` - a `String` value
  Returns:
    a `DefaultConfiguration` value

### startElement

    public void startElement(String namespaceURI,
                             String localName,
                             String rawName,
                             Attributes attributes)
                      throws SAXException

  Handling hook for starting parsing of an element.

  Specified by:
    `startElement` in interface `ContentHandler`
  Parameters:
    `namespaceURI` - a `String` value
    `localName` - a `String` value
    `rawName` - a `String` value
    `attributes` - an `Attributes` value
  Throws:
    `SAXException` - if an error occurs

### error

    public void error(SAXParseException exception)
               throws SAXException

  This just throws an exception on a parse error.

  Specified by:
    `error` in interface `ErrorHandler`
  Parameters:
    `exception` - the parse error
  Throws:
    `SAXException` - if an error occurs

### warning

    public void warning(SAXParseException exception)
                 throws SAXException

  This just throws an exception on a parse error.

  Specified by:
    `warning` in interface `ErrorHandler`
  Parameters:
    `exception` - the parse error
  Throws:
    `SAXException` - if an error occurs

### fatalError

    public void fatalError(SAXParseException exception)
                    throws SAXException

  This just throws an exception on a parse error.

  Specified by:
    `fatalError` in interface `ErrorHandler`
  Parameters:
    `exception` - the parse error
  Throws:
    `SAXException` - if an error occurs

### getLocationString

    protected String getLocationString()

  Returns a string showing the current system ID, line number and column number.

  Returns:
    a `String` value

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Apache Software Foundation. All Rights Reserved.