2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
\r
3 * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package jalview.schemabinding.version2;
\r
21 // ---------------------------------/
\r
22 // - Imported classes and packages -/
\r
23 // ---------------------------------/
\r
25 import org.exolab.castor.xml.Marshaller;
\r
26 import org.exolab.castor.xml.Unmarshaller;
\r
31 * @version $Revision$ $Date$
\r
33 public class AlcodMap implements java.io.Serializable
\r
36 // --------------------------/
\r
37 // - Class/Member Variables -/
\r
38 // --------------------------/
\r
41 * internal jalview id for the dnasq for this mapping.
\r
44 private java.lang.String _dnasq;
\r
47 * a Mapping entry and an associated protein sequence
\r
50 private jalview.schemabinding.version2.Mapping _mapping;
\r
52 // ----------------/
\r
53 // - Constructors -/
\r
54 // ----------------/
\r
66 * Returns the value of field 'dnasq'. The field 'dnasq' has the following
\r
67 * description: internal jalview id for the dnasq for this mapping.
\r
70 * @return the value of field 'Dnasq'.
\r
72 public java.lang.String getDnasq()
\r
78 * Returns the value of field 'mapping'. The field 'mapping' has the following
\r
79 * description: a Mapping entry and an associated protein sequence
\r
82 * @return the value of field 'Mapping'.
\r
84 public jalview.schemabinding.version2.Mapping getMapping()
\r
86 return this._mapping;
\r
92 * @return true if this object is valid according to the schema
\r
94 public boolean isValid()
\r
99 } catch (org.exolab.castor.xml.ValidationException vex)
\r
110 * @throws org.exolab.castor.xml.MarshalException
\r
111 * if object is null or if any SAXException is thrown during
\r
113 * @throws org.exolab.castor.xml.ValidationException
\r
114 * if this object is an invalid instance according to the
\r
117 public void marshal(final java.io.Writer out)
\r
118 throws org.exolab.castor.xml.MarshalException,
\r
119 org.exolab.castor.xml.ValidationException
\r
121 Marshaller.marshal(this, out);
\r
128 * @throws java.io.IOException
\r
129 * if an IOException occurs during marshaling
\r
130 * @throws org.exolab.castor.xml.ValidationException
\r
131 * if this object is an invalid instance according to the
\r
133 * @throws org.exolab.castor.xml.MarshalException
\r
134 * if object is null or if any SAXException is thrown during
\r
137 public void marshal(final org.xml.sax.ContentHandler handler)
\r
138 throws java.io.IOException,
\r
139 org.exolab.castor.xml.MarshalException,
\r
140 org.exolab.castor.xml.ValidationException
\r
142 Marshaller.marshal(this, handler);
\r
146 * Sets the value of field 'dnasq'. The field 'dnasq' has the following
\r
147 * description: internal jalview id for the dnasq for this mapping.
\r
151 * the value of field 'dnasq'.
\r
153 public void setDnasq(final java.lang.String dnasq)
\r
155 this._dnasq = dnasq;
\r
159 * Sets the value of field 'mapping'. The field 'mapping' has the following
\r
160 * description: a Mapping entry and an associated protein sequence
\r
164 * the value of field 'mapping'.
\r
166 public void setMapping(
\r
167 final jalview.schemabinding.version2.Mapping mapping)
\r
169 this._mapping = mapping;
\r
173 * Method unmarshal.
\r
176 * @throws org.exolab.castor.xml.MarshalException
\r
177 * if object is null or if any SAXException is thrown during
\r
179 * @throws org.exolab.castor.xml.ValidationException
\r
180 * if this object is an invalid instance according to the
\r
182 * @return the unmarshaled jalview.schemabinding.version2.AlcodMap
\r
184 public static jalview.schemabinding.version2.AlcodMap unmarshal(
\r
185 final java.io.Reader reader)
\r
186 throws org.exolab.castor.xml.MarshalException,
\r
187 org.exolab.castor.xml.ValidationException
\r
189 return (jalview.schemabinding.version2.AlcodMap) Unmarshaller
\r
190 .unmarshal(jalview.schemabinding.version2.AlcodMap.class,
\r
197 * @throws org.exolab.castor.xml.ValidationException
\r
198 * if this object is an invalid instance according to the
\r
201 public void validate() throws org.exolab.castor.xml.ValidationException
\r
203 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
204 validator.validate(this);
\r