3917e132309dd0762a00f8cb2a8aca55de027e3c
[jalview.git] / src / jalview / schemabinding / version2 / DBRef.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * Class DBRef.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class DBRef implements java.io.Serializable {
23
24
25       //--------------------------/
26      //- Class/Member Variables -/
27     //--------------------------/
28
29     /**
30      * Field _source.
31      */
32     private java.lang.String _source;
33
34     /**
35      * Field _version.
36      */
37     private java.lang.String _version;
38
39     /**
40      * Field _accessionId.
41      */
42     private java.lang.String _accessionId;
43
44     /**
45      * Field _mapping.
46      */
47     private jalview.schemabinding.version2.Mapping _mapping;
48
49
50       //----------------/
51      //- Constructors -/
52     //----------------/
53
54     public DBRef() {
55         super();
56     }
57
58
59       //-----------/
60      //- Methods -/
61     //-----------/
62
63     /**
64      * Returns the value of field 'accessionId'.
65      * 
66      * @return the value of field 'AccessionId'.
67      */
68     public java.lang.String getAccessionId(
69     ) {
70         return this._accessionId;
71     }
72
73     /**
74      * Returns the value of field 'mapping'.
75      * 
76      * @return the value of field 'Mapping'.
77      */
78     public jalview.schemabinding.version2.Mapping getMapping(
79     ) {
80         return this._mapping;
81     }
82
83     /**
84      * Returns the value of field 'source'.
85      * 
86      * @return the value of field 'Source'.
87      */
88     public java.lang.String getSource(
89     ) {
90         return this._source;
91     }
92
93     /**
94      * Returns the value of field 'version'.
95      * 
96      * @return the value of field 'Version'.
97      */
98     public java.lang.String getVersion(
99     ) {
100         return this._version;
101     }
102
103     /**
104      * Method isValid.
105      * 
106      * @return true if this object is valid according to the schema
107      */
108     public boolean isValid(
109     ) {
110         try {
111             validate();
112         } catch (org.exolab.castor.xml.ValidationException vex) {
113             return false;
114         }
115         return true;
116     }
117
118     /**
119      * 
120      * 
121      * @param out
122      * @throws org.exolab.castor.xml.MarshalException if object is
123      * null or if any SAXException is thrown during marshaling
124      * @throws org.exolab.castor.xml.ValidationException if this
125      * object is an invalid instance according to the schema
126      */
127     public void marshal(
128             final java.io.Writer out)
129     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
130         Marshaller.marshal(this, out);
131     }
132
133     /**
134      * 
135      * 
136      * @param handler
137      * @throws java.io.IOException if an IOException occurs during
138      * marshaling
139      * @throws org.exolab.castor.xml.ValidationException if this
140      * object is an invalid instance according to the schema
141      * @throws org.exolab.castor.xml.MarshalException if object is
142      * null or if any SAXException is thrown during marshaling
143      */
144     public void marshal(
145             final org.xml.sax.ContentHandler handler)
146     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
147         Marshaller.marshal(this, handler);
148     }
149
150     /**
151      * Sets the value of field 'accessionId'.
152      * 
153      * @param accessionId the value of field 'accessionId'.
154      */
155     public void setAccessionId(
156             final java.lang.String accessionId) {
157         this._accessionId = accessionId;
158     }
159
160     /**
161      * Sets the value of field 'mapping'.
162      * 
163      * @param mapping the value of field 'mapping'.
164      */
165     public void setMapping(
166             final jalview.schemabinding.version2.Mapping mapping) {
167         this._mapping = mapping;
168     }
169
170     /**
171      * Sets the value of field 'source'.
172      * 
173      * @param source the value of field 'source'.
174      */
175     public void setSource(
176             final java.lang.String source) {
177         this._source = source;
178     }
179
180     /**
181      * Sets the value of field 'version'.
182      * 
183      * @param version the value of field 'version'.
184      */
185     public void setVersion(
186             final java.lang.String version) {
187         this._version = version;
188     }
189
190     /**
191      * Method unmarshal.
192      * 
193      * @param reader
194      * @throws org.exolab.castor.xml.MarshalException if object is
195      * null or if any SAXException is thrown during marshaling
196      * @throws org.exolab.castor.xml.ValidationException if this
197      * object is an invalid instance according to the schema
198      * @return the unmarshaled jalview.schemabinding.version2.DBRef
199      */
200     public static jalview.schemabinding.version2.DBRef unmarshal(
201             final java.io.Reader reader)
202     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
203         return (jalview.schemabinding.version2.DBRef) Unmarshaller.unmarshal(jalview.schemabinding.version2.DBRef.class, reader);
204     }
205
206     /**
207      * 
208      * 
209      * @throws org.exolab.castor.xml.ValidationException if this
210      * object is an invalid instance according to the schema
211      */
212     public void validate(
213     )
214     throws org.exolab.castor.xml.ValidationException {
215         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
216         validator.validate(this);
217     }
218
219 }