refactored org to uk
[vamsas.git] / src / uk / ac / vamsas / objects / core / Common.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package uk.ac.vamsas.objects.core;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import java.io.IOException;\r
15 import java.io.Reader;\r
16 import java.io.Serializable;\r
17 import java.io.Writer;\r
18 import org.exolab.castor.xml.MarshalException;\r
19 import org.exolab.castor.xml.Marshaller;\r
20 import org.exolab.castor.xml.Unmarshaller;\r
21 import org.exolab.castor.xml.ValidationException;\r
22 import org.xml.sax.ContentHandler;\r
23 \r
24 /**\r
25  * Class Common.\r
26  * \r
27  * @version $Revision$ $Date$\r
28  */\r
29 public class Common extends uk.ac.vamsas.objects.core.AppData \r
30 implements java.io.Serializable\r
31 {\r
32 \r
33 \r
34       //----------------/\r
35      //- Constructors -/\r
36     //----------------/\r
37 \r
38     public Common() \r
39      {\r
40         super();\r
41     } //-- uk.ac.vamsas.objects.core.Common()\r
42 \r
43 \r
44       //-----------/\r
45      //- Methods -/\r
46     //-----------/\r
47 \r
48     /**\r
49      * Note: hashCode() has not been overriden\r
50      * \r
51      * @param obj\r
52      * @return boolean\r
53      */\r
54     public boolean equals(java.lang.Object obj)\r
55     {\r
56         if ( this == obj )\r
57             return true;\r
58         \r
59         if (super.equals(obj)==false)\r
60             return false;\r
61         \r
62         if (obj instanceof Common) {\r
63         \r
64             Common temp = (Common)obj;\r
65             return true;\r
66         }\r
67         return false;\r
68     } //-- boolean equals(java.lang.Object) \r
69 \r
70     /**\r
71      * Method isValid\r
72      * \r
73      * \r
74      * \r
75      * @return boolean\r
76      */\r
77     public boolean isValid()\r
78     {\r
79         try {\r
80             validate();\r
81         }\r
82         catch (org.exolab.castor.xml.ValidationException vex) {\r
83             return false;\r
84         }\r
85         return true;\r
86     } //-- boolean isValid() \r
87 \r
88     /**\r
89      * Method marshal\r
90      * \r
91      * \r
92      * \r
93      * @param out\r
94      */\r
95     public void marshal(java.io.Writer out)\r
96         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
97     {\r
98         \r
99         Marshaller.marshal(this, out);\r
100     } //-- void marshal(java.io.Writer) \r
101 \r
102     /**\r
103      * Method marshal\r
104      * \r
105      * \r
106      * \r
107      * @param handler\r
108      */\r
109     public void marshal(org.xml.sax.ContentHandler handler)\r
110         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
111     {\r
112         \r
113         Marshaller.marshal(this, handler);\r
114     } //-- void marshal(org.xml.sax.ContentHandler) \r
115 \r
116     /**\r
117      * Method unmarshal\r
118      * \r
119      * \r
120      * \r
121      * @param reader\r
122      * @return AppData\r
123      */\r
124     public static uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader reader)\r
125         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
126     {\r
127         return (uk.ac.vamsas.objects.core.Common) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Common.class, reader);\r
128     } //-- uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader) \r
129 \r
130     /**\r
131      * Method validate\r
132      * \r
133      */\r
134     public void validate()\r
135         throws org.exolab.castor.xml.ValidationException\r
136     {\r
137         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
138         validator.validate(this);\r
139     } //-- void validate() \r
140 \r
141 }\r