com.solarmetric.kodo.meta
Class JDOMetaDataParser
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--com.solarmetric.modules.tools.compiler.MetaDataParser
|
+--com.solarmetric.modules.tools.compiler.CFMetaDataParser
|
+--com.solarmetric.kodo.meta.JDOMetaDataParser
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
- public class JDOMetaDataParser
- extends com.solarmetric.modules.tools.compiler.CFMetaDataParser
Custom SAX parser used by the system to quickly parse JDO metadata
files.
This parser maintains a static cache and will never parse the same
source more than once; if it is called with a class or source that has
already been parsed, it will return an empty list. This is for general
efficiency (otherwise types without metadata will require continuous
reparsing of the [package-name].jdo for their package and
system.jdo, if they exist), and has the added upside
of preventing infinite recursion in scenarious where types in the same
[package-name].jdo refer to each other or to
non-persistent types in that package.
| Methods inherited from class com.solarmetric.modules.tools.compiler.CFMetaDataParser |
classForName, endElement, getDeclaredClass, getDeclaredPackage, startElement |
| Methods inherited from class com.solarmetric.modules.tools.compiler.MetaDataParser |
addMetaData, characters, endElement, error, fatalError, getClassResolver, getText, parseMetaData, parseMetaData, startElement, throwException |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDOMetaDataParser
public JDOMetaDataParser(ClassResolver resolver)
parseMetaData
public Collection parseMetaData(Reader xml,
String sourceName,
boolean validate)
throws SAXException
- Overrides:
parseMetaData in class com.solarmetric.modules.tools.compiler.MetaDataParser
getExtension
protected String getExtension()
- Overrides:
getExtension in class com.solarmetric.modules.tools.compiler.MetaDataParser
reset
protected void reset()
- Overrides:
reset in class com.solarmetric.modules.tools.compiler.CFMetaDataParser
getDocType
protected Reader getDocType()
throws IOException
- Overrides:
getDocType in class com.solarmetric.modules.tools.compiler.MetaDataParser
startClass
protected void startClass(String className,
Attributes attrs)
throws SAXException
- Overrides:
startClass in class com.solarmetric.modules.tools.compiler.CFMetaDataParser
endClass
protected void endClass(String className)
- Overrides:
endClass in class com.solarmetric.modules.tools.compiler.CFMetaDataParser
startClassElement
protected void startClassElement(String name,
Attributes attrs)
throws SAXException
- Overrides:
startClassElement in class com.solarmetric.modules.tools.compiler.CFMetaDataParser
endClassElement
protected void endClassElement(String name)
throws SAXException
- Overrides:
endClassElement in class com.solarmetric.modules.tools.compiler.CFMetaDataParser
startField
protected void startField(Attributes attrs)
throws SAXException
endField
protected void endField()
startArray
protected void startArray(Attributes attrs)
throws SAXException
startCollection
protected void startCollection(Attributes attrs)
throws SAXException
startMap
protected void startMap(Attributes attrs)
throws SAXException
startExtension
protected void startExtension(Attributes attrs)
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.