Class InMemory
- java.lang.Object
-
- edu.isi.pegasus.planner.provenance.pasoa.producer.InMemory
-
- All Implemented Interfaces:
XMLProducer
public class InMemory extends java.lang.Object implements XMLProducer
An implementation of the XMLProducer interface backed by a StringBuffer. It does not check for any wellformedness of the XML. It is basically a data store.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.String xml)Adds to the internal XML representation.voidclear()Clears the internal state.private voidreset()Resets the internal store.java.lang.StringtoXML()Returns the interaction assertions as a XML blob.voidtoXML(java.io.Writer writer)Returns the xml description of the object.
-
-
-
Method Detail
-
add
public void add(java.lang.String xml)
Adds to the internal XML representation.- Specified by:
addin interfaceXMLProducer- Parameters:
xml- the XML fragment to be added.
-
clear
public void clear()
Clears the internal state.- Specified by:
clearin interfaceXMLProducer
-
toXML
public void toXML(java.io.Writer writer) throws java.io.IOExceptionReturns the xml description of the object.- Specified by:
toXMLin interfaceXMLProducer- Parameters:
writer- is a Writer opened and ready for writing. This can also be a StringWriter for efficient output.- Throws:
java.io.IOException- if something fishy happens to the stream.
-
toXML
public java.lang.String toXML() throws java.io.IOExceptionReturns the interaction assertions as a XML blob.- Specified by:
toXMLin interfaceXMLProducer- Returns:
- String
- Throws:
java.io.IOException- if something fishy happens to the stream.
-
reset
private void reset()
Resets the internal store.
-
-