| java.lang.Object org.jfree.xml.writer.RootXmlWriteHandler
RootXmlWriteHandler | abstract public class RootXmlWriteHandler (Code) | | A root handler for writing objects to XML format.
|
Constructor Summary | |
public | RootXmlWriteHandler() Creates a new RootXmlWrite handler with the default mappings enabled. |
RootXmlWriteHandler | public RootXmlWriteHandler()(Code) | | Creates a new RootXmlWrite handler with the default mappings enabled.
|
addManualMapping | protected void addManualMapping(Class classToWrite, Class handler)(Code) | | Adds a new manual mapping to this handler.
This method provides support for the manual mapping. The manual mapping
will become active before the multiplexers were queried. This facility
could be used to override the model definition.
Parameters: classToWrite - the class, which should be handled Parameters: handler - the write handler implementation for that class. |
addMultiplexMapping | protected void addMultiplexMapping(Class baseClass, String typeAttr, MultiplexMappingEntry[] mdef)(Code) | | Adds a multiplex mapping.
Parameters: baseClass - the base class. Parameters: typeAttr - the type attribute. Parameters: mdef - the mapping entries. |
getFactoryLoader | abstract protected ObjectFactory getFactoryLoader()(Code) | | Returns the object factory.
the object factory. |
getMapping | protected XmlWriteHandler getMapping(Class classToWrite) throws XMLWriterException(Code) | | Tries to find the mapping for the given class. This will first check
the manual mapping and then try to use the object factory to resolve
the class parameter into a write handler.
Parameters: classToWrite - the class for which to find a handler. the write handler, never null. throws: XMLWriterException - if no handler could be found for the given class. |
loadHandlerClass | protected XmlWriteHandler loadHandlerClass(String className) throws XMLWriterException(Code) | | Loads the given class, and ignores all exceptions which may occur
during the loading. If the class was invalid, null is returned instead.
Parameters: className - the name of the class to be loaded. the class or null. throws: XMLWriterException - if there is a writer exception. |
write | public void write(String tagName, Object object, Class baseClass, XMLWriter writer) throws IOException, XMLWriterException(Code) | | Writes the given object with the specified tagname. This method will
do nothing, if the given object is null.
Parameters: tagName - the tagname for the xml-element containing the objectdefinition. The tagname must not be null. Parameters: object - the object which should be written. Parameters: baseClass - the base class. Parameters: writer - the xml writer used to write the content, never null. throws: IOException - if an IOException occures. throws: XMLWriterException - if an object model related error occures duringthe writing. |
|
|