1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) 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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.schemabinding.version2;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
40 * @version $Revision$ $Date$
42 public class DBRef implements java.io.Serializable
45 // --------------------------/
46 // - Class/Member Variables -/
47 // --------------------------/
52 private java.lang.String _source;
57 private java.lang.String _version;
62 private java.lang.String _accessionId;
67 private jalview.schemabinding.version2.Mapping _mapping;
83 * Returns the value of field 'accessionId'.
85 * @return the value of field 'AccessionId'.
87 public java.lang.String getAccessionId()
89 return this._accessionId;
93 * Returns the value of field 'mapping'.
95 * @return the value of field 'Mapping'.
97 public jalview.schemabinding.version2.Mapping getMapping()
103 * Returns the value of field 'source'.
105 * @return the value of field 'Source'.
107 public java.lang.String getSource()
113 * Returns the value of field 'version'.
115 * @return the value of field 'Version'.
117 public java.lang.String getVersion()
119 return this._version;
125 * @return true if this object is valid according to the schema
127 public boolean isValid()
132 } catch (org.exolab.castor.xml.ValidationException vex)
143 * @throws org.exolab.castor.xml.MarshalException
144 * if object is null or if any SAXException is thrown during
146 * @throws org.exolab.castor.xml.ValidationException
147 * if this object is an invalid instance according to the schema
149 public void marshal(final java.io.Writer out)
150 throws org.exolab.castor.xml.MarshalException,
151 org.exolab.castor.xml.ValidationException
153 Marshaller.marshal(this, out);
160 * @throws java.io.IOException
161 * if an IOException occurs during marshaling
162 * @throws org.exolab.castor.xml.ValidationException
163 * if this object is an invalid instance according to the schema
164 * @throws org.exolab.castor.xml.MarshalException
165 * if object is null or if any SAXException is thrown during
168 public void marshal(final org.xml.sax.ContentHandler handler)
169 throws java.io.IOException,
170 org.exolab.castor.xml.MarshalException,
171 org.exolab.castor.xml.ValidationException
173 Marshaller.marshal(this, handler);
177 * Sets the value of field 'accessionId'.
180 * the value of field 'accessionId'.
182 public void setAccessionId(final java.lang.String accessionId)
184 this._accessionId = accessionId;
188 * Sets the value of field 'mapping'.
191 * the value of field 'mapping'.
193 public void setMapping(
194 final jalview.schemabinding.version2.Mapping mapping)
196 this._mapping = mapping;
200 * Sets the value of field 'source'.
203 * the value of field 'source'.
205 public void setSource(final java.lang.String source)
207 this._source = source;
211 * Sets the value of field 'version'.
214 * the value of field 'version'.
216 public void setVersion(final java.lang.String version)
218 this._version = version;
225 * @throws org.exolab.castor.xml.MarshalException
226 * if object is null or if any SAXException is thrown during
228 * @throws org.exolab.castor.xml.ValidationException
229 * if this object is an invalid instance according to the schema
230 * @return the unmarshaled jalview.schemabinding.version2.DBRef
232 public static jalview.schemabinding.version2.DBRef unmarshal(
233 final java.io.Reader reader)
234 throws org.exolab.castor.xml.MarshalException,
235 org.exolab.castor.xml.ValidationException
237 return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(
238 jalview.schemabinding.version2.DBRef.class, reader);
244 * @throws org.exolab.castor.xml.ValidationException
245 * if this object is an invalid instance according to the schema
247 public void validate() throws org.exolab.castor.xml.ValidationException
249 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
250 validator.validate(this);