1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, 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/>.
17 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.schemabinding.version2;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
37 * @version $Revision$ $Date$
39 public class DBRef implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
49 private java.lang.String _source;
54 private java.lang.String _version;
59 private java.lang.String _accessionId;
64 private jalview.schemabinding.version2.Mapping _mapping;
81 * Returns the value of field 'accessionId'.
83 * @return the value of field 'AccessionId'.
85 public java.lang.String getAccessionId(
87 return this._accessionId;
91 * Returns the value of field 'mapping'.
93 * @return the value of field 'Mapping'.
95 public jalview.schemabinding.version2.Mapping getMapping(
101 * Returns the value of field 'source'.
103 * @return the value of field 'Source'.
105 public java.lang.String getSource(
111 * Returns the value of field 'version'.
113 * @return the value of field 'Version'.
115 public java.lang.String getVersion(
117 return this._version;
123 * @return true if this object is valid according to the schema
125 public boolean isValid(
129 } catch (org.exolab.castor.xml.ValidationException vex) {
139 * @throws org.exolab.castor.xml.MarshalException if object is
140 * null or if any SAXException is thrown during marshaling
141 * @throws org.exolab.castor.xml.ValidationException if this
142 * object is an invalid instance according to the schema
145 final java.io.Writer out)
146 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
147 Marshaller.marshal(this, out);
154 * @throws java.io.IOException if an IOException occurs during
156 * @throws org.exolab.castor.xml.ValidationException if this
157 * object is an invalid instance according to the schema
158 * @throws org.exolab.castor.xml.MarshalException if object is
159 * null or if any SAXException is thrown during marshaling
162 final org.xml.sax.ContentHandler handler)
163 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
164 Marshaller.marshal(this, handler);
168 * Sets the value of field 'accessionId'.
170 * @param accessionId the value of field 'accessionId'.
172 public void setAccessionId(
173 final java.lang.String accessionId) {
174 this._accessionId = accessionId;
178 * Sets the value of field 'mapping'.
180 * @param mapping the value of field 'mapping'.
182 public void setMapping(
183 final jalview.schemabinding.version2.Mapping mapping) {
184 this._mapping = mapping;
188 * Sets the value of field 'source'.
190 * @param source the value of field 'source'.
192 public void setSource(
193 final java.lang.String source) {
194 this._source = source;
198 * Sets the value of field 'version'.
200 * @param version the value of field 'version'.
202 public void setVersion(
203 final java.lang.String version) {
204 this._version = version;
211 * @throws org.exolab.castor.xml.MarshalException if object is
212 * null or if any SAXException is thrown during marshaling
213 * @throws org.exolab.castor.xml.ValidationException if this
214 * object is an invalid instance according to the schema
215 * @return the unmarshaled jalview.schemabinding.version2.DBRef
217 public static jalview.schemabinding.version2.DBRef unmarshal(
218 final java.io.Reader reader)
219 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
220 return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(jalview.schemabinding.version2.DBRef.class, reader);
226 * @throws org.exolab.castor.xml.ValidationException if this
227 * object is an invalid instance according to the schema
229 public void validate(
231 throws org.exolab.castor.xml.ValidationException {
232 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
233 validator.validate(this);