2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
\r
3 * Copyright (C) 2009 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
75 * Returns the value of field 'accessionId'.
\r
77 * @return the value of field 'AccessionId'.
\r
79 public java.lang.String getAccessionId(
\r
81 return this._accessionId;
\r
85 * Returns the value of field 'mapping'.
\r
87 * @return the value of field 'Mapping'.
\r
89 public jalview.schemabinding.version2.Mapping getMapping(
\r
91 return this._mapping;
\r
95 * Returns the value of field 'source'.
\r
97 * @return the value of field 'Source'.
\r
99 public java.lang.String getSource(
\r
101 return this._source;
\r
105 * Returns the value of field 'version'.
\r
107 * @return the value of field 'Version'.
\r
109 public java.lang.String getVersion(
\r
111 return this._version;
\r
117 * @return true if this object is valid according to the schema
\r
119 public boolean isValid(
\r
123 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
133 * @throws org.exolab.castor.xml.MarshalException if object is
\r
134 * null or if any SAXException is thrown during marshaling
\r
135 * @throws org.exolab.castor.xml.ValidationException if this
\r
136 * object is an invalid instance according to the schema
\r
138 public void marshal(
\r
139 final java.io.Writer out)
\r
140 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
141 Marshaller.marshal(this, out);
\r
148 * @throws java.io.IOException if an IOException occurs during
\r
150 * @throws org.exolab.castor.xml.ValidationException if this
\r
151 * object is an invalid instance according to the schema
\r
152 * @throws org.exolab.castor.xml.MarshalException if object is
\r
153 * null or if any SAXException is thrown during marshaling
\r
155 public void marshal(
\r
156 final org.xml.sax.ContentHandler handler)
\r
157 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
158 Marshaller.marshal(this, handler);
\r
162 * Sets the value of field 'accessionId'.
\r
164 * @param accessionId the value of field 'accessionId'.
\r
166 public void setAccessionId(
\r
167 final java.lang.String accessionId) {
\r
168 this._accessionId = accessionId;
\r
172 * Sets the value of field 'mapping'.
\r
174 * @param mapping the value of field 'mapping'.
\r
176 public void setMapping(
\r
177 final jalview.schemabinding.version2.Mapping mapping) {
\r
178 this._mapping = mapping;
\r
182 * Sets the value of field 'source'.
\r
184 * @param source the value of field 'source'.
\r
186 public void setSource(
\r
187 final java.lang.String source) {
\r
188 this._source = source;
\r
192 * Sets the value of field 'version'.
\r
194 * @param version the value of field 'version'.
\r
196 public void setVersion(
\r
197 final java.lang.String version) {
\r
198 this._version = version;
\r
202 * Method unmarshal.
\r
205 * @throws org.exolab.castor.xml.MarshalException if object is
\r
206 * null or if any SAXException is thrown during marshaling
\r
207 * @throws org.exolab.castor.xml.ValidationException if this
\r
208 * object is an invalid instance according to the schema
\r
209 * @return the unmarshaled jalview.schemabinding.version2.DBRef
\r
211 public static jalview.schemabinding.version2.DBRef unmarshal(
\r
212 final java.io.Reader reader)
\r
213 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
214 return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(jalview.schemabinding.version2.DBRef.class, reader);
\r
220 * @throws org.exolab.castor.xml.ValidationException if this
\r
221 * object is an invalid instance according to the schema
\r
223 public void validate(
\r
225 throws org.exolab.castor.xml.ValidationException {
\r
226 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
227 validator.validate(this);
\r