|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--com.solarmetric.rd.meta.XMLMetaDataParser
|
+--com.solarmetric.rd.kodo.impl.jdbc.schema.XMLSchemaParser
Custom SAX parser used to parse Schema objects. The parser
will place all parsed schemas into the current SchemaGroup, set
via the setSchemaGroup(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup) method. This allows parsing of
multiple files into a single schema group.
The parser deserializes from the following XML format:
<!ELEMENT schemas (schema)+>
<!ELEMENT schema (table)+>
<!ATTLIST schema name CDATA #IMPLIED>
<!ELEMENT table (column|index|pk|fk)+>
<!ATTLIST table name CDATA #REQUIRED>
<!ELEMENT column EMPTY>
<!ATTLIST column name CDATA #REQUIRED>
<!ATTLIST column type (array|bigint|binary|bit|blob|char|clob
|date|decimal|distinct|double|float|integer|java_object
|longvarbinary|longvarchar|null|numeric|other|real|ref|smallint|struct
|time|timstamp|tinyint|varbinary|varchar) #REQUIRED>
<!ATTLIST column type-name CDATA #IMPLIED>
<!ATTLIST column size CDATA #IMPLIED>
<!ATTLIST column decimal-digits CDATA #IMPLIED>
<!ATTLIST column not-null (true|false) "false">
<!ATTLIST column default CDATA #IMPLIED>
<!ELEMENT index (on)*>
<!ATTLIST index name CDATA #REQUIRED>
<!ATTLIST index column CDATA #IMPLIED>
<!ATTLIST index unique (true|false) "false">
<!ELEMENT on EMPTY>
<!ATTLIST on column CDATA #REQUIRED>
<!ELEMENT pk (on)*>
<!ATTLIST pk name CDATA #IMPLIED>
<!ATTLIST pk logical (true|false) "false">
<!ATTLIST pk column CDATA #IMPLIED>
<!ELEMENT fk (join)*>
<!ATTLIST fk name CDATA #IMPLIED>
<!ATTLIST fk deferred (true|false) "false">
<!ATTLIST fk column CDATA #IMPLIED>
<!ATTLIST fk to-table CDATA #REQUIRED>
<!ATTLIST fk delete-action (cascade|default|exception|none|null)
"none">
<!ELEMENT join EMPTY>
<!ATTLIST join column CDATA #REQUIRED>
<!ATTLIST join to-column CDATA #REQUIRED>
Schema parsers are not threadsafe.
| Constructor Summary | |
XMLSchemaParser(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
Constructor. |
|
| Method Summary | |
protected void |
endElement(java.lang.String name)
Override this method marking the end of some element. |
protected void |
finish()
Parse the schema relating to the given class. |
protected java.io.Reader |
getDocType()
Override this method to return any DOCTYPE declaration
that should be dynamically included in xml documents that will be
validated. |
protected java.lang.String |
getExtension()
Override this method to return the extension used for metadata resources. |
com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup |
getSchemaGroup()
Return the current schema group. |
protected void |
reset()
Override this method to clear any state and ready the parser for a new document. |
void |
setSchemaGroup(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup group)
Set the current schema group; this clears all state from the last group. |
protected void |
startElement(java.lang.String name,
org.xml.sax.Attributes attrs)
Override this method marking the start of some element. |
| Methods inherited from class com.solarmetric.rd.meta.XMLMetaDataParser |
addResult, characters, clear, currentClassLoader, endElement, error, fatalError, findMetaData, getClassLoader, getCurrentLocation, getLocation, getLog, getResults, getSourceFile, getSourceName, getText, isValidating, parse, parse, parse, parse, setClassLoader, setDocumentLocator, setLocation, setLog, setValidating, startElement, throwException, throwException |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.solarmetric.rd.meta.MetaDataParser |
clear, findMetaData, getLog, getResults, isValidating, parse, parse, parse, parse, setLog, setValidating |
| Constructor Detail |
public XMLSchemaParser(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
| Method Detail |
public com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup getSchemaGroup()
SchemaParser
getSchemaGroup in interface SchemaParserpublic void setSchemaGroup(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup group)
SchemaParser
setSchemaGroup in interface SchemaParserprotected void finish()
finish in class XMLMetaDataParserprotected java.lang.String getExtension()
XMLMetaDataParser
getExtension in class XMLMetaDataParserprotected void reset()
XMLMetaDataParsersuper.reset () to clear superclass state.
reset in class XMLMetaDataParser
protected java.io.Reader getDocType()
throws java.io.IOException
XMLMetaDataParserDOCTYPE declaration
that should be dynamically included in xml documents that will be
validated. Returns null by default.
getDocType in class XMLMetaDataParserjava.io.IOException
protected void startElement(java.lang.String name,
org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXException
XMLMetaDataParser
startElement in class XMLMetaDataParserorg.xml.sax.SAXExceptionprotected void endElement(java.lang.String name)
XMLMetaDataParser
endElement in class XMLMetaDataParser
|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||