|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.xml.util.AbstractModelReader
public abstract class AbstractModelReader
Loads the class model from an previously written xml file set. This class provides abstract methods which get called during the parsing (similiar to the SAX parsing, but slightly easier to code). This will need a rewrite in the future, when the structure is finished.
Constructor Summary | |
---|---|
AbstractModelReader()
Default Constructor. |
Method Summary | |
---|---|
protected void |
endIncludeHandling()
End handling an include. |
protected abstract void |
endMultiplexMapping()
Finializes the multiplexer mapping. |
protected abstract void |
endObjectDefinition()
Finializes the object definition. |
protected void |
endRootDocument()
End the root document. |
protected java.lang.String[] |
getCloseComment()
Returns the close comment. |
protected CommentHandler |
getCommentHandler()
Returns the comment handler. |
protected java.lang.String[] |
getOpenComment()
Returns the open comment. |
protected abstract void |
handleAttributeDefinition(java.lang.String name,
java.lang.String attribName,
java.lang.String handlerClass)
Handles an attribute definition. |
protected abstract void |
handleConstructorDefinition(java.lang.String propertyName,
java.lang.String parameterClass)
Handles a constructor definition. |
protected abstract void |
handleElementDefinition(java.lang.String name,
java.lang.String element)
Handles an element definition. |
protected void |
handleIgnoredProperty(java.lang.String name)
Callback method for ignored properties. |
protected abstract void |
handleLookupDefinition(java.lang.String name,
java.lang.String lookupKey)
Handles an lookup definition. |
protected abstract boolean |
handleManualMapping(java.lang.String className,
java.lang.String readHandler,
java.lang.String writeHandler)
Handles a manual mapping definition. |
protected abstract void |
handleMultiplexMapping(java.lang.String typeName,
java.lang.String className)
Defines an entry for the multiplex mapping. |
protected java.lang.Class |
loadClass(java.lang.String className)
Loads the given class, and ignores all exceptions which may occur during the loading. |
protected void |
parseXml(java.net.URL resource)
Parses an XML document at the given URL. |
protected void |
parseXmlDocument(java.net.URL resource,
boolean isInclude)
Parses the given specification and loads all includes specified in the files. |
protected void |
setCloseComment(java.lang.String[] closeComment)
Sets the close comment. |
protected void |
setOpenComment(java.lang.String[] openComment)
Sets the open comment. |
protected void |
startIncludeHandling(java.net.URL resource)
Start handling an include. |
protected abstract void |
startMultiplexMapping(java.lang.String className,
java.lang.String typeAttr)
Starts a multiplex mapping. |
protected abstract boolean |
startObjectDefinition(java.lang.String className,
java.lang.String register,
boolean ignored)
Starts a object definition. |
protected void |
startRootDocument()
Start the root document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractModelReader()
Method Detail |
---|
protected CommentHandler getCommentHandler()
protected java.lang.String[] getCloseComment()
protected java.lang.String[] getOpenComment()
protected void setCloseComment(java.lang.String[] closeComment)
closeComment
- the close comment.protected void setOpenComment(java.lang.String[] openComment)
openComment
- the open comment.protected void parseXml(java.net.URL resource) throws ObjectDescriptionException
resource
- the document URL.
ObjectDescriptionException
- ??protected void parseXmlDocument(java.net.URL resource, boolean isInclude) throws ObjectDescriptionException
resource
- the url of the xml specification.isInclude
- an include?
ObjectDescriptionException
- if an error occured which prevented the
loading of the specifications.protected void startRootDocument()
protected void endRootDocument()
protected void startIncludeHandling(java.net.URL resource)
resource
- the URL.protected void endIncludeHandling()
protected void handleIgnoredProperty(java.lang.String name)
name
- the name of the ignored property.protected abstract boolean handleManualMapping(java.lang.String className, java.lang.String readHandler, java.lang.String writeHandler) throws ObjectDescriptionException
className
- the base class namereadHandler
- the class name of the read handlerwriteHandler
- the class name of the write handler
ObjectDescriptionException
- if an unexpected error occured.protected abstract boolean startObjectDefinition(java.lang.String className, java.lang.String register, boolean ignored) throws ObjectDescriptionException
className
- the class name of the defined objectregister
- the (optional) register name, to lookup and reference the object
later.ignored
- ??.
ObjectDescriptionException
- if an unexpected error occured.protected abstract void handleAttributeDefinition(java.lang.String name, java.lang.String attribName, java.lang.String handlerClass) throws ObjectDescriptionException
name
- the name of the propertyattribName
- the xml-attribute name to use later.handlerClass
- the attribute handler class.
ObjectDescriptionException
- if an error occured.protected abstract void handleElementDefinition(java.lang.String name, java.lang.String element) throws ObjectDescriptionException
name
- the name of the propertyelement
- the xml-tag name for the child element.
ObjectDescriptionException
- if an error occurs.protected abstract void handleLookupDefinition(java.lang.String name, java.lang.String lookupKey) throws ObjectDescriptionException
name
- the property name of the base objectlookupKey
- the register key of the referenced object
ObjectDescriptionException
- if an error occured.protected abstract void endObjectDefinition() throws ObjectDescriptionException
ObjectDescriptionException
- if an error occures.protected abstract void startMultiplexMapping(java.lang.String className, java.lang.String typeAttr)
className
- the base class nametypeAttr
- the xml-attribute name containing the mapping keyprotected abstract void handleMultiplexMapping(java.lang.String typeName, java.lang.String className) throws ObjectDescriptionException
typename
and
will resolve to the handler for the given classname.
typeName
- the type value for this mapping.className
- the class name to which this mapping resolves.
ObjectDescriptionException
- if an error occurs.protected abstract void endMultiplexMapping() throws ObjectDescriptionException
ObjectDescriptionException
- if an error occurs.protected abstract void handleConstructorDefinition(java.lang.String propertyName, java.lang.String parameterClass) throws ObjectDescriptionException
propertyName
- the property name of the referenced local propertyparameterClass
- the parameter class for the parameter.
ObjectDescriptionException
- if an error occured.protected java.lang.Class loadClass(java.lang.String className)
className
- the name of the class to be loaded.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |