01: /**
02: * This file or a portion of this file is licensed under the terms of
03: * the Globus Toolkit Public License, found at $PEGASUS_HOME/GTPL or
04: * http://www.globus.org/toolkit/download/license.html.
05: * This notice must appear in redistributions of this file
06: * with or without modification.
07: *
08: * Redistributions of this Software, with or without modification, must reproduce
09: * the GTPL in:
10: * (1) the Software, or
11: * (2) the Documentation or
12: * some other similar material which is provided with the Software (if any).
13: *
14: * Copyright 1999-2004
15: * University of Chicago and The University of Southern California.
16: * All rights reserved.
17: */package org.griphyn.cPlanner.provenance.pasoa;
18:
19: import java.io.IOException;
20: import java.io.Writer;
21:
22: /**
23: * A PASOA specific interface to generate various assertions as XML.
24: *
25: * @author Karan Vahi
26: * @version $Revision: 241 $
27: */
28: public interface XMLProducer {
29:
30: /**
31: * Clears the internal state.
32: */
33: public void clear();
34:
35: /**
36: * Adds an XML fragment to the internal XML store
37: *
38: * @param xml the XML fragment to be added.
39: *
40: */
41: public void add(String xml);
42:
43: /**
44: * Returns the xml description of the object. This is used for generating
45: * the partition graph. That is no longer done.
46: *
47: * @param writer is a Writer opened and ready for writing. This can also
48: * be a StringWriter for efficient output.
49: *
50: * @exception IOException if something fishy happens to the stream.
51: */
52: public void toXML(Writer writer) throws IOException;
53:
54: /**
55: * Returns the interaction assertions as a XML blob.
56: *
57: * @return String
58: *
59: * @exception IOException if something fishy happens to the stream.
60: */
61: public String toXML() throws IOException;
62:
63: }
|