2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
\r
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
\r
5 * This file is part of Jalview.
\r
7 * Jalview is free software: you can redistribute it and/or
\r
8 * modify it under the terms of the GNU General Public License
\r
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
\r
11 * Jalview is distributed in the hope that it will be useful, but
\r
12 * WITHOUT ANY WARRANTY; without even the implied warranty
\r
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
\r
14 * PURPOSE. See the GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
\r
18 package jalview.schemabinding.version2;
\r
20 //---------------------------------/
\r
21 //- Imported classes and packages -/
\r
22 //---------------------------------/
\r
24 import org.exolab.castor.xml.Marshaller;
\r
25 import org.exolab.castor.xml.Unmarshaller;
\r
30 * @version $Revision$ $Date$
\r
32 public class DBRef implements java.io.Serializable
\r
35 // --------------------------/
\r
36 // - Class/Member Variables -/
\r
37 // --------------------------/
\r
42 private java.lang.String _source;
\r
47 private java.lang.String _version;
\r
50 * Field _accessionId.
\r
52 private java.lang.String _accessionId;
\r
57 private jalview.schemabinding.version2.Mapping _mapping;
\r
59 // ----------------/
\r
60 // - Constructors -/
\r
61 // ----------------/
\r
73 * Returns the value of field 'accessionId'.
\r
75 * @return the value of field 'AccessionId'.
\r
77 public java.lang.String getAccessionId()
\r
79 return this._accessionId;
\r
83 * Returns the value of field 'mapping'.
\r
85 * @return the value of field 'Mapping'.
\r
87 public jalview.schemabinding.version2.Mapping getMapping()
\r
89 return this._mapping;
\r
93 * Returns the value of field 'source'.
\r
95 * @return the value of field 'Source'.
\r
97 public java.lang.String getSource()
\r
99 return this._source;
\r
103 * Returns the value of field 'version'.
\r
105 * @return the value of field 'Version'.
\r
107 public java.lang.String getVersion()
\r
109 return this._version;
\r
115 * @return true if this object is valid according to the schema
\r
117 public boolean isValid()
\r
122 } catch (org.exolab.castor.xml.ValidationException vex)
\r
133 * @throws org.exolab.castor.xml.MarshalException
\r
134 * if object is null or if any SAXException is thrown during
\r
136 * @throws org.exolab.castor.xml.ValidationException
\r
137 * if this object is an invalid instance according to the schema
\r
139 public void marshal(final java.io.Writer out)
\r
140 throws org.exolab.castor.xml.MarshalException,
\r
141 org.exolab.castor.xml.ValidationException
\r
143 Marshaller.marshal(this, out);
\r
150 * @throws java.io.IOException
\r
151 * if an IOException occurs during marshaling
\r
152 * @throws org.exolab.castor.xml.ValidationException
\r
153 * if this object is an invalid instance according to the schema
\r
154 * @throws org.exolab.castor.xml.MarshalException
\r
155 * if object is null or if any SAXException is thrown during
\r
158 public void marshal(final org.xml.sax.ContentHandler handler)
\r
159 throws java.io.IOException,
\r
160 org.exolab.castor.xml.MarshalException,
\r
161 org.exolab.castor.xml.ValidationException
\r
163 Marshaller.marshal(this, handler);
\r
167 * Sets the value of field 'accessionId'.
\r
169 * @param accessionId
\r
170 * the value of field 'accessionId'.
\r
172 public void setAccessionId(final java.lang.String accessionId)
\r
174 this._accessionId = accessionId;
\r
178 * Sets the value of field 'mapping'.
\r
181 * the value of field 'mapping'.
\r
183 public void setMapping(
\r
184 final jalview.schemabinding.version2.Mapping mapping)
\r
186 this._mapping = mapping;
\r
190 * Sets the value of field 'source'.
\r
193 * the value of field 'source'.
\r
195 public void setSource(final java.lang.String source)
\r
197 this._source = source;
\r
201 * Sets the value of field 'version'.
\r
204 * the value of field 'version'.
\r
206 public void setVersion(final java.lang.String version)
\r
208 this._version = version;
\r
212 * Method unmarshal.
\r
215 * @throws org.exolab.castor.xml.MarshalException
\r
216 * if object is null or if any SAXException is thrown during
\r
218 * @throws org.exolab.castor.xml.ValidationException
\r
219 * if this object is an invalid instance according to the schema
\r
220 * @return the unmarshaled jalview.schemabinding.version2.DBRef
\r
222 public static jalview.schemabinding.version2.DBRef unmarshal(
\r
223 final java.io.Reader reader)
\r
224 throws org.exolab.castor.xml.MarshalException,
\r
225 org.exolab.castor.xml.ValidationException
\r
227 return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(
\r
228 jalview.schemabinding.version2.DBRef.class, reader);
\r
234 * @throws org.exolab.castor.xml.ValidationException
\r
235 * if this object is an invalid instance according to the schema
\r
237 public void validate() throws org.exolab.castor.xml.ValidationException
\r
239 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
240 validator.validate(this);
\r