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 void
add(java.lang.String xml)
Adds to the internal XML representation.void
clear()
Clears the internal state.private void
reset()
Resets the internal store.java.lang.String
toXML()
Returns the interaction assertions as a XML blob.void
toXML(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:
add
in interfaceXMLProducer
- Parameters:
xml
- the XML fragment to be added.
-
clear
public void clear()
Clears the internal state.- Specified by:
clear
in interfaceXMLProducer
-
toXML
public void toXML(java.io.Writer writer) throws java.io.IOException
Returns the xml description of the object.- Specified by:
toXML
in 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.IOException
Returns the interaction assertions as a XML blob.- Specified by:
toXML
in interfaceXMLProducer
- Returns:
- String
- Throws:
java.io.IOException
- if something fishy happens to the stream.
-
reset
private void reset()
Resets the internal store.
-
-