1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
3 * Copyright (C) 2014 The Jalview Authors
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.
17 * If not, see <http://www.gnu.org/licenses/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 ******************************************************************************/
21 * This class was automatically generated with
22 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
27 package jalview.schemabinding.version2;
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
39 * @version $Revision$ $Date$
41 public class DBRef implements java.io.Serializable
44 // --------------------------/
45 // - Class/Member Variables -/
46 // --------------------------/
51 private java.lang.String _source;
56 private java.lang.String _version;
61 private java.lang.String _accessionId;
66 private jalview.schemabinding.version2.Mapping _mapping;
82 * Returns the value of field 'accessionId'.
84 * @return the value of field 'AccessionId'.
86 public java.lang.String getAccessionId()
88 return this._accessionId;
92 * Returns the value of field 'mapping'.
94 * @return the value of field 'Mapping'.
96 public jalview.schemabinding.version2.Mapping getMapping()
102 * Returns the value of field 'source'.
104 * @return the value of field 'Source'.
106 public java.lang.String getSource()
112 * Returns the value of field 'version'.
114 * @return the value of field 'Version'.
116 public java.lang.String getVersion()
118 return this._version;
124 * @return true if this object is valid according to the schema
126 public boolean isValid()
131 } catch (org.exolab.castor.xml.ValidationException vex)
142 * @throws org.exolab.castor.xml.MarshalException
143 * if object is null or if any SAXException is thrown during
145 * @throws org.exolab.castor.xml.ValidationException
146 * if this object is an invalid instance according to the schema
148 public void marshal(final java.io.Writer out)
149 throws org.exolab.castor.xml.MarshalException,
150 org.exolab.castor.xml.ValidationException
152 Marshaller.marshal(this, out);
159 * @throws java.io.IOException
160 * if an IOException occurs during marshaling
161 * @throws org.exolab.castor.xml.ValidationException
162 * if this object is an invalid instance according to the schema
163 * @throws org.exolab.castor.xml.MarshalException
164 * if object is null or if any SAXException is thrown during
167 public void marshal(final org.xml.sax.ContentHandler handler)
168 throws java.io.IOException,
169 org.exolab.castor.xml.MarshalException,
170 org.exolab.castor.xml.ValidationException
172 Marshaller.marshal(this, handler);
176 * Sets the value of field 'accessionId'.
179 * the value of field 'accessionId'.
181 public void setAccessionId(final java.lang.String accessionId)
183 this._accessionId = accessionId;
187 * Sets the value of field 'mapping'.
190 * the value of field 'mapping'.
192 public void setMapping(
193 final jalview.schemabinding.version2.Mapping mapping)
195 this._mapping = mapping;
199 * Sets the value of field 'source'.
202 * the value of field 'source'.
204 public void setSource(final java.lang.String source)
206 this._source = source;
210 * Sets the value of field 'version'.
213 * the value of field 'version'.
215 public void setVersion(final java.lang.String version)
217 this._version = version;
224 * @throws org.exolab.castor.xml.MarshalException
225 * if object is null or if any SAXException is thrown during
227 * @throws org.exolab.castor.xml.ValidationException
228 * if this object is an invalid instance according to the schema
229 * @return the unmarshaled jalview.schemabinding.version2.DBRef
231 public static jalview.schemabinding.version2.DBRef unmarshal(
232 final java.io.Reader reader)
233 throws org.exolab.castor.xml.MarshalException,
234 org.exolab.castor.xml.ValidationException
236 return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(
237 jalview.schemabinding.version2.DBRef.class, reader);
243 * @throws org.exolab.castor.xml.ValidationException
244 * if this object is an invalid instance according to the schema
246 public void validate() throws org.exolab.castor.xml.ValidationException
248 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
249 validator.validate(this);