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.torque.generator.configuration.source
Class EntityReferenceSaxHandler

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          org.apache.torque.generator.configuration.source.EntityReferenceSaxHandler

All Implemented Interfaces:
  ContentHandler, DTDHandler, EntityResolver, ErrorHandler

    public class EntityReferenceSaxHandler

extends DefaultHandler

Reads an entity reference from the controller configuration file.

Constructor Summary
`EntityReferenceSaxHandler(ConfigurationProvider configurationProvider, ProjectPaths projectPaths)` Constructor.

Method Summary
`String` | `getResource()` Returns the parsed resource path.
`String` | `getSystemId()`
`boolean` | `isFinished()` Returns whether this handler has finished parsing.
`byte[]` | `readResource()` Reads the resource defined in the parsed XML .
`void` | `startElement(String uri, String localName, String rawName, Attributes attributes)`

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

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

Constructor Detail

### EntityReferenceSaxHandler

    public EntityReferenceSaxHandler(ConfigurationProvider configurationProvider,
                                     ProjectPaths projectPaths)

  Constructor.

  Parameters:
    `configurationProvider` - The access object for the configuration files, not null.
    `projectPaths` - The paths of the surrounding project, not null.
  Throws:
    `NullPointerException` - if an argument is null.

Method Detail

### startElement

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

  Specified by:
    `startElement` in interface `ContentHandler`
  Overrides:
    `startElement` in class `DefaultHandler`
  Throws:
    `SAXException`

### getResource

    public String getResource()

  Returns the parsed resource path.

  Returns:
    the the parsed resource path, not null if a matching snippet was processed.

### getSystemId

    public String getSystemId()

### isFinished

    public boolean isFinished()

  Returns whether this handler has finished parsing.

  Returns:
    true if this handler is finished, false otherwise.

### readResource

    public byte[] readResource()
                        throws ConfigurationException

  Reads the resource defined in the parsed XML .

  Returns:
    the content of the resource, not null.
  Throws:
    `ConfigurationException` - if an error occurs while reading the resource.

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 © 2000-2013 The Apache Software Foundation. All Rights Reserved.