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 DBRef implements java.io.Serializable
\r
36 // --------------------------/
\r
37 // - Class/Member Variables -/
\r
38 // --------------------------/
\r
43 private java.lang.String _source;
\r
48 private java.lang.String _version;
\r
51 * Field _accessionId.
\r
53 private java.lang.String _accessionId;
\r
58 private jalview.schemabinding.version2.Mapping _mapping;
\r
60 // ----------------/
\r
61 // - Constructors -/
\r
62 // ----------------/
\r
74 * Returns the value of field 'accessionId'.
\r
76 * @return the value of field 'AccessionId'.
\r
78 public java.lang.String getAccessionId()
\r
80 return this._accessionId;
\r
84 * Returns the value of field 'mapping'.
\r
86 * @return the value of field 'Mapping'.
\r
88 public jalview.schemabinding.version2.Mapping getMapping()
\r
90 return this._mapping;
\r
94 * Returns the value of field 'source'.
\r
96 * @return the value of field 'Source'.
\r
98 public java.lang.String getSource()
\r
100 return this._source;
\r
104 * Returns the value of field 'version'.
\r
106 * @return the value of field 'Version'.
\r
108 public java.lang.String getVersion()
\r
110 return this._version;
\r
116 * @return true if this object is valid according to the schema
\r
118 public boolean isValid()
\r
123 } catch (org.exolab.castor.xml.ValidationException vex)
\r
134 * @throws org.exolab.castor.xml.MarshalException
\r
135 * if object is null or if any SAXException is thrown during
\r
137 * @throws org.exolab.castor.xml.ValidationException
\r
138 * if this object is an invalid instance according to the
\r
141 public void marshal(final java.io.Writer out)
\r
142 throws org.exolab.castor.xml.MarshalException,
\r
143 org.exolab.castor.xml.ValidationException
\r
145 Marshaller.marshal(this, out);
\r
152 * @throws java.io.IOException
\r
153 * if an IOException occurs during marshaling
\r
154 * @throws org.exolab.castor.xml.ValidationException
\r
155 * if this object is an invalid instance according to the
\r
157 * @throws org.exolab.castor.xml.MarshalException
\r
158 * if object is null or if any SAXException is thrown during
\r
161 public void marshal(final org.xml.sax.ContentHandler handler)
\r
162 throws java.io.IOException,
\r
163 org.exolab.castor.xml.MarshalException,
\r
164 org.exolab.castor.xml.ValidationException
\r
166 Marshaller.marshal(this, handler);
\r
170 * Sets the value of field 'accessionId'.
\r
172 * @param accessionId
\r
173 * the value of field 'accessionId'.
\r
175 public void setAccessionId(final java.lang.String accessionId)
\r
177 this._accessionId = accessionId;
\r
181 * Sets the value of field 'mapping'.
\r
184 * the value of field 'mapping'.
\r
186 public void setMapping(
\r
187 final jalview.schemabinding.version2.Mapping mapping)
\r
189 this._mapping = mapping;
\r
193 * Sets the value of field 'source'.
\r
196 * the value of field 'source'.
\r
198 public void setSource(final java.lang.String source)
\r
200 this._source = source;
\r
204 * Sets the value of field 'version'.
\r
207 * the value of field 'version'.
\r
209 public void setVersion(final java.lang.String version)
\r
211 this._version = version;
\r
215 * Method unmarshal.
\r
218 * @throws org.exolab.castor.xml.MarshalException
\r
219 * if object is null or if any SAXException is thrown during
\r
221 * @throws org.exolab.castor.xml.ValidationException
\r
222 * if this object is an invalid instance according to the
\r
224 * @return the unmarshaled jalview.schemabinding.version2.DBRef
\r
226 public static jalview.schemabinding.version2.DBRef unmarshal(
\r
227 final java.io.Reader reader)
\r
228 throws org.exolab.castor.xml.MarshalException,
\r
229 org.exolab.castor.xml.ValidationException
\r
231 return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(
\r
232 jalview.schemabinding.version2.DBRef.class, reader);
\r
238 * @throws org.exolab.castor.xml.ValidationException
\r
239 * if this object is an invalid instance according to the
\r
242 public void validate() throws org.exolab.castor.xml.ValidationException
\r
244 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
245 validator.validate(this);
\r