KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > util > xml > idefix > IdefixProcessorIF


1 package org.sapia.util.xml.idefix;
2
3
4 // Import of Sapia's utility classes
5
// ---------------------------------
6
import org.sapia.util.xml.ProcessingException;
7
8 import java.io.IOException JavaDoc;
9
10 // Import of Sun's JDK classes
11
// ---------------------------
12
import java.io.OutputStream JavaDoc;
13
14
15 /**
16  * Specifies the common "public" behavior of an Idefix processor - that
17  * transform an object graph to a XML string.
18  *
19  * @see IdefixProcessorFactory
20  * @author Jean-Cedric Desrochers
21  * <dl>
22  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
23  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
24  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
25  * </dl>
26  */

27 public interface IdefixProcessorIF {
28   /**
29    * This method takes an object and walk though its hierarchy to generate an XML
30    * representation of it. The result XML will be returned as a <CODE>String</CODE>
31    * object.
32    *
33    * @param anObject The object to process.
34    * @return The string of the XML representation.
35    * @exception ProcessingException If an error occurs while processing the object.
36    */

37   public String JavaDoc process(Object JavaDoc anObject) throws ProcessingException;
38
39   /**
40    * This method takes an object and walk though its hierarchy to generate an XML
41    * representation of it. The result XML will be streamed into the output stream
42    * passed in.
43    *
44    * @param anObject The object to process.
45    * @param anOutput The output stream in which to add the XML.
46    * @exception IOException If an error occurs writing to the output stream.
47    * @exception ProcessingException If an error occurs while processing the object.
48    */

49   public void process(Object JavaDoc anObject, OutputStream JavaDoc anOutput)
50     throws IOException JavaDoc, ProcessingException;
51 }
52
Popular Tags