KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.sapia.util.xml.idefix;
2
3
4 // Import of Sun's JDK classes
5
// ---------------------------
6
import java.util.Collection JavaDoc;
7 import java.util.Iterator JavaDoc;
8 import java.util.List JavaDoc;
9 import java.util.Map JavaDoc;
10
11
12 /**
13  *
14  *
15  * @author Jean-Cedric Desrochers
16  *
17  * <dl>
18  * <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>
19  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
20  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
21  * </dl>
22  */

23 public interface XmlEncoderIF {
24   /**
25    * Encodes the object passed in as a leaf.
26    *
27    * @param aName The name of the leaf to encode.
28    * @param aValue The value of the leaf to encode.
29    * @param anXmlBuffer The xml buffer to use to encode the leaf.
30    */

31   public void encodeLeaf(String JavaDoc aName, Object JavaDoc aValue, XmlBuffer anXmlBuffer);
32
33   /**
34    * Encodes the object passed in as a node.
35    *
36    * @param anObject The object to encode.
37    * @param anXmlBuffer The xml buffer to use to encode the node.
38    * @param someObjects The list of visited object (to detect circular references).
39    */

40   public void encodeNode(Object JavaDoc anObject, XmlBuffer anXmlBuffer,
41     List JavaDoc someObjects);
42
43   /**
44    * Encodes the object passed in as a java array.
45    *
46    * @param anArray The array of objects to encode.
47    * @param anXmlBuffer The xml buffer to use to encode the leaf.
48    * @param someObjects The list of visited object (to detect circular references).
49    */

50   public void encodeArray(Object JavaDoc anArray, XmlBuffer anXmlBuffer,
51     List JavaDoc someObjects);
52
53   /**
54    * Encodes the object passed in as a collection.
55    *
56    * @param aCollection The collection of objects to encode.
57    * @param anXmlBuffer The xml buffer to use to encode the object.
58    * @param someObjects The list of visited object (to detect circular references).
59    */

60   public void encodeCollection(Collection JavaDoc aCollection, XmlBuffer anXmlBuffer,
61     List JavaDoc someObjects);
62
63   /**
64    * Encodes the object passed in as an iterator.
65    *
66    * @param anIterator The iterator of objects to encode.
67    * @param anXmlBuffer The xml buffer to use to encode the object.
68    * @param someObjects The list of visited object (to detect circular references).
69    */

70   public void encodeIterator(Iterator JavaDoc anIterator, XmlBuffer anXmlBuffer,
71     List JavaDoc someObjects);
72
73   /**
74    * Encodes the object passed in as a map.
75    *
76    * @param aMap The map of objects to encode.
77    * @param anXmlBuffer The xml buffer to use to encode the object.
78    * @param someObjects The list of visited object (to detect circular references).
79    */

80   public void encodeMap(Map JavaDoc aMap, XmlBuffer anXmlBuffer, List JavaDoc someObjects);
81 }
82
Popular Tags