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 DBRef implements java.io.Serializable
35 // --------------------------/
36 // - Class/Member Variables -/
37 // --------------------------/
42 private java.lang.String _source;
47 private java.lang.String _version;
52 private java.lang.String _accessionId;
57 private jalview.schemabinding.version2.Mapping _mapping;
73 * Returns the value of field 'accessionId'.
75 * @return the value of field 'AccessionId'.
77 public java.lang.String getAccessionId()
79 return this._accessionId;
83 * Returns the value of field 'mapping'.
85 * @return the value of field 'Mapping'.
87 public jalview.schemabinding.version2.Mapping getMapping()
93 * Returns the value of field 'source'.
95 * @return the value of field 'Source'.
97 public java.lang.String getSource()
103 * Returns the value of field 'version'.
105 * @return the value of field 'Version'.
107 public java.lang.String getVersion()
109 return this._version;
115 * @return true if this object is valid according to the schema
117 public boolean isValid()
122 } catch (org.exolab.castor.xml.ValidationException vex)
133 * @throws org.exolab.castor.xml.MarshalException
134 * if object is null or if any SAXException is thrown during
136 * @throws org.exolab.castor.xml.ValidationException
137 * if this object is an invalid instance according to the schema
139 public void marshal(final java.io.Writer out)
140 throws org.exolab.castor.xml.MarshalException,
141 org.exolab.castor.xml.ValidationException
143 Marshaller.marshal(this, out);
150 * @throws java.io.IOException
151 * if an IOException occurs during marshaling
152 * @throws org.exolab.castor.xml.ValidationException
153 * if this object is an invalid instance according to the schema
154 * @throws org.exolab.castor.xml.MarshalException
155 * if object is null or if any SAXException is thrown during
158 public void marshal(final org.xml.sax.ContentHandler handler)
159 throws java.io.IOException,
160 org.exolab.castor.xml.MarshalException,
161 org.exolab.castor.xml.ValidationException
163 Marshaller.marshal(this, handler);
167 * Sets the value of field 'accessionId'.
170 * the value of field 'accessionId'.
172 public void setAccessionId(final java.lang.String accessionId)
174 this._accessionId = accessionId;
178 * Sets the value of field 'mapping'.
181 * the value of field 'mapping'.
183 public void setMapping(
184 final jalview.schemabinding.version2.Mapping mapping)
186 this._mapping = mapping;
190 * Sets the value of field 'source'.
193 * the value of field 'source'.
195 public void setSource(final java.lang.String source)
197 this._source = source;
201 * Sets the value of field 'version'.
204 * the value of field 'version'.
206 public void setVersion(final java.lang.String version)
208 this._version = version;
215 * @throws org.exolab.castor.xml.MarshalException
216 * if object is null or if any SAXException is thrown during
218 * @throws org.exolab.castor.xml.ValidationException
219 * if this object is an invalid instance according to the schema
220 * @return the unmarshaled jalview.schemabinding.version2.DBRef
222 public static jalview.schemabinding.version2.DBRef unmarshal(
223 final java.io.Reader reader)
224 throws org.exolab.castor.xml.MarshalException,
225 org.exolab.castor.xml.ValidationException
227 return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(
228 jalview.schemabinding.version2.DBRef.class, reader);
234 * @throws org.exolab.castor.xml.ValidationException
235 * if this object is an invalid instance according to the schema
237 public void validate() throws org.exolab.castor.xml.ValidationException
239 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
240 validator.validate(this);