2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import org.exolab.castor.xml.Marshaller;
\r
15 import org.exolab.castor.xml.Unmarshaller;
\r
20 * @version $Revision$ $Date$
\r
22 public class Pdbentry implements java.io.Serializable {
\r
25 //--------------------------/
\r
26 //- Class/Member Variables -/
\r
27 //--------------------------/
\r
32 private java.lang.String _id;
\r
37 private java.lang.String _type;
\r
42 private java.lang.String _file;
\r
47 private java.util.Vector _items;
\r
56 this._items = new java.util.Vector();
\r
67 * @param vPdbentryItem
\r
68 * @throws java.lang.IndexOutOfBoundsException if the index
\r
69 * given is outside the bounds of the collection
\r
71 public void addPdbentryItem(
\r
72 final jalview.schemabinding.version2.PdbentryItem vPdbentryItem)
\r
73 throws java.lang.IndexOutOfBoundsException {
\r
74 this._items.addElement(vPdbentryItem);
\r
81 * @param vPdbentryItem
\r
82 * @throws java.lang.IndexOutOfBoundsException if the index
\r
83 * given is outside the bounds of the collection
\r
85 public void addPdbentryItem(
\r
87 final jalview.schemabinding.version2.PdbentryItem vPdbentryItem)
\r
88 throws java.lang.IndexOutOfBoundsException {
\r
89 this._items.add(index, vPdbentryItem);
\r
93 * Method enumeratePdbentryItem.
\r
95 * @return an Enumeration over all
\r
96 * jalview.schemabinding.version2.PdbentryItem elements
\r
98 public java.util.Enumeration enumeratePdbentryItem(
\r
100 return this._items.elements();
\r
104 * Returns the value of field 'file'.
\r
106 * @return the value of field 'File'.
\r
108 public java.lang.String getFile(
\r
114 * Returns the value of field 'id'.
\r
116 * @return the value of field 'Id'.
\r
118 public java.lang.String getId(
\r
124 * Method getPdbentryItem.
\r
127 * @throws java.lang.IndexOutOfBoundsException if the index
\r
128 * given is outside the bounds of the collection
\r
129 * @return the value of the
\r
130 * jalview.schemabinding.version2.PdbentryItem at the given inde
\r
132 public jalview.schemabinding.version2.PdbentryItem getPdbentryItem(
\r
134 throws java.lang.IndexOutOfBoundsException {
\r
135 // check bounds for index
\r
136 if (index < 0 || index >= this._items.size()) {
\r
137 throw new IndexOutOfBoundsException("getPdbentryItem: Index value '" + index + "' not in range [0.." + (this._items.size() - 1) + "]");
\r
140 return (jalview.schemabinding.version2.PdbentryItem) _items.get(index);
\r
144 * Method getPdbentryItem.Returns the contents of the
\r
145 * collection in an Array. <p>Note: Just in case the
\r
146 * collection contents are changing in another thread, we pass
\r
147 * a 0-length Array of the correct type into the API call.
\r
148 * This way we <i>know</i> that the Array returned is of
\r
149 * exactly the correct length.
\r
151 * @return this collection as an Array
\r
153 public jalview.schemabinding.version2.PdbentryItem[] getPdbentryItem(
\r
155 jalview.schemabinding.version2.PdbentryItem[] array = new jalview.schemabinding.version2.PdbentryItem[0];
\r
156 return (jalview.schemabinding.version2.PdbentryItem[]) this._items.toArray(array);
\r
160 * Method getPdbentryItemCount.
\r
162 * @return the size of this collection
\r
164 public int getPdbentryItemCount(
\r
166 return this._items.size();
\r
170 * Returns the value of field 'type'.
\r
172 * @return the value of field 'Type'.
\r
174 public java.lang.String getType(
\r
182 * @return true if this object is valid according to the schema
\r
184 public boolean isValid(
\r
188 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
198 * @throws org.exolab.castor.xml.MarshalException if object is
\r
199 * null or if any SAXException is thrown during marshaling
\r
200 * @throws org.exolab.castor.xml.ValidationException if this
\r
201 * object is an invalid instance according to the schema
\r
203 public void marshal(
\r
204 final java.io.Writer out)
\r
205 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
206 Marshaller.marshal(this, out);
\r
213 * @throws java.io.IOException if an IOException occurs during
\r
215 * @throws org.exolab.castor.xml.ValidationException if this
\r
216 * object is an invalid instance according to the schema
\r
217 * @throws org.exolab.castor.xml.MarshalException if object is
\r
218 * null or if any SAXException is thrown during marshaling
\r
220 public void marshal(
\r
221 final org.xml.sax.ContentHandler handler)
\r
222 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
223 Marshaller.marshal(this, handler);
\r
228 public void removeAllPdbentryItem(
\r
230 this._items.clear();
\r
234 * Method removePdbentryItem.
\r
236 * @param vPdbentryItem
\r
237 * @return true if the object was removed from the collection.
\r
239 public boolean removePdbentryItem(
\r
240 final jalview.schemabinding.version2.PdbentryItem vPdbentryItem) {
\r
241 boolean removed = _items.remove(vPdbentryItem);
\r
246 * Method removePdbentryItemAt.
\r
249 * @return the element removed from the collection
\r
251 public jalview.schemabinding.version2.PdbentryItem removePdbentryItemAt(
\r
253 java.lang.Object obj = this._items.remove(index);
\r
254 return (jalview.schemabinding.version2.PdbentryItem) obj;
\r
258 * Sets the value of field 'file'.
\r
260 * @param file the value of field 'file'.
\r
262 public void setFile(
\r
263 final java.lang.String file) {
\r
268 * Sets the value of field 'id'.
\r
270 * @param id the value of field 'id'.
\r
273 final java.lang.String id) {
\r
281 * @param vPdbentryItem
\r
282 * @throws java.lang.IndexOutOfBoundsException if the index
\r
283 * given is outside the bounds of the collection
\r
285 public void setPdbentryItem(
\r
287 final jalview.schemabinding.version2.PdbentryItem vPdbentryItem)
\r
288 throws java.lang.IndexOutOfBoundsException {
\r
289 // check bounds for index
\r
290 if (index < 0 || index >= this._items.size()) {
\r
291 throw new IndexOutOfBoundsException("setPdbentryItem: Index value '" + index + "' not in range [0.." + (this._items.size() - 1) + "]");
\r
294 this._items.set(index, vPdbentryItem);
\r
300 * @param vPdbentryItemArray
\r
302 public void setPdbentryItem(
\r
303 final jalview.schemabinding.version2.PdbentryItem[] vPdbentryItemArray) {
\r
307 for (int i = 0; i < vPdbentryItemArray.length; i++) {
\r
308 this._items.add(vPdbentryItemArray[i]);
\r
313 * Sets the value of field 'type'.
\r
315 * @param type the value of field 'type'.
\r
317 public void setType(
\r
318 final java.lang.String type) {
\r
323 * Method unmarshal.
\r
326 * @throws org.exolab.castor.xml.MarshalException if object is
\r
327 * null or if any SAXException is thrown during marshaling
\r
328 * @throws org.exolab.castor.xml.ValidationException if this
\r
329 * object is an invalid instance according to the schema
\r
330 * @return the unmarshaled
\r
331 * jalview.schemabinding.version2.Pdbentry
\r
333 public static jalview.schemabinding.version2.Pdbentry unmarshal(
\r
334 final java.io.Reader reader)
\r
335 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
336 return (jalview.schemabinding.version2.Pdbentry) Unmarshaller.unmarshal(jalview.schemabinding.version2.Pdbentry.class, reader);
\r
342 * @throws org.exolab.castor.xml.ValidationException if this
\r
343 * object is an invalid instance according to the schema
\r
345 public void validate(
\r
347 throws org.exolab.castor.xml.ValidationException {
\r
348 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
349 validator.validate(this);
\r