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