common-util

local.tomas.common.xml
Class XMLStreamCreator

java.lang.Object
  extended by local.tomas.common.xml.XMLStreamCreator
Direct Known Subclasses:
StreamCreatorImpl

public abstract class XMLStreamCreator
extends Object

This class is used to create an XML description of some object.

Author:
tomas

Constructor Summary
protected XMLStreamCreator()
           
 
Method Summary
static XMLStreamCreator createInstance(Result result)
          Create an instance.
abstract  void put(Class type, Object obj, String rootElement)
          Create XML from object.
 void put(Object obj, String rootElement)
          Create XML from object.
abstract  void setIdGenerator(XMLIdGenerator idGenerator)
          Define the XML id generator used for tag creation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLStreamCreator

protected XMLStreamCreator()
Method Detail

createInstance

public static XMLStreamCreator createInstance(Result result)
Create an instance.

Parameters:
result - - XML transformation result used store the description
Returns:
the instance

put

public abstract void put(Class type,
                         Object obj,
                         String rootElement)
                  throws SAXException
Create XML from object.

Parameters:
type - - object type
obj - - object
rootElement - - name of XML root element
Throws:
SAXException

put

public void put(Object obj,
                String rootElement)
         throws SAXException
Create XML from object.

Parameters:
obj - - object
rootElement - - name of XML root element
Throws:
SAXException

setIdGenerator

public abstract void setIdGenerator(XMLIdGenerator idGenerator)
Define the XML id generator used for tag creation.

Parameters:
idGenerator - - the new generator
See Also:
XMLIdGenerator

common-util

Copyright © 2007 null. All Rights Reserved.