Class FileSourceSaxHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.apache.torque.generator.configuration.source.SourceSaxHandler
-
- org.apache.torque.generator.configuration.source.FileSourceSaxHandler
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class FileSourceSaxHandler extends SourceSaxHandler
Reads file source definitions from the controller configuration file.
-
-
Constructor Summary
Constructors Constructor Description FileSourceSaxHandler(ConfigurationProvider configurationProvider, UnitDescriptor unitDescriptor, ConfigurationHandlers configurationHandlers)
Constructor.
-
Method Summary
Modifier and Type Method Description void
characters(char[] ch, int start, int length)
void
endElement(String uri, String localName, String rawName)
SourceProvider
getSourceProvider()
Returns the information how to read the sources.void
startElement(String uri, String localName, String rawName, Attributes attributes)
-
Methods inherited from class org.apache.torque.generator.configuration.source.SourceSaxHandler
finished, getConfigurationHandlers, getConfigurationProvider, getSourceProcessConfiguration, getUnitDescriptor, isFinished
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
FileSourceSaxHandler
public FileSourceSaxHandler(ConfigurationProvider configurationProvider, UnitDescriptor unitDescriptor, ConfigurationHandlers configurationHandlers)
Constructor.- Parameters:
configurationProvider
- The access object for the configuration files, not null.unitDescriptor
- The description of the generation unit, not null.configurationHandlers
- All known configuration handlers, 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 interfaceContentHandler
- Overrides:
startElement
in classSourceSaxHandler
- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String rawName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classSourceSaxHandler
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classSourceSaxHandler
- Throws:
SAXException
-
getSourceProvider
public SourceProvider getSourceProvider()
Returns the information how to read the sources.- Specified by:
getSourceProvider
in classSourceSaxHandler
- Returns:
- the source Provider, not null if the source snippet was processed.
-
-