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
Reads file source definitions from the controller configuration file.
-
Constructor Summary
ConstructorsConstructorDescriptionFileSourceSaxHandler(ConfigurationProvider configurationProvider, UnitDescriptor unitDescriptor, ConfigurationHandlers configurationHandlers) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidendElement(String uri, String localName, String rawName) Returns the information how to read the sources.voidstartElement(String uri, String localName, String rawName, Attributes attributes) Methods inherited from class org.apache.torque.generator.configuration.source.SourceSaxHandler
finished, getConfigurationHandlers, getConfigurationProvider, getSourceProcessConfiguration, getUnitDescriptor, isFinishedMethods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
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 Details
-
startElement
public void startElement(String uri, String localName, String rawName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classSourceSaxHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classSourceSaxHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classSourceSaxHandler- Throws:
SAXException
-
getSourceProvider
Returns the information how to read the sources.- Specified by:
getSourceProviderin classSourceSaxHandler- Returns:
- the source Provider, not null if the source snippet was processed.
-