2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
5 * This file is part of Jalview.
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.
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.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
18 package jalview.binding;
20 //---------------------------------/
21 //- Imported classes and packages -/
22 //---------------------------------/
24 import org.exolab.castor.xml.Marshaller;
25 import org.exolab.castor.xml.Unmarshaller;
28 * Class UserColourScheme.
30 * @version $Revision$ $Date$
32 public class UserColourScheme extends JalviewUserColours implements
40 public UserColourScheme()
52 * @return true if this object is valid according to the schema
54 public boolean isValid()
59 } catch (org.exolab.castor.xml.ValidationException vex)
70 * @throws org.exolab.castor.xml.MarshalException
71 * if object is null or if any SAXException is thrown during
73 * @throws org.exolab.castor.xml.ValidationException
74 * if this object is an invalid instance according to the schema
76 public void marshal(final java.io.Writer out)
77 throws org.exolab.castor.xml.MarshalException,
78 org.exolab.castor.xml.ValidationException
80 Marshaller.marshal(this, out);
87 * @throws java.io.IOException
88 * if an IOException occurs during marshaling
89 * @throws org.exolab.castor.xml.ValidationException
90 * if this object is an invalid instance according to the schema
91 * @throws org.exolab.castor.xml.MarshalException
92 * if object is null or if any SAXException is thrown during
95 public void marshal(final org.xml.sax.ContentHandler handler)
96 throws java.io.IOException,
97 org.exolab.castor.xml.MarshalException,
98 org.exolab.castor.xml.ValidationException
100 Marshaller.marshal(this, handler);
107 * @throws org.exolab.castor.xml.MarshalException
108 * if object is null or if any SAXException is thrown during
110 * @throws org.exolab.castor.xml.ValidationException
111 * if this object is an invalid instance according to the schema
112 * @return the unmarshaled jalview.binding.JalviewUserColours
114 public static jalview.binding.JalviewUserColours unmarshal(
115 final java.io.Reader reader)
116 throws org.exolab.castor.xml.MarshalException,
117 org.exolab.castor.xml.ValidationException
119 return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(
120 jalview.binding.UserColourScheme.class, reader);
126 * @throws org.exolab.castor.xml.ValidationException
127 * if this object is an invalid instance according to the schema
129 public void validate() throws org.exolab.castor.xml.ValidationException
131 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
132 validator.validate(this);