2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ 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
10 * of the License, or (at your option) any later version.
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.
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.
21 package jalview.schemabinding.version2;
23 //---------------------------------/
24 //- Imported classes and packages -/
25 //---------------------------------/
27 import org.exolab.castor.xml.Marshaller;
28 import org.exolab.castor.xml.Unmarshaller;
31 * Class UserColourScheme.
33 * @version $Revision$ $Date$
35 public class UserColourScheme extends JalviewUserColours implements
43 public UserColourScheme()
55 * @return true if this object is valid according to the schema
57 public boolean isValid()
62 } catch (org.exolab.castor.xml.ValidationException vex)
73 * @throws org.exolab.castor.xml.MarshalException
74 * if object is null or if any SAXException is thrown during
76 * @throws org.exolab.castor.xml.ValidationException
77 * if this object is an invalid instance according to the schema
79 public void marshal(final java.io.Writer out)
80 throws org.exolab.castor.xml.MarshalException,
81 org.exolab.castor.xml.ValidationException
83 Marshaller.marshal(this, out);
90 * @throws java.io.IOException
91 * if an IOException occurs during marshaling
92 * @throws org.exolab.castor.xml.ValidationException
93 * if this object is an invalid instance according to the schema
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 schema
115 * @return the unmarshaled jalview.schemabinding.version2.JalviewUserColours
117 public static jalview.schemabinding.version2.JalviewUserColours unmarshal(
118 final java.io.Reader reader)
119 throws org.exolab.castor.xml.MarshalException,
120 org.exolab.castor.xml.ValidationException
122 return (jalview.schemabinding.version2.JalviewUserColours) Unmarshaller
124 jalview.schemabinding.version2.UserColourScheme.class,
131 * @throws org.exolab.castor.xml.ValidationException
132 * if this object is an invalid instance according to the schema
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);