first attempt at object build.
[vamsas.git] / src / org / vamsas / client / objects / AlignmentSequence.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.client.objects;
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.client.objects.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.Object _id;
42
43
44       //----------------/
45      //- Constructors -/
46     //----------------/
47
48     public AlignmentSequence() 
49      {
50         super();
51     } //-- org.vamsas.client.objects.AlignmentSequence()
52
53
54       //-----------/
55      //- Methods -/
56     //-----------/
57
58     /**
59      * Note: hashCode() has not been overriden
60      * 
61      * @param obj
62      * @return boolean
63      */
64     public boolean equals(java.lang.Object obj)
65     {
66         if ( this == obj )
67             return true;
68         
69         if (super.equals(obj)==false)
70             return false;
71         
72         if (obj instanceof AlignmentSequence) {
73         
74             AlignmentSequence temp = (AlignmentSequence)obj;
75             if (this._id != null) {
76                 if (temp._id == null) return false;
77                 else if (!(this._id.equals(temp._id))) 
78                     return false;
79             }
80             else if (temp._id != null)
81                 return false;
82             return true;
83         }
84         return false;
85     } //-- boolean equals(java.lang.Object) 
86
87     /**
88      * Returns the value of field 'id'.
89      * 
90      * @return Object
91      * @return the value of field 'id'.
92      */
93     public java.lang.Object getId()
94     {
95         return this._id;
96     } //-- java.lang.Object getId() 
97
98     /**
99      * Method isValid
100      * 
101      * 
102      * 
103      * @return boolean
104      */
105     public boolean isValid()
106     {
107         try {
108             validate();
109         }
110         catch (org.exolab.castor.xml.ValidationException vex) {
111             return false;
112         }
113         return true;
114     } //-- boolean isValid() 
115
116     /**
117      * Method marshal
118      * 
119      * 
120      * 
121      * @param out
122      */
123     public void marshal(java.io.Writer out)
124         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
125     {
126         
127         Marshaller.marshal(this, out);
128     } //-- void marshal(java.io.Writer) 
129
130     /**
131      * Method marshal
132      * 
133      * 
134      * 
135      * @param handler
136      */
137     public void marshal(org.xml.sax.ContentHandler handler)
138         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
139     {
140         
141         Marshaller.marshal(this, handler);
142     } //-- void marshal(org.xml.sax.ContentHandler) 
143
144     /**
145      * Sets the value of field 'id'.
146      * 
147      * @param id the value of field 'id'.
148      */
149     public void setId(java.lang.Object id)
150     {
151         this._id = id;
152     } //-- void setId(java.lang.Object) 
153
154     /**
155      * Method unmarshal
156      * 
157      * 
158      * 
159      * @param reader
160      * @return SequenceType
161      */
162     public static org.vamsas.client.objects.SequenceType unmarshal(java.io.Reader reader)
163         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
164     {
165         return (org.vamsas.client.objects.AlignmentSequence) Unmarshaller.unmarshal(org.vamsas.client.objects.AlignmentSequence.class, reader);
166     } //-- org.vamsas.client.objects.SequenceType unmarshal(java.io.Reader) 
167
168     /**
169      * Method validate
170      * 
171      */
172     public void validate()
173         throws org.exolab.castor.xml.ValidationException
174     {
175         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
176         validator.validate(this);
177     } //-- void validate() 
178
179 }