2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
3 * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 package jalview.binding;
21 // ---------------------------------/
22 // - Imported classes and packages -/
23 // ---------------------------------/
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
29 * Class UserColourScheme.
31 * @version $Revision$ $Date$
33 public class UserColourScheme extends JalviewUserColours implements
41 public UserColourScheme()
53 * @return true if this object is valid according to the schema
55 public boolean isValid()
60 } catch (org.exolab.castor.xml.ValidationException vex)
71 * @throws org.exolab.castor.xml.MarshalException
72 * if object is null or if any SAXException is thrown during
74 * @throws org.exolab.castor.xml.ValidationException
75 * if this object is an invalid instance according to the
78 public void marshal(final java.io.Writer out)
79 throws org.exolab.castor.xml.MarshalException,
80 org.exolab.castor.xml.ValidationException
82 Marshaller.marshal(this, out);
89 * @throws java.io.IOException
90 * if an IOException occurs during marshaling
91 * @throws org.exolab.castor.xml.ValidationException
92 * if this object is an invalid instance according to the
94 * @throws org.exolab.castor.xml.MarshalException
95 * if object is null or if any SAXException is thrown during
98 public void marshal(final org.xml.sax.ContentHandler handler)
99 throws java.io.IOException,
100 org.exolab.castor.xml.MarshalException,
101 org.exolab.castor.xml.ValidationException
103 Marshaller.marshal(this, handler);
110 * @throws org.exolab.castor.xml.MarshalException
111 * if object is null or if any SAXException is thrown during
113 * @throws org.exolab.castor.xml.ValidationException
114 * if this object is an invalid instance according to the
116 * @return the unmarshaled jalview.binding.JalviewUserColours
118 public static jalview.binding.JalviewUserColours unmarshal(
119 final java.io.Reader reader)
120 throws org.exolab.castor.xml.MarshalException,
121 org.exolab.castor.xml.ValidationException
123 return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(
124 jalview.binding.UserColourScheme.class, reader);
130 * @throws org.exolab.castor.xml.ValidationException
131 * if this object is an invalid instance according to the
134 public void validate() throws org.exolab.castor.xml.ValidationException
136 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
137 validator.validate(this);