|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler org.apache.torque.engine.database.transform.XmlToAppData
public class XmlToAppData
A Class that is used to parse an input xml schema file and creates a Database java structure.
Constructor Summary | |
---|---|
XmlToAppData(java.lang.String databaseType)
Creates a new instance for the specified database type. |
|
XmlToAppData(java.lang.String databaseType,
java.lang.String defaultPackage)
Creates a new instance for the specified database type. |
Method Summary | |
---|---|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName)
Handles closing elements of the xml file. |
void |
error(org.xml.sax.SAXParseException e)
Handles exception which occur when the xml file is parsed |
Database |
parseFile(java.lang.String xmlFile)
Parses a XML input file and returns a newly created and populated Database structure. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
EntityResolver implementation. |
void |
setOption(org.xml.sax.Attributes attributes)
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes attributes)
Handles opening elements of the xml file. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
characters, endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, 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 |
---|
public XmlToAppData(java.lang.String databaseType)
databaseType
- The type of database for the application.public XmlToAppData(java.lang.String databaseType, java.lang.String defaultPackage)
databaseType
- The type of database for the application.defaultPackage
- the default java package used for the omMethod Detail |
---|
public Database parseFile(java.lang.String xmlFile) throws EngineException
xmlFile
- The input file to parse.
xmlFile
.
EngineException
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
resolveEntity
in interface org.xml.sax.EntityResolver
resolveEntity
in class org.xml.sax.helpers.DefaultHandler
publicId
- The public identifier of the external entitysystemId
- The system identifier of the external entity
org.xml.sax.SAXException
DTDResolver.resolveEntity(String, String)
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String rawName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
uri
- localName
- The local name (without prefix), or the empty string if
Namespace processing is not being performed.rawName
- The qualified name (with prefix), or the empty string if
qualified names are not available.attributes
- The specified or defaulted attributes
org.xml.sax.SAXException
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String rawName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
uri
- localName
- The local name (without prefix), or the empty string if
Namespace processing is not being performed.rawName
- The qualified name (with prefix), or the empty string if
qualified names are not available.
org.xml.sax.SAXException
public void setOption(org.xml.sax.Attributes attributes)
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
error
in interface org.xml.sax.ErrorHandler
error
in class org.xml.sax.helpers.DefaultHandler
e
- the exception which occured while parsing
org.xml.sax.SAXException
- always
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |