refactored org to uk
[vamsas.git] / src / uk / ac / vamsas / objects / core / DataSetAnnotations.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
4  * Schema.
5  * $Id:DataSetAnnotations.java 264 2006-12-14 17:42:54Z JimP $
6  */
7
8 package uk.ac.vamsas.objects.core;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import java.io.IOException;
15 import java.io.Reader;
16 import java.io.Serializable;
17 import java.io.Writer;
18 import org.exolab.castor.xml.MarshalException;
19 import org.exolab.castor.xml.Marshaller;
20 import org.exolab.castor.xml.Unmarshaller;
21 import org.exolab.castor.xml.ValidationException;
22 import org.xml.sax.ContentHandler;
23
24 /**
25  * Class DataSetAnnotations.
26  * 
27  * @version $Revision:264 $ $Date:2006-12-14 17:42:54 +0000 (Thu, 14 Dec 2006) $
28  */
29 public class DataSetAnnotations extends uk.ac.vamsas.objects.core.RangeAnnotation 
30 implements java.io.Serializable
31 {
32
33
34       //--------------------------/
35      //- Class/Member Variables -/
36     //--------------------------/
37
38     /**
39      * annotation is associated with a
40      *  particular dataset sequence 
41      */
42     private java.lang.Object _seqRef;
43
44     /**
45      * Field _provenance
46      */
47     private uk.ac.vamsas.objects.core.Provenance _provenance;
48
49
50       //----------------/
51      //- Constructors -/
52     //----------------/
53
54     public DataSetAnnotations() 
55      {
56         super();
57     } //-- uk.ac.vamsas.objects.core.DataSetAnnotations()
58
59
60       //-----------/
61      //- Methods -/
62     //-----------/
63
64     /**
65      * Note: hashCode() has not been overriden
66      * 
67      * @param obj
68      * @return boolean
69      */
70     public boolean equals(java.lang.Object obj)
71     {
72         if ( this == obj )
73             return true;
74         
75         if (super.equals(obj)==false)
76             return false;
77         
78         if (obj instanceof DataSetAnnotations) {
79         
80             DataSetAnnotations temp = (DataSetAnnotations)obj;
81             if (this._seqRef != null) {
82                 if (temp._seqRef == null) return false;
83                 else if (!(this._seqRef.equals(temp._seqRef))) 
84                     return false;
85             }
86             else if (temp._seqRef != null)
87                 return false;
88             if (this._provenance != null) {
89                 if (temp._provenance == null) return false;
90                 else if (!(this._provenance.equals(temp._provenance))) 
91                     return false;
92             }
93             else if (temp._provenance != null)
94                 return false;
95             return true;
96         }
97         return false;
98     } //-- boolean equals(java.lang.Object) 
99
100     /**
101      * Returns the value of field 'provenance'.
102      * 
103      * @return Provenance
104      * @return the value of field 'provenance'.
105      */
106     public uk.ac.vamsas.objects.core.Provenance getProvenance()
107     {
108         return this._provenance;
109     } //-- uk.ac.vamsas.objects.core.Provenance getProvenance() 
110
111     /**
112      * Returns the value of field 'seqRef'. The field 'seqRef' has
113      * the following description: annotation is associated with a
114      *  particular dataset sequence 
115      * 
116      * @return Object
117      * @return the value of field 'seqRef'.
118      */
119     public java.lang.Object getSeqRef()
120     {
121         return this._seqRef;
122     } //-- java.lang.Object getSeqRef() 
123
124     /**
125      * Method isValid
126      * 
127      * 
128      * 
129      * @return boolean
130      */
131     public boolean isValid()
132     {
133         try {
134             validate();
135         }
136         catch (org.exolab.castor.xml.ValidationException vex) {
137             return false;
138         }
139         return true;
140     } //-- boolean isValid() 
141
142     /**
143      * Method marshal
144      * 
145      * 
146      * 
147      * @param out
148      */
149     public void marshal(java.io.Writer out)
150         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
151     {
152         
153         Marshaller.marshal(this, out);
154     } //-- void marshal(java.io.Writer) 
155
156     /**
157      * Method marshal
158      * 
159      * 
160      * 
161      * @param handler
162      */
163     public void marshal(org.xml.sax.ContentHandler handler)
164         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
165     {
166         
167         Marshaller.marshal(this, handler);
168     } //-- void marshal(org.xml.sax.ContentHandler) 
169
170     /**
171      * Sets the value of field 'provenance'.
172      * 
173      * @param provenance the value of field 'provenance'.
174      */
175     public void setProvenance(uk.ac.vamsas.objects.core.Provenance provenance)
176     {
177         this._provenance = provenance;
178     } //-- void setProvenance(uk.ac.vamsas.objects.core.Provenance) 
179
180     /**
181      * Sets the value of field 'seqRef'. The field 'seqRef' has the
182      * following description: annotation is associated with a
183      *  particular dataset sequence 
184      * 
185      * @param seqRef the value of field 'seqRef'.
186      */
187     public void setSeqRef(java.lang.Object seqRef)
188     {
189         this._seqRef = seqRef;
190     } //-- void setSeqRef(java.lang.Object) 
191
192     /**
193      * Method unmarshal
194      * 
195      * 
196      * 
197      * @param reader
198      * @return RangeType
199      */
200     public static uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)
201         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
202     {
203         return (uk.ac.vamsas.objects.core.DataSetAnnotations) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.DataSetAnnotations.class, reader);
204     } //-- uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader) 
205
206     /**
207      * Method validate
208      * 
209      */
210     public void validate()
211         throws org.exolab.castor.xml.ValidationException
212     {
213         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
214         validator.validate(this);
215     } //-- void validate() 
216
217 }