Copyright test
[jalview.git] / src / jalview / binding / Alignment.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $(date) The Jalview Authors
4  *
5  * This file is part of Jalview.
6  *  
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *   
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  *******************************************************************************/
21 /*
22  * This class was automatically generated with 
23  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
24  * Schema.
25  * $Id$
26  */
27
28 package jalview.binding;
29
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
33
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
36
37 /**
38  * Class Alignment.
39  * 
40  * @version $Revision$ $Date$
41  */
42 public class Alignment implements java.io.Serializable
43 {
44
45   // --------------------------/
46   // - Class/Member Variables -/
47   // --------------------------/
48
49   /**
50    * Field _annotation.
51    */
52   private jalview.binding.Annotation _annotation;
53
54   /**
55    * Field _sequenceSet.
56    */
57   private jalview.binding.SequenceSet _sequenceSet;
58
59   // ----------------/
60   // - Constructors -/
61   // ----------------/
62
63   public Alignment()
64   {
65     super();
66   }
67
68   // -----------/
69   // - Methods -/
70   // -----------/
71
72   /**
73    * Returns the value of field 'annotation'.
74    * 
75    * @return the value of field 'Annotation'.
76    */
77   public jalview.binding.Annotation getAnnotation()
78   {
79     return this._annotation;
80   }
81
82   /**
83    * Returns the value of field 'sequenceSet'.
84    * 
85    * @return the value of field 'SequenceSet'.
86    */
87   public jalview.binding.SequenceSet getSequenceSet()
88   {
89     return this._sequenceSet;
90   }
91
92   /**
93    * Method isValid.
94    * 
95    * @return true if this object is valid according to the schema
96    */
97   public boolean isValid()
98   {
99     try
100     {
101       validate();
102     } catch (org.exolab.castor.xml.ValidationException vex)
103     {
104       return false;
105     }
106     return true;
107   }
108
109   /**
110    * 
111    * 
112    * @param out
113    * @throws org.exolab.castor.xml.MarshalException
114    *           if object is null or if any SAXException is thrown during
115    *           marshaling
116    * @throws org.exolab.castor.xml.ValidationException
117    *           if this object is an invalid instance according to the schema
118    */
119   public void marshal(final java.io.Writer out)
120           throws org.exolab.castor.xml.MarshalException,
121           org.exolab.castor.xml.ValidationException
122   {
123     Marshaller.marshal(this, out);
124   }
125
126   /**
127    * 
128    * 
129    * @param handler
130    * @throws java.io.IOException
131    *           if an IOException occurs during marshaling
132    * @throws org.exolab.castor.xml.ValidationException
133    *           if this object is an invalid instance according to the schema
134    * @throws org.exolab.castor.xml.MarshalException
135    *           if object is null or if any SAXException is thrown during
136    *           marshaling
137    */
138   public void marshal(final org.xml.sax.ContentHandler handler)
139           throws java.io.IOException,
140           org.exolab.castor.xml.MarshalException,
141           org.exolab.castor.xml.ValidationException
142   {
143     Marshaller.marshal(this, handler);
144   }
145
146   /**
147    * Sets the value of field 'annotation'.
148    * 
149    * @param annotation
150    *          the value of field 'annotation'.
151    */
152   public void setAnnotation(final jalview.binding.Annotation annotation)
153   {
154     this._annotation = annotation;
155   }
156
157   /**
158    * Sets the value of field 'sequenceSet'.
159    * 
160    * @param sequenceSet
161    *          the value of field 'sequenceSet'.
162    */
163   public void setSequenceSet(final jalview.binding.SequenceSet sequenceSet)
164   {
165     this._sequenceSet = sequenceSet;
166   }
167
168   /**
169    * Method unmarshal.
170    * 
171    * @param reader
172    * @throws org.exolab.castor.xml.MarshalException
173    *           if object is null or if any SAXException is thrown during
174    *           marshaling
175    * @throws org.exolab.castor.xml.ValidationException
176    *           if this object is an invalid instance according to the schema
177    * @return the unmarshaled jalview.binding.Alignment
178    */
179   public static jalview.binding.Alignment unmarshal(
180           final java.io.Reader reader)
181           throws org.exolab.castor.xml.MarshalException,
182           org.exolab.castor.xml.ValidationException
183   {
184     return (jalview.binding.Alignment) Unmarshaller
185             .unmarshal(jalview.binding.Alignment.class, reader);
186   }
187
188   /**
189    * 
190    * 
191    * @throws org.exolab.castor.xml.ValidationException
192    *           if this object is an invalid instance according to the schema
193    */
194   public void validate() throws org.exolab.castor.xml.ValidationException
195   {
196     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
197     validator.validate(this);
198   }
199
200 }