|
||||||||||
| 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.AbstractMetaDataHandler
public class AbstractMetaDataHandler
| Field Summary | |
|---|---|
protected java.lang.StringBuffer |
charactersBuffer
parser buffer |
protected org.xml.sax.EntityResolver |
entityResolver
Entity Resolver to use (if required) |
protected java.lang.String |
filename
Filename for the parsed file. |
protected static Localiser |
LOCALISER
Localiser for messages. |
protected MetaData |
metadata
The MetaData for this file (the end result of the parse process. |
protected MetaDataManager |
mgr
Manager for the MetaData. |
protected java.util.Stack |
stack
Stack of meta-data elements. |
| Constructor Summary | |
|---|---|
AbstractMetaDataHandler(MetaDataManager mgr,
java.lang.String filename,
org.xml.sax.EntityResolver resolver)
Constructor. |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Notification handler for the "body" data inside an element. |
void |
error(org.xml.sax.SAXParseException e)
Parser error method. |
protected java.lang.String |
getAttr(org.xml.sax.Attributes attrs,
java.lang.String key)
Accessor for an attribute out of the attributes for an element. |
protected java.lang.String |
getAttr(org.xml.sax.Attributes attrs,
java.lang.String key,
java.lang.String defaultValue)
Accessor for an attribute out of the attributes for an element. |
MetaData |
getMetaData()
Accessor for the MetaData for this file. |
protected MetaData |
getStack()
Accessor for the current MetaData component. |
java.lang.String |
getString()
Accessor for the "body" text metadata. |
protected MetaData |
popStack()
Method to remove the current MetaData component from the Stack. |
protected void |
pushStack(MetaData md)
Method to add a MetaData component to the Stack. |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Method to resolve XML entities. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endDocument, endElement, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Localiser LOCALISER
protected final MetaDataManager mgr
protected final java.lang.String filename
protected MetaData metadata
protected final org.xml.sax.EntityResolver entityResolver
protected java.lang.StringBuffer charactersBuffer
protected java.util.Stack stack
| Constructor Detail |
|---|
public AbstractMetaDataHandler(MetaDataManager mgr,
java.lang.String filename,
org.xml.sax.EntityResolver resolver)
mgr - Manager for the MetaDatafilename - The filenameresolver - Entity Resolver to use (null if not available)| Method Detail |
|---|
public MetaData getMetaData()
public void error(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlererror in class org.xml.sax.helpers.DefaultHandlere - Parse Exception
org.xml.sax.SAXExceptionErrorHandler.error(org.xml.sax.SAXParseException)
protected java.lang.String getAttr(org.xml.sax.Attributes attrs,
java.lang.String key,
java.lang.String defaultValue)
attrs - The attributeskey - Key for the attribute to returndefaultValue - A default to impose if no value.
protected java.lang.String getAttr(org.xml.sax.Attributes attrs,
java.lang.String key)
attrs - The attributeskey - Key for the attribute to return
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException
resolveEntity in interface org.xml.sax.EntityResolverresolveEntity in class org.xml.sax.helpers.DefaultHandlerpublicId - The public id.systemId - The system id.
org.xml.sax.SAXExceptionEntityResolver.resolveEntity(java.lang.String,java.lang.String)
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerch - The charactersstart - The start position in the character array.length - The length of the string.
org.xml.sax.SAXException - in parsing errorspublic java.lang.String getString()
protected MetaData getStack()
protected MetaData popStack()
protected void pushStack(MetaData md)
md - The component to add.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||