2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3 * Copyright (C) 2014 The Jalview Authors
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/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
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 schema
77 public void marshal(final java.io.Writer out)
78 throws org.exolab.castor.xml.MarshalException,
79 org.exolab.castor.xml.ValidationException
81 Marshaller.marshal(this, out);
88 * @throws java.io.IOException
89 * if an IOException occurs during marshaling
90 * @throws org.exolab.castor.xml.ValidationException
91 * if this object is an invalid instance according to the schema
92 * @throws org.exolab.castor.xml.MarshalException
93 * if object is null or if any SAXException is thrown during
96 public void marshal(final org.xml.sax.ContentHandler handler)
97 throws java.io.IOException,
98 org.exolab.castor.xml.MarshalException,
99 org.exolab.castor.xml.ValidationException
101 Marshaller.marshal(this, handler);
108 * @throws org.exolab.castor.xml.MarshalException
109 * if object is null or if any SAXException is thrown during
111 * @throws org.exolab.castor.xml.ValidationException
112 * if this object is an invalid instance according to the schema
113 * @return the unmarshaled jalview.binding.JalviewUserColours
115 public static jalview.binding.JalviewUserColours unmarshal(
116 final java.io.Reader reader)
117 throws org.exolab.castor.xml.MarshalException,
118 org.exolab.castor.xml.ValidationException
120 return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(
121 jalview.binding.UserColourScheme.class, reader);
127 * @throws org.exolab.castor.xml.ValidationException
128 * if this object is an invalid instance according to the schema
130 public void validate() throws org.exolab.castor.xml.ValidationException
132 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
133 validator.validate(this);