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