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.schemabinding.version2;
20 //---------------------------------/
21 //- Imported classes and packages -/
22 //---------------------------------/
24 import org.exolab.castor.xml.Marshaller;
25 import org.exolab.castor.xml.Unmarshaller;
30 * @version $Revision$ $Date$
32 public class AlcodMap implements java.io.Serializable
35 // --------------------------/
36 // - Class/Member Variables -/
37 // --------------------------/
40 * internal jalview id for the dnasq for this mapping.
43 private java.lang.String _dnasq;
46 * a Mapping entry and an associated protein sequence
49 private jalview.schemabinding.version2.Mapping _mapping;
65 * Returns the value of field 'dnasq'. The field 'dnasq' has the following
66 * description: internal jalview id for the dnasq for this mapping.
69 * @return the value of field 'Dnasq'.
71 public java.lang.String getDnasq()
77 * Returns the value of field 'mapping'. The field 'mapping' has the following
78 * description: a Mapping entry and an associated protein sequence
81 * @return the value of field 'Mapping'.
83 public jalview.schemabinding.version2.Mapping getMapping()
91 * @return true if this object is valid according to the schema
93 public boolean isValid()
98 } catch (org.exolab.castor.xml.ValidationException vex)
109 * @throws org.exolab.castor.xml.MarshalException
110 * if object is null or if any SAXException is thrown during
112 * @throws org.exolab.castor.xml.ValidationException
113 * if this object is an invalid instance according to the schema
115 public void marshal(final java.io.Writer out)
116 throws org.exolab.castor.xml.MarshalException,
117 org.exolab.castor.xml.ValidationException
119 Marshaller.marshal(this, out);
126 * @throws java.io.IOException
127 * if an IOException occurs during marshaling
128 * @throws org.exolab.castor.xml.ValidationException
129 * if this object is an invalid instance according to the schema
130 * @throws org.exolab.castor.xml.MarshalException
131 * if object is null or if any SAXException is thrown during
134 public void marshal(final org.xml.sax.ContentHandler handler)
135 throws java.io.IOException,
136 org.exolab.castor.xml.MarshalException,
137 org.exolab.castor.xml.ValidationException
139 Marshaller.marshal(this, handler);
143 * Sets the value of field 'dnasq'. The field 'dnasq' has the following
144 * description: internal jalview id for the dnasq for this mapping.
148 * the value of field 'dnasq'.
150 public void setDnasq(final java.lang.String dnasq)
156 * Sets the value of field 'mapping'. The field 'mapping' has the following
157 * description: a Mapping entry and an associated protein sequence
161 * the value of field 'mapping'.
163 public void setMapping(
164 final jalview.schemabinding.version2.Mapping mapping)
166 this._mapping = mapping;
173 * @throws org.exolab.castor.xml.MarshalException
174 * if object is null or if any SAXException is thrown during
176 * @throws org.exolab.castor.xml.ValidationException
177 * if this object is an invalid instance according to the schema
178 * @return the unmarshaled jalview.schemabinding.version2.AlcodMap
180 public static jalview.schemabinding.version2.AlcodMap unmarshal(
181 final java.io.Reader reader)
182 throws org.exolab.castor.xml.MarshalException,
183 org.exolab.castor.xml.ValidationException
185 return (jalview.schemabinding.version2.AlcodMap) Unmarshaller
186 .unmarshal(jalview.schemabinding.version2.AlcodMap.class,
193 * @throws org.exolab.castor.xml.ValidationException
194 * if this object is an invalid instance according to the schema
196 public void validate() throws org.exolab.castor.xml.ValidationException
198 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
199 validator.validate(this);