JAL-3181 refactor: extracted buildLinkMenu() for testability
[jalview.git] / src / jalview / binding / SequenceType.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.binding;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * Class SequenceType.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class SequenceType implements java.io.Serializable
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Field _id.
31    */
32   private java.lang.String _id;
33
34   /**
35    * Field _sequence.
36    */
37   private java.lang.String _sequence;
38
39   /**
40    * Field _name.
41    */
42   private java.lang.String _name;
43
44   // ----------------/
45   // - Constructors -/
46   // ----------------/
47
48   public SequenceType()
49   {
50     super();
51   }
52
53   // -----------/
54   // - Methods -/
55   // -----------/
56
57   /**
58    * Returns the value of field 'id'.
59    * 
60    * @return the value of field 'Id'.
61    */
62   public java.lang.String getId()
63   {
64     return this._id;
65   }
66
67   /**
68    * Returns the value of field 'name'.
69    * 
70    * @return the value of field 'Name'.
71    */
72   public java.lang.String getName()
73   {
74     return this._name;
75   }
76
77   /**
78    * Returns the value of field 'sequence'.
79    * 
80    * @return the value of field 'Sequence'.
81    */
82   public java.lang.String getSequence()
83   {
84     return this._sequence;
85   }
86
87   /**
88    * Method isValid.
89    * 
90    * @return true if this object is valid according to the schema
91    */
92   public boolean isValid()
93   {
94     try
95     {
96       validate();
97     } catch (org.exolab.castor.xml.ValidationException vex)
98     {
99       return false;
100     }
101     return true;
102   }
103
104   /**
105    * 
106    * 
107    * @param out
108    * @throws org.exolab.castor.xml.MarshalException
109    *           if object is null or if any SAXException is thrown during
110    *           marshaling
111    * @throws org.exolab.castor.xml.ValidationException
112    *           if this object is an invalid instance according to the schema
113    */
114   public void marshal(final java.io.Writer out)
115           throws org.exolab.castor.xml.MarshalException,
116           org.exolab.castor.xml.ValidationException
117   {
118     Marshaller.marshal(this, out);
119   }
120
121   /**
122    * 
123    * 
124    * @param handler
125    * @throws java.io.IOException
126    *           if an IOException occurs during marshaling
127    * @throws org.exolab.castor.xml.ValidationException
128    *           if this object is an invalid instance according to the schema
129    * @throws org.exolab.castor.xml.MarshalException
130    *           if object is null or if any SAXException is thrown during
131    *           marshaling
132    */
133   public void marshal(final org.xml.sax.ContentHandler handler)
134           throws java.io.IOException,
135           org.exolab.castor.xml.MarshalException,
136           org.exolab.castor.xml.ValidationException
137   {
138     Marshaller.marshal(this, handler);
139   }
140
141   /**
142    * Sets the value of field 'id'.
143    * 
144    * @param id
145    *          the value of field 'id'.
146    */
147   public void setId(final java.lang.String id)
148   {
149     this._id = id;
150   }
151
152   /**
153    * Sets the value of field 'name'.
154    * 
155    * @param name
156    *          the value of field 'name'.
157    */
158   public void setName(final java.lang.String name)
159   {
160     this._name = name;
161   }
162
163   /**
164    * Sets the value of field 'sequence'.
165    * 
166    * @param sequence
167    *          the value of field 'sequence'.
168    */
169   public void setSequence(final java.lang.String sequence)
170   {
171     this._sequence = sequence;
172   }
173
174   /**
175    * Method unmarshal.
176    * 
177    * @param reader
178    * @throws org.exolab.castor.xml.MarshalException
179    *           if object is null or if any SAXException is thrown during
180    *           marshaling
181    * @throws org.exolab.castor.xml.ValidationException
182    *           if this object is an invalid instance according to the schema
183    * @return the unmarshaled jalview.binding.SequenceType
184    */
185   public static jalview.binding.SequenceType unmarshal(
186           final java.io.Reader reader)
187           throws org.exolab.castor.xml.MarshalException,
188           org.exolab.castor.xml.ValidationException
189   {
190     return (jalview.binding.SequenceType) Unmarshaller
191             .unmarshal(jalview.binding.SequenceType.class, reader);
192   }
193
194   /**
195    * 
196    * 
197    * @throws org.exolab.castor.xml.ValidationException
198    *           if this object is an invalid instance according to the schema
199    */
200   public void validate() throws org.exolab.castor.xml.ValidationException
201   {
202     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
203     validator.validate(this);
204   }
205
206 }