cbda218263f9720217c8f3e2dc55b2581e5e2b64
[jalview.git] / src / jalview / schemabinding / version2 / AnnotationColours.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.  
17  * If not, see <http://www.gnu.org/licenses/>.
18  * The Jalview Authors are detailed in the 'AUTHORS' file.
19  ******************************************************************************/
20 /*
21  * This class was automatically generated with 
22  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
23  * Schema.
24  * $Id$
25  */
26
27 package jalview.schemabinding.version2;
28
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
32
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
35
36 /**
37  * Class AnnotationColours.
38  * 
39  * @version $Revision$ $Date$
40  */
41 public class AnnotationColours extends AnnotationColourScheme implements
42         java.io.Serializable
43 {
44
45   // ----------------/
46   // - Constructors -/
47   // ----------------/
48
49   public AnnotationColours()
50   {
51     super();
52   }
53
54   // -----------/
55   // - Methods -/
56   // -----------/
57
58   /**
59    * Method isValid.
60    * 
61    * @return true if this object is valid according to the schema
62    */
63   public boolean isValid()
64   {
65     try
66     {
67       validate();
68     } catch (org.exolab.castor.xml.ValidationException vex)
69     {
70       return false;
71     }
72     return true;
73   }
74
75   /**
76    * 
77    * 
78    * @param out
79    * @throws org.exolab.castor.xml.MarshalException
80    *           if object is null or if any SAXException is thrown during
81    *           marshaling
82    * @throws org.exolab.castor.xml.ValidationException
83    *           if this object is an invalid instance according to the schema
84    */
85   public void marshal(final java.io.Writer out)
86           throws org.exolab.castor.xml.MarshalException,
87           org.exolab.castor.xml.ValidationException
88   {
89     Marshaller.marshal(this, out);
90   }
91
92   /**
93    * 
94    * 
95    * @param handler
96    * @throws java.io.IOException
97    *           if an IOException occurs during marshaling
98    * @throws org.exolab.castor.xml.ValidationException
99    *           if this object is an invalid instance according to the schema
100    * @throws org.exolab.castor.xml.MarshalException
101    *           if object is null or if any SAXException is thrown during
102    *           marshaling
103    */
104   public void marshal(final org.xml.sax.ContentHandler handler)
105           throws java.io.IOException,
106           org.exolab.castor.xml.MarshalException,
107           org.exolab.castor.xml.ValidationException
108   {
109     Marshaller.marshal(this, handler);
110   }
111
112   /**
113    * Method unmarshal.
114    * 
115    * @param reader
116    * @throws org.exolab.castor.xml.MarshalException
117    *           if object is null or if any SAXException is thrown during
118    *           marshaling
119    * @throws org.exolab.castor.xml.ValidationException
120    *           if this object is an invalid instance according to the schema
121    * @return the unmarshaled
122    *         jalview.schemabinding.version2.AnnotationColourScheme
123    */
124   public static jalview.schemabinding.version2.AnnotationColourScheme unmarshal(
125           final java.io.Reader reader)
126           throws org.exolab.castor.xml.MarshalException,
127           org.exolab.castor.xml.ValidationException
128   {
129     return (jalview.schemabinding.version2.AnnotationColourScheme) Unmarshaller
130             .unmarshal(
131                     jalview.schemabinding.version2.AnnotationColours.class,
132                     reader);
133   }
134
135   /**
136    * 
137    * 
138    * @throws org.exolab.castor.xml.ValidationException
139    *           if this object is an invalid instance according to the schema
140    */
141   public void validate() throws org.exolab.castor.xml.ValidationException
142   {
143     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
144     validator.validate(this);
145   }
146
147 }