public abstract class AbstractModelReader extends java.lang.Object
| Constructor and Description |
|---|
AbstractModelReader()
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public AbstractModelReader()
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 handlerObjectDescriptionException - 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 objectObjectDescriptionException - 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.