org.jfree.xml.generator

Class DefaultModelReader

public class DefaultModelReader extends AbstractModelReader

A reader for the class model.
Constructor Summary
DefaultModelReader()
Creates a new model reader.
Method Summary
protected voidendIncludeHandling()
Ends include handling.
protected voidendMultiplexMapping()
Ends a multiplex mapping.
protected voidendObjectDefinition()
Finishes processing an object definition (sets the constructor and property info for the class description, and adds the class description to the model).
protected voidendRootDocument()
Ends the root document.
protected voidfillSuperClasses()
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.
protected PropertyDescriptorgetPropertyDescriptor(String propertyName)
Returns a property descriptor for the named property, or null if 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.
DescriptionModelload(String file)
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 voidstartRootDocument()
Starts the root document.

Constructor Detail

DefaultModelReader

public DefaultModelReader()
Creates a new model reader.

Method Detail

endIncludeHandling

protected void endIncludeHandling()
Ends include handling.

endMultiplexMapping

protected void endMultiplexMapping()
Ends a multiplex mapping.

Throws: ObjectDescriptionException if there is a problem with the object description.

endObjectDefinition

protected void endObjectDefinition()
Finishes processing an object definition (sets the constructor and property info for the class description, and adds the class description to the model).

Throws: ObjectDescriptionException if there is a problem with the object description.

endRootDocument

protected void endRootDocument()
Ends the root document.

fillSuperClasses

protected void 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.

getPropertyDescriptor

protected PropertyDescriptor getPropertyDescriptor(String propertyName)
Returns a property descriptor for the named property, or null if there is no descriptor with the given name.

Parameters: propertyName the property name.

Returns: a property descriptor.

handleAttributeDefinition

protected void handleAttributeDefinition(String name, String attribName, String handlerClass)
Handles the description of an attribute within an object definition.

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)
Handles the constructor definition.

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)
Handles the description of an element within an object definition.

Parameters: name the property name. element the element name.

Throws: ObjectDescriptionException if there is a problem with the object description.

handleIgnoredProperty

protected void handleIgnoredProperty(String name)
Handles an ignored property.

Parameters: name the name.

handleLookupDefinition

protected void handleLookupDefinition(String name, String lookupKey)
Handles a lookup definition.

Parameters: name the name. lookupKey the lookup key.

Throws: ObjectDescriptionException if there is a problem with the object description.

handleManualMapping

protected boolean handleManualMapping(String className, String readHandler, String writeHandler)
Handles a manual mapping.

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.

handleMultiplexMapping

protected void handleMultiplexMapping(String typeName, String className)
Handles a multiplex mapping.

Parameters: typeName the type name. className the class name.

Throws: ObjectDescriptionException if there is a problem with the object description.

load

public DescriptionModel load(String file)
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.

startIncludeHandling

protected void startIncludeHandling(URL resource)
Starts include handling.

Parameters: resource the URL.

startMultiplexMapping

protected void startMultiplexMapping(String className, String typeAttr)
Start a multiplex mapping.

Parameters: className the class name. typeAttr the type.

startObjectDefinition

protected boolean startObjectDefinition(String className, String register, boolean ignore)
Begin processing an object definition element.

Parameters: className the class name. register the register name (null permitted). ignore ??

Returns: true if the class is available, and false otherwise.

startRootDocument

protected void startRootDocument()
Starts the root document.