|
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.meta.CFMetaDataParser
|
+--com.solarmetric.rd.kodo.impl.jdbc.meta.XMLMappingInfoParser
Custom SAX parser used to parse MappingInfo objects. The
parser deserializes from the following general XML format (there is no
validation due to the fact that custom mappings can be introduced, and
attributes linking to application identity primary keys are prefixed with
the primary key column name):
<!ELEMENT mapping (package)+>
<!ELEMENT package (class)+>
<!ATTLIST package name CDATA #REQUIRED>
<!ELEMENT class ((jdbc-class-map), (jdbc-version-ind)?,
(jdbc-class-ind)?, (field)*)>
<!ATTLIST class name CDATA #REQUIRED>
<!ELEMENT jdbc-class-map EMPTY>
<!ATTLIST jdbc-class-map type (base|flat|vertical|..) #REQUIRED>
<!ATTLIST jdbc-class-map table CDATA #IMPLIED>
<!ATTLIST jdbc-class-map pk-column CDATA #IMPLIED>
<!ATTLIST jdbc-class-map [pkcol-]ref-column* CDATA #IMPLIED>
<!ATTLIST jdbc-class-map class CDATA #IMPLIED>
<!ATTLIST jdbc-class-map ANY>
<!ELEMENT field (jdbc-field-map)>
<!ATTLIST field name CDATA #REQUIRED>
<!ELEMENT jdbc-field-map (field)*>
<!ATTLIST jdbc-field-map type (value|blob|clob|one-one|collection
|one-many|many-many|map|n-many-map|..) #REQUIRED>
<!ATTLIST jdbc-field-map table CDATA #IMPLIED>
<!ATTLIST jdbc-field-map [pkcol-]column* CDATA #IMPLIED>
<!ATTLIST jdbc-field-map [pkcol-]key-column* CDATA #IMPLIED>
<!ATTLIST jdbc-field-map [pkcol-]value-column* CDATA #REQUIRED>
<!ATTLIST jdbc-field-map [pkcol-]ref-column* CDATA #IMPLIED>
<!ATTLIST jdbc-field-map order-column CDATA #IMPLIED>
<!ATTLIST jdbc-field-map meta-column CDATA #IMPLIED>
<!ATTLIST jdbc-field-map class CDATA #IMPLIED>
<!ATTLIST jdbc-field-map ANY>
<!ELEMENT jdbc-version-ind EMPTY>
<!ATTLIST jdbc-version-ind type (version-num|..) #REQUIRED>
<!ATTLIST jdbc-version-ind column CDATA #IMPLIED>
<!ATTLIST jdbc-version-ind class CDATA #IMPLIED>
<!ATTLIST jdbc-version-ind ANY>
<!ELEMENT jdbc-class-ind EMPTY>
<!ATTLIST jdbc-class-ind type (in-class-name|not-in-class-name|..)
#REQUIRED>
<!ATTLIST jdbc-class-ind column CDATA #IMPLIED>
<!ATTLIST jdbc-class-ind class CDATA #IMPLIED>
<!ATTLIST jdbc-class-ind ANY>
Mapping parsers are not threadsafe.
| Field Summary | |
static java.lang.String |
CLASS_IND
Element name of class indicator information. |
static java.lang.String |
CLASS_MAPPING
Element name of class mapping information. |
static java.lang.String |
FIELD_MAPPING
Element name of field mapping information. |
static java.lang.String |
VERSION_IND
Element name of version indicator information. |
| Constructor Summary | |
XMLMappingInfoParser(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
Constructor. |
|
| Method Summary | |
protected void |
endClass(java.lang.String name)
Override this method marking the end of a declared <class>. |
protected void |
endClassElement(java.lang.String name)
Override this method marking the end of an element within a declared <class>. |
protected void |
finish()
Override this method to finish up after a parse; this is only called if no errors are encountered during parsing. |
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.meta.MappingInfoRepository |
getRepository()
Return the repository of mapping info. |
protected void |
reset()
Override this method to clear any state and ready the parser for a new document. |
void |
setRepository(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository repos)
Set the repository to add parsed mappings to. |
protected void |
startClass(java.lang.String name,
org.xml.sax.Attributes attrs)
Override this method marking the start of a declared <class>. |
protected void |
startClassElement(java.lang.String name,
org.xml.sax.Attributes attrs)
Override this method marking the start of an element within a declared <class>. |
| Methods inherited from class com.solarmetric.rd.meta.CFMetaDataParser |
classForName, endElement, getDeclaredClass, getDeclaredPackage, startElement |
| 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 |
| Field Detail |
public static final java.lang.String CLASS_MAPPING
public static final java.lang.String FIELD_MAPPING
public static final java.lang.String VERSION_IND
public static final java.lang.String CLASS_IND
| Constructor Detail |
public XMLMappingInfoParser(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
| Method Detail |
public com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository getRepository()
MappingInfoParser
getRepository in interface MappingInfoParserpublic void setRepository(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfoRepository repos)
MappingInfoParser
setRepository in interface MappingInfoParserprotected void finish()
XMLMetaDataParsersuper.finish () to resolve superclass state.
finish in class XMLMetaDataParserprotected java.lang.String getExtension()
XMLMetaDataParser
getExtension in class XMLMetaDataParserprotected void reset()
CFMetaDataParsersuper.reset () to clear superclass state.
reset in class CFMetaDataParser
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 startClass(java.lang.String name,
org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXException
CFMetaDataParser<class>. The given class name will not include
the package.
startClass in class CFMetaDataParserorg.xml.sax.SAXException
protected void endClass(java.lang.String name)
throws org.xml.sax.SAXException
CFMetaDataParser<class>. The given class name will not include
the package.
endClass in class CFMetaDataParserorg.xml.sax.SAXException
protected void startClassElement(java.lang.String name,
org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXException
CFMetaDataParser<class>.
startClassElement in class CFMetaDataParserorg.xml.sax.SAXException
protected void endClassElement(java.lang.String name)
throws org.xml.sax.SAXException
CFMetaDataParser<class>.
endClassElement in class CFMetaDataParserorg.xml.sax.SAXException
|
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 | |||||||||