2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
\r
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
\r
5 * This file is part of Jalview.
\r
7 * Jalview is free software: you can redistribute it and/or
\r
8 * modify it under the terms of the GNU General Public License
\r
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
\r
11 * Jalview is distributed in the hope that it will be useful, but
\r
12 * WITHOUT ANY WARRANTY; without even the implied warranty
\r
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
\r
14 * PURPOSE. See the GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
\r
18 package jalview.schemabinding.version2;
\r
20 //---------------------------------/
\r
21 //- Imported classes and packages -/
\r
22 //---------------------------------/
\r
24 import org.exolab.castor.xml.Marshaller;
\r
25 import org.exolab.castor.xml.Unmarshaller;
\r
30 * @version $Revision$ $Date$
\r
32 public class AlcodMap implements java.io.Serializable
\r
35 // --------------------------/
\r
36 // - Class/Member Variables -/
\r
37 // --------------------------/
\r
40 * internal jalview id for the dnasq for this mapping.
\r
43 private java.lang.String _dnasq;
\r
46 * a Mapping entry and an associated protein sequence
\r
49 private jalview.schemabinding.version2.Mapping _mapping;
\r
51 // ----------------/
\r
52 // - Constructors -/
\r
53 // ----------------/
\r
65 * Returns the value of field 'dnasq'. The field 'dnasq' has the following
\r
66 * description: internal jalview id for the dnasq for this mapping.
\r
69 * @return the value of field 'Dnasq'.
\r
71 public java.lang.String getDnasq()
\r
77 * Returns the value of field 'mapping'. The field 'mapping' has the following
\r
78 * description: a Mapping entry and an associated protein sequence
\r
81 * @return the value of field 'Mapping'.
\r
83 public jalview.schemabinding.version2.Mapping getMapping()
\r
85 return this._mapping;
\r
91 * @return true if this object is valid according to the schema
\r
93 public boolean isValid()
\r
98 } catch (org.exolab.castor.xml.ValidationException vex)
\r
109 * @throws org.exolab.castor.xml.MarshalException
\r
110 * if object is null or if any SAXException is thrown during
\r
112 * @throws org.exolab.castor.xml.ValidationException
\r
113 * if this object is an invalid instance according to the schema
\r
115 public void marshal(final java.io.Writer out)
\r
116 throws org.exolab.castor.xml.MarshalException,
\r
117 org.exolab.castor.xml.ValidationException
\r
119 Marshaller.marshal(this, out);
\r
126 * @throws java.io.IOException
\r
127 * if an IOException occurs during marshaling
\r
128 * @throws org.exolab.castor.xml.ValidationException
\r
129 * if this object is an invalid instance according to the schema
\r
130 * @throws org.exolab.castor.xml.MarshalException
\r
131 * if object is null or if any SAXException is thrown during
\r
134 public void marshal(final org.xml.sax.ContentHandler handler)
\r
135 throws java.io.IOException,
\r
136 org.exolab.castor.xml.MarshalException,
\r
137 org.exolab.castor.xml.ValidationException
\r
139 Marshaller.marshal(this, handler);
\r
143 * Sets the value of field 'dnasq'. The field 'dnasq' has the following
\r
144 * description: internal jalview id for the dnasq for this mapping.
\r
148 * the value of field 'dnasq'.
\r
150 public void setDnasq(final java.lang.String dnasq)
\r
152 this._dnasq = dnasq;
\r
156 * Sets the value of field 'mapping'. The field 'mapping' has the following
\r
157 * description: a Mapping entry and an associated protein sequence
\r
161 * the value of field 'mapping'.
\r
163 public void setMapping(
\r
164 final jalview.schemabinding.version2.Mapping mapping)
\r
166 this._mapping = mapping;
\r
170 * Method unmarshal.
\r
173 * @throws org.exolab.castor.xml.MarshalException
\r
174 * if object is null or if any SAXException is thrown during
\r
176 * @throws org.exolab.castor.xml.ValidationException
\r
177 * if this object is an invalid instance according to the schema
\r
178 * @return the unmarshaled jalview.schemabinding.version2.AlcodMap
\r
180 public static jalview.schemabinding.version2.AlcodMap unmarshal(
\r
181 final java.io.Reader reader)
\r
182 throws org.exolab.castor.xml.MarshalException,
\r
183 org.exolab.castor.xml.ValidationException
\r
185 return (jalview.schemabinding.version2.AlcodMap) Unmarshaller
\r
186 .unmarshal(jalview.schemabinding.version2.AlcodMap.class,
\r
193 * @throws org.exolab.castor.xml.ValidationException
\r
194 * if this object is an invalid instance according to the schema
\r
196 public void validate() throws org.exolab.castor.xml.ValidationException
\r
198 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
199 validator.validate(this);
\r