KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.sapia.util.xml.idefix;
2
3
4 /**
5  * This serialization context contains different entities necessary to
6  * serialize an object into an XML representation.
7  *
8  * @author <a HREF="mailto:jc@sapia-oss.org">Jean-Cedric Desrochers</a>
9  * <dl>
10  * <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>
11  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
12  * <a HREF="http://www.sapia-oss.org/license.html" target="sapia-license">license page</a> at the Sapia OSS web site</dd></dt>
13  * </dl>
14  */

15 public class SerializationContext {
16   /** The serializer factory of this context. */
17   private SerializerFactoryIF _theSerializerFactory;
18
19   /** The namespace factory of this context. */
20   private NamespaceFactoryIF _theNamespaceFactory;
21
22   /** The XML buffer of this context. */
23   private XmlBuffer _theXmlBuffer;
24
25   /**
26    * Creates a new SerializationContext instance with the passed in arguments.
27    *
28    * @param aSerializerFactory The serializer factory of this context.
29    * @param aNamespaceFactory The namespace factory of this context.
30    * @param aBuffer The XML buffer of this context.
31    */

32   public SerializationContext(SerializerFactoryIF aSerializerFactory,
33     NamespaceFactoryIF aNamespaceFactory, XmlBuffer aBuffer) {
34     _theSerializerFactory = aSerializerFactory;
35     _theNamespaceFactory = aNamespaceFactory;
36     _theXmlBuffer = aBuffer;
37   }
38
39   /**
40    * Returns the serializer factory of this context.
41    *
42    * @return The serializer factory of this context.
43    */

44   public SerializerFactoryIF getSerializerFactory() {
45     return _theSerializerFactory;
46   }
47
48   /**
49    * Returns the namespace factory of this context.
50    *
51    * @return The namespace factory of this context.
52    */

53   public NamespaceFactoryIF getNamespaceFactory() {
54     return _theNamespaceFactory;
55   }
56
57   /**
58    * Returns the XMl buffer of this serialization context.
59    *
60    * @return The XMl buffer of this serialization context.
61    */

62   public XmlBuffer getXmlBuffer() {
63     return _theXmlBuffer;
64   }
65 }
66
Popular Tags