kodo.meta
Class JDOMetaDataParser
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--com.solarmetric.meta.XMLMetaDataParser
|
+--com.solarmetric.meta.CFMetaDataParser
|
+--kodo.meta.JDOMetaDataParser
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler, MetaDataLoader, MetaDataParser
- public class JDOMetaDataParser
- extends CFMetaDataParser
- implements MetaDataLoader
Custom SAX parser used by the system to quickly parse JDO metadata
files.
Methods inherited from class com.solarmetric.meta.XMLMetaDataParser |
addResult, characters, clear, currentClassLoader, endElement, error, fatalError, findMetaData, getClassLoader, getCurrentLocation, getLocation, getLog, getParseText, getResults, getSourceFile, getSourceIsSystemId, getSourceName, getText, isValidating, parse, parse, parse, parse, parseNew, setClassLoader, setDocumentLocator, setLocation, setLog, setParseText, setSourceIsSystemId, setValidating, startElement, throwException, throwException |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOCTYPE_DEC
public static final String DOCTYPE_DEC
JDOMetaDataParser
public JDOMetaDataParser(JDOConfiguration conf)
- Constructor. Constructed object ready for use.
JDOMetaDataParser
public JDOMetaDataParser()
- Constructor for use by configuration framework. Constructed
object is not ready for use until after a call to
setConfiguration(kodo.conf.JDOConfiguration)
.
setConfiguration
public void setConfiguration(JDOConfiguration conf)
startConfiguration
public void startConfiguration()
endConfiguration
public void endConfiguration()
getRepository
public JDOMetaDataRepository getRepository()
- Returns the repository for this parser. If none has been set, creates
a new repository and sets it.
setRepository
public void setRepository(JDOMetaDataRepository repos)
- Set the metadata repository for this parser.
- Specified by:
setRepository
in interface MetaDataLoader
getEnvironmentClassLoader
public ClassLoader getEnvironmentClassLoader()
- Return the persistence manager class loader to pass on to parsed
metadata instances.
setEnvironmentClassLoader
public void setEnvironmentClassLoader(ClassLoader loader)
- Set the persistence manager class loader to pass on to parsed
metadata instances.
- Specified by:
setEnvironmentClassLoader
in interface MetaDataLoader
load
public void load(Class cls)
- Bind the
MetaDataLoader
interface to the CFMetaDataParser
infrastructure.
- Specified by:
load
in interface MetaDataLoader
finish
protected void finish()
- Overrides:
finish
in class XMLMetaDataParser
getExtension
protected String getExtension()
- Overrides:
getExtension
in class XMLMetaDataParser
getExpectedRootName
protected String getExpectedRootName()
- Overrides:
getExpectedRootName
in class XMLMetaDataParser
reset
protected void reset()
- Overrides:
reset
in class CFMetaDataParser
getDocType
protected Reader getDocType()
throws IOException
- Overrides:
getDocType
in class XMLMetaDataParser
startElement
protected void startElement(String name,
Attributes attrs)
throws SAXException
- Overrides:
startElement
in class CFMetaDataParser
endElement
protected void endElement(String name)
throws SAXException
- Overrides:
endElement
in class CFMetaDataParser
startClass
protected void startClass(String className,
Attributes attrs)
throws SAXException
- Overrides:
startClass
in class CFMetaDataParser
endClass
protected void endClass(String className)
- Overrides:
endClass
in class CFMetaDataParser
startClassElement
protected void startClassElement(String name,
Attributes attrs)
throws SAXException
- Overrides:
startClassElement
in class CFMetaDataParser
endClassElement
protected void endClassElement(String name)
throws SAXException
- Overrides:
endClassElement
in class 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)
endExtension
protected void endExtension()
resolveEntity
public InputSource resolveEntity(String pub,
String sys)
throws SAXException
- Overrides:
resolveEntity
in class DefaultHandler
getLexicalHandler
protected LexicalHandler getLexicalHandler()
- Overrides:
getLexicalHandler
in class XMLMetaDataParser
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.