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