common-util

local.tomas.common.xml.impl
Class StreamCreatorImpl

java.lang.Object
  extended by local.tomas.common.xml.XMLStreamCreator
      extended by local.tomas.common.xml.impl.StreamCreatorImpl
All Implemented Interfaces:
XMLIdGenerator

public class StreamCreatorImpl
extends XMLStreamCreator
implements XMLIdGenerator

Stream creator implementation.

Author:
tomas

Constructor Summary
StreamCreatorImpl(Result result)
          Construct stream creator from Result.
 
Method Summary
 int generateId()
          Generate id.
 void put(Class type, Object obj, String rootElement)
          Create XML from object.
 void setIdGenerator(XMLIdGenerator idGenerator)
          Define the XML id generator used for tag creation.
 
Methods inherited from class local.tomas.common.xml.XMLStreamCreator
createInstance, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamCreatorImpl

public StreamCreatorImpl(Result result)
Construct stream creator from Result.

Parameters:
result - the Result
Method Detail

generateId

public int generateId()
Description copied from interface: XMLIdGenerator
Generate id.

Specified by:
generateId in interface XMLIdGenerator
Returns:
new id

put

public void put(Class type,
                Object obj,
                String rootElement)
         throws SAXException
Description copied from class: XMLStreamCreator
Create XML from object.

Specified by:
put in class XMLStreamCreator
Parameters:
type - - object type
obj - - object
rootElement - - name of XML root element
Throws:
SAXException

setIdGenerator

public void setIdGenerator(XMLIdGenerator idGenerator)
Description copied from class: XMLStreamCreator
Define the XML id generator used for tag creation.

Specified by:
setIdGenerator in class XMLStreamCreator
Parameters:
idGenerator - - the new generator
See Also:
XMLIdGenerator

common-util

Copyright © 2007 null. All Rights Reserved.