SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.meta
Class CFMetaDataParser

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--com.solarmetric.rd.meta.XMLMetaDataParser
              |
              +--com.solarmetric.rd.meta.CFMetaDataParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, MetaDataParser
Direct Known Subclasses:
ClassArgParser, JDOMetaDataParser, XMLMappingInfoParser

public abstract class CFMetaDataParser
extends XMLMetaDataParser

Custom SAX parser used by the system to quickly parse metadata files that conform to the common format:
<!ELEMENT ANY (package*)>
<!ELEMENT package (class*)>
<!ATTLIST package name CDATA #REQUIRED>
<!ELEMENT class ANY>
<!ATTLIST class name CDATA #REQUIRED>
<!ATTLIST class ANY>

Subclasses should handle the processing of anything within the <class> elements.

See Also:
XMLMetaDataParser

Constructor Summary
CFMetaDataParser()
           
 
Method Summary
protected  java.lang.Class classForName(java.lang.String name)
          Helper method to create the Class for the given name, taking into account the package currently being parsed for relative class names.
protected abstract  void endClass(java.lang.String className)
          Override this method marking the end of a declared <class>.
protected abstract  void endClassElement(java.lang.String name)
          Override this method marking the end of an element within a declared <class>.
protected  void endElement(java.lang.String name)
          Override this method marking the end of some element.
protected  java.lang.String getDeclaredClass()
          Return the current class being parsed; the returned name will not include the class package.
protected  java.lang.String getDeclaredPackage()
          Return the current package being parsed.
protected  void reset()
          Override this method to clear any state and ready the parser for a new document.
protected abstract  void startClass(java.lang.String className, org.xml.sax.Attributes attrs)
          Override this method marking the start of a declared <class>.
protected abstract  void startClassElement(java.lang.String name, org.xml.sax.Attributes attrs)
          Override this method marking the start of an element within a declared <class>.
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, finish, getClassLoader, getCurrentLocation, getDocType, getExtension, 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
 

Constructor Detail

CFMetaDataParser

public CFMetaDataParser()
Method Detail

startElement

protected void startElement(java.lang.String name,
                            org.xml.sax.Attributes attrs)
                     throws org.xml.sax.SAXException
Description copied from class: XMLMetaDataParser
Override this method marking the start of some element.

Specified by:
startElement in class XMLMetaDataParser
org.xml.sax.SAXException

endElement

protected void endElement(java.lang.String name)
                   throws org.xml.sax.SAXException
Description copied from class: XMLMetaDataParser
Override this method marking the end of some element.

Specified by:
endElement in class XMLMetaDataParser
org.xml.sax.SAXException

startClass

protected abstract void startClass(java.lang.String className,
                                   org.xml.sax.Attributes attrs)
                            throws org.xml.sax.SAXException
Override this method marking the start of a declared <class>. The given class name will not include the package.

org.xml.sax.SAXException

endClass

protected abstract void endClass(java.lang.String className)
                          throws org.xml.sax.SAXException
Override this method marking the end of a declared <class>. The given class name will not include the package.

org.xml.sax.SAXException

startClassElement

protected abstract void startClassElement(java.lang.String name,
                                          org.xml.sax.Attributes attrs)
                                   throws org.xml.sax.SAXException
Override this method marking the start of an element within a declared <class>.

org.xml.sax.SAXException

endClassElement

protected abstract void endClassElement(java.lang.String name)
                                 throws org.xml.sax.SAXException
Override this method marking the end of an element within a declared <class>.

org.xml.sax.SAXException

reset

protected void reset()
Override this method to clear any state and ready the parser for a new document. Subclasses should call super.reset () to clear superclass state.

Overrides:
reset in class XMLMetaDataParser

getDeclaredClass

protected java.lang.String getDeclaredClass()
Return the current class being parsed; the returned name will not include the class package.


getDeclaredPackage

protected java.lang.String getDeclaredPackage()
Return the current package being parsed.


classForName

protected java.lang.Class classForName(java.lang.String name)
                                throws org.xml.sax.SAXException
Helper method to create the Class for the given name, taking into account the package currently being parsed for relative class names.

org.xml.sax.SAXException

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.