Class DefaultModelReader
java.lang.Object
org.jfree.xml.util.AbstractModelReader
org.jfree.xml.generator.DefaultModelReader
A reader for the class model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidEnds include handling.protected voidEnds a multiplex mapping.protected voidFinishes processing an object definition (sets the constructor and property info for the class description, and adds the class description to the model).protected voidEnds the root document.protected voidIterates through all the class descriptions in the model, setting the superclass attribute in all cases where the superclass definitions are contained in the model.protected PropertyDescriptorgetPropertyDescriptor(String propertyName) Returns a property descriptor for the named property, ornullif there is no descriptor with the given name.protected voidhandleAttributeDefinition(String name, String attribName, String handlerClass) Handles the description of an attribute within an object definition.protected voidhandleConstructorDefinition(String tagName, String parameterClass) Handles the constructor definition.protected voidhandleElementDefinition(String name, String element) Handles the description of an element within an object definition.protected voidhandleIgnoredProperty(String name) Handles an ignored property.protected voidhandleLookupDefinition(String name, String lookupKey) Handles a lookup definition.protected booleanhandleManualMapping(String className, String readHandler, String writeHandler) Handles a manual mapping.protected voidhandleMultiplexMapping(String typeName, String className) Handles a multiplex mapping.Loads a description model.protected voidstartIncludeHandling(URL resource) Starts include handling.protected voidstartMultiplexMapping(String className, String typeAttr) Start a multiplex mapping.protected booleanstartObjectDefinition(String className, String register, boolean ignore) Begin processing an object definition element.protected voidStarts the root document.Methods inherited from class AbstractModelReader
getCloseComment, getCommentHandler, getOpenComment, loadClass, parseXml, parseXmlDocument, setCloseComment, setOpenComment
-
Constructor Details
-
DefaultModelReader
public DefaultModelReader()Creates a new model reader.
-
-
Method Details
-
load
Loads a description model.- Parameters:
file- the file name.- Returns:
- A description model.
- Throws:
IOException- if there is an I/O problem.ObjectDescriptionException- if there is a problem reading the object descriptions.
-
fillSuperClasses
Iterates through all the class descriptions in the model, setting the superclass attribute in all cases where the superclass definitions are contained in the model. -
startObjectDefinition
Begin processing an object definition element.- Specified by:
startObjectDefinitionin classAbstractModelReader- Parameters:
className- the class name.register- the register name (nullpermitted).ignore- ??- Returns:
trueif the class is available, andfalseotherwise.
-
endObjectDefinition
Finishes processing an object definition (sets the constructor and property info for the class description, and adds the class description to the model).- Specified by:
endObjectDefinitionin classAbstractModelReader- Throws:
ObjectDescriptionException- if there is a problem with the object description.
-
handleAttributeDefinition
protected void handleAttributeDefinition(String name, String attribName, String handlerClass) throws ObjectDescriptionException Handles the description of an attribute within an object definition.- Specified by:
handleAttributeDefinitionin classAbstractModelReader- Parameters:
name- the name.attribName- the attribute name.handlerClass- the fully qualified class name for the attribute handler.- Throws:
ObjectDescriptionException- if there is a problem with the object description.
-
handleConstructorDefinition
protected void handleConstructorDefinition(String tagName, String parameterClass) throws ObjectDescriptionException Handles the constructor definition.- Specified by:
handleConstructorDefinitionin classAbstractModelReader- Parameters:
tagName- the tag name.parameterClass- the parameter class.- Throws:
ObjectDescriptionException- if there is a problem with the object description.
-
handleElementDefinition
protected void handleElementDefinition(String name, String element) throws ObjectDescriptionException Handles the description of an element within an object definition.- Specified by:
handleElementDefinitionin classAbstractModelReader- Parameters:
name- the property name.element- the element name.- Throws:
ObjectDescriptionException- if there is a problem with the object description.
-
handleLookupDefinition
protected void handleLookupDefinition(String name, String lookupKey) throws ObjectDescriptionException Handles a lookup definition.- Specified by:
handleLookupDefinitionin classAbstractModelReader- Parameters:
name- the name.lookupKey- the lookup key.- Throws:
ObjectDescriptionException- if there is a problem with the object description.
-
getPropertyDescriptor
Returns a property descriptor for the named property, ornullif there is no descriptor with the given name.- Parameters:
propertyName- the property name.- Returns:
- a property descriptor.
-
handleIgnoredProperty
Handles an ignored property.- Overrides:
handleIgnoredPropertyin classAbstractModelReader- Parameters:
name- the name.
-
handleManualMapping
protected boolean handleManualMapping(String className, String readHandler, String writeHandler) throws ObjectDescriptionException Handles a manual mapping.- Specified by:
handleManualMappingin classAbstractModelReader- Parameters:
className- the class name.readHandler- the read handler.writeHandler- the write handler.- Returns:
- A boolean.
- Throws:
ObjectDescriptionException- if there is a problem with the object description.
-
startMultiplexMapping
Start a multiplex mapping.- Specified by:
startMultiplexMappingin classAbstractModelReader- Parameters:
className- the class name.typeAttr- the type.
-
handleMultiplexMapping
protected void handleMultiplexMapping(String typeName, String className) throws ObjectDescriptionException Handles a multiplex mapping.- Specified by:
handleMultiplexMappingin classAbstractModelReader- Parameters:
typeName- the type name.className- the class name.- Throws:
ObjectDescriptionException- if there is a problem with the object description.
-
endMultiplexMapping
Ends a multiplex mapping.- Specified by:
endMultiplexMappingin classAbstractModelReader- Throws:
ObjectDescriptionException- if there is a problem with the object description.
-
startIncludeHandling
Starts include handling.- Overrides:
startIncludeHandlingin classAbstractModelReader- Parameters:
resource- the URL.
-
endIncludeHandling
Ends include handling.- Overrides:
endIncludeHandlingin classAbstractModelReader
-
startRootDocument
Starts the root document.- Overrides:
startRootDocumentin classAbstractModelReader
-
endRootDocument
Ends the root document.- Overrides:
endRootDocumentin classAbstractModelReader
-