|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.jpox.metadata.xml.AbstractMetaDataHandler
org.jpox.jdo.metadata.JDOMetaDataHandler
public class JDOMetaDataHandler
Parser handler for JDO MetaData. Implements DefaultHandler and handles the extracting of MetaData for JDO from the XML elements/attributes. This class simply constructs the MetaData representation mirroring what is in the MetaData file. It has no knowledge of the class(es) that it represents, simply the information in the MetaData file. The knowledge of the classes is imposed on the representation at a later stage where necessary.
Operates the parse process using a Stack. MetaData components are added to the stack as they are encountered and created. They are then popped off the stack when the end element is encountered.
| Field Summary |
|---|
| Fields inherited from class org.jpox.metadata.xml.AbstractMetaDataHandler |
|---|
charactersBuffer, entityResolver, filename, LOCALISER, metadata, mgr, stack |
| Constructor Summary | |
|---|---|
JDOMetaDataHandler(MetaDataManager mgr,
java.lang.String filename,
org.xml.sax.EntityResolver resolver)
Constructor. |
|
| Method Summary | |
|---|---|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Handler method called at the end of an element. |
protected ClassMetaData |
newClassObject(PackageMetaData pmd,
org.xml.sax.Attributes attrs)
Utility to create a new class component. |
protected FieldMetaData |
newFieldObject(MetaData md,
org.xml.sax.Attributes attrs)
Utility to create a new field component. |
protected PropertyMetaData |
newPropertyObject(MetaData md,
org.xml.sax.Attributes attrs)
Utility to create a new property component. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
Handler method called at the start of an element. |
| Methods inherited from class org.jpox.metadata.xml.AbstractMetaDataHandler |
|---|
characters, error, getAttr, getAttr, getMetaData, getStack, getString, popStack, pushStack, resolveEntity |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, 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 |
|---|
public JDOMetaDataHandler(MetaDataManager mgr,
java.lang.String filename,
org.xml.sax.EntityResolver resolver)
mgr - the metadata managerfilename - The name of the file to parseresolver - Entity Resolver to use (null if not available)| Method Detail |
|---|
protected ClassMetaData newClassObject(PackageMetaData pmd,
org.xml.sax.Attributes attrs)
pmd - The parent PackageMetaDataattrs - The attributes
protected FieldMetaData newFieldObject(MetaData md,
org.xml.sax.Attributes attrs)
md - The parent MetaDataattrs - The attributes
protected PropertyMetaData newPropertyObject(MetaData md,
org.xml.sax.Attributes attrs)
md - The parent MetaDataattrs - The attributes
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandleruri - URI of the taglocalName - Local nameqName - Element nameattrs - Attributes for this element
org.xml.sax.SAXException - in parsing errors
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandleruri - URI of the taglocalName - local nameqName - Name of element just ending
org.xml.sax.SAXException - in parsing errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||