Copyright test
[jalview.git] / src / jalview / binding / UserColourScheme.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 UserColourScheme.
39  * 
40  * @version $Revision$ $Date$
41  */
42 public class UserColourScheme extends JalviewUserColours
43         implements java.io.Serializable
44 {
45
46   // ----------------/
47   // - Constructors -/
48   // ----------------/
49
50   public UserColourScheme()
51   {
52     super();
53   }
54
55   // -----------/
56   // - Methods -/
57   // -----------/
58
59   /**
60    * Method isValid.
61    * 
62    * @return true if this object is valid according to the schema
63    */
64   public boolean isValid()
65   {
66     try
67     {
68       validate();
69     } catch (org.exolab.castor.xml.ValidationException vex)
70     {
71       return false;
72     }
73     return true;
74   }
75
76   /**
77    * 
78    * 
79    * @param out
80    * @throws org.exolab.castor.xml.MarshalException
81    *           if object is null or if any SAXException is thrown during
82    *           marshaling
83    * @throws org.exolab.castor.xml.ValidationException
84    *           if this object is an invalid instance according to the schema
85    */
86   public void marshal(final java.io.Writer out)
87           throws org.exolab.castor.xml.MarshalException,
88           org.exolab.castor.xml.ValidationException
89   {
90     Marshaller.marshal(this, out);
91   }
92
93   /**
94    * 
95    * 
96    * @param handler
97    * @throws java.io.IOException
98    *           if an IOException occurs during marshaling
99    * @throws org.exolab.castor.xml.ValidationException
100    *           if this object is an invalid instance according to the schema
101    * @throws org.exolab.castor.xml.MarshalException
102    *           if object is null or if any SAXException is thrown during
103    *           marshaling
104    */
105   public void marshal(final org.xml.sax.ContentHandler handler)
106           throws java.io.IOException,
107           org.exolab.castor.xml.MarshalException,
108           org.exolab.castor.xml.ValidationException
109   {
110     Marshaller.marshal(this, handler);
111   }
112
113   /**
114    * Method unmarshal.
115    * 
116    * @param reader
117    * @throws org.exolab.castor.xml.MarshalException
118    *           if object is null or if any SAXException is thrown during
119    *           marshaling
120    * @throws org.exolab.castor.xml.ValidationException
121    *           if this object is an invalid instance according to the schema
122    * @return the unmarshaled jalview.binding.JalviewUserColours
123    */
124   public static jalview.binding.JalviewUserColours unmarshal(
125           final java.io.Reader reader)
126           throws org.exolab.castor.xml.MarshalException,
127           org.exolab.castor.xml.ValidationException
128   {
129     return (jalview.binding.JalviewUserColours) Unmarshaller
130             .unmarshal(jalview.binding.UserColourScheme.class, reader);
131   }
132
133   /**
134    * 
135    * 
136    * @throws org.exolab.castor.xml.ValidationException
137    *           if this object is an invalid instance according to the schema
138    */
139   public void validate() throws org.exolab.castor.xml.ValidationException
140   {
141     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
142     validator.validate(this);
143   }
144
145 }