Class SourceSaxHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.torque.generator.configuration.source.SourceSaxHandler
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
- Direct Known Subclasses:
FileSourceSaxHandler,JdbcMetadataSourceSaxHandler
A base class for reading source definitions from the controller
configuration file.
-
Constructor Summary
ConstructorsConstructorDescriptionSourceSaxHandler(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) protected voidfinished()Marks that the matching snippet was completely parsed.Returns the known configuration handlers.Returns the configurationProvider to access the configuration.Returns the information how to pre-process the sources before generating.abstract SourceProviderReturns the information how to read the sources.Returns the description of the generation unit.booleanReturns whether the matching snippet was completely parsed.voidstartElement(String uri, String localName, String rawName, Attributes attributes) Methods 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
-
SourceSaxHandler
public SourceSaxHandler(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 classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
getConfigurationProvider
Returns the configurationProvider to access the configuration.- Returns:
- the configurationProvider to access the configuration, not null.
-
getConfigurationHandlers
Returns the known configuration handlers.- Returns:
- the configuration handlers, not null.
-
getUnitDescriptor
Returns the description of the generation unit.- Returns:
- the description of the generation unit, not null.
-
isFinished
public boolean isFinished()Returns whether the matching snippet was completely parsed.- Returns:
- true if the matching snippet was completely parsed, false otherwise.
-
finished
protected void finished()Marks that the matching snippet was completely parsed. -
getSourceProvider
Returns the information how to read the sources.- Returns:
- the source Provider, not null if the source snippet was processed.
-
getSourceProcessConfiguration
Returns the information how to pre-process the sources before generating.- Returns:
- the sourceProcessConfiguration, not null if the source snippet was processed.
-