2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML
\r
8 package jalview.schemabinding.version2;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
16 import org.exolab.castor.xml.*;
\r
21 * @version $Revision$ $Date$
\r
23 public class Pdbentry
\r
24 implements java.io.Serializable
\r
27 //--------------------------/
\r
28 //- Class/Member Variables -/
\r
29 //--------------------------/
\r
34 private java.lang.String _id;
\r
39 private java.lang.String _type;
\r
44 private java.lang.String _file;
\r
49 private java.util.Vector _items;
\r
58 _items = new Vector();
\r
59 } //-- jalview.schemabinding.version2.Pdbentry()
\r
66 * Method addPdbentryItem
\r
70 * @param vPdbentryItem
\r
72 public void addPdbentryItem(jalview.schemabinding.version2.PdbentryItem
\r
74 throws java.lang.IndexOutOfBoundsException
\r
76 _items.addElement(vPdbentryItem);
\r
77 } //-- void addPdbentryItem(jalview.schemabinding.version2.PdbentryItem)
\r
80 * Method addPdbentryItem
\r
85 * @param vPdbentryItem
\r
87 public void addPdbentryItem(int index,
\r
88 jalview.schemabinding.version2.PdbentryItem
\r
90 throws java.lang.IndexOutOfBoundsException
\r
92 _items.insertElementAt(vPdbentryItem, index);
\r
93 } //-- void addPdbentryItem(int, jalview.schemabinding.version2.PdbentryItem)
\r
96 * Method enumeratePdbentryItem
\r
100 * @return Enumeration
\r
102 public java.util.Enumeration enumeratePdbentryItem()
\r
104 return _items.elements();
\r
105 } //-- java.util.Enumeration enumeratePdbentryItem()
\r
108 * Returns the value of field 'file'.
\r
111 * @return the value of field 'file'.
\r
113 public java.lang.String getFile()
\r
116 } //-- java.lang.String getFile()
\r
119 * Returns the value of field 'id'.
\r
122 * @return the value of field 'id'.
\r
124 public java.lang.String getId()
\r
127 } //-- java.lang.String getId()
\r
130 * Method getPdbentryItem
\r
135 * @return PdbentryItem
\r
137 public jalview.schemabinding.version2.PdbentryItem getPdbentryItem(int index)
\r
138 throws java.lang.IndexOutOfBoundsException
\r
140 //-- check bounds for index
\r
141 if ( (index < 0) || (index > _items.size()))
\r
143 throw new IndexOutOfBoundsException();
\r
146 return (jalview.schemabinding.version2.PdbentryItem) _items.elementAt(index);
\r
147 } //-- jalview.schemabinding.version2.PdbentryItem getPdbentryItem(int)
\r
150 * Method getPdbentryItem
\r
154 * @return PdbentryItem
\r
156 public jalview.schemabinding.version2.PdbentryItem[] getPdbentryItem()
\r
158 int size = _items.size();
\r
159 jalview.schemabinding.version2.PdbentryItem[] mArray = new jalview.
\r
160 schemabinding.version2.PdbentryItem[size];
\r
161 for (int index = 0; index < size; index++)
\r
163 mArray[index] = (jalview.schemabinding.version2.PdbentryItem) _items.
\r
167 } //-- jalview.schemabinding.version2.PdbentryItem[] getPdbentryItem()
\r
170 * Method getPdbentryItemCount
\r
176 public int getPdbentryItemCount()
\r
178 return _items.size();
\r
179 } //-- int getPdbentryItemCount()
\r
182 * Returns the value of field 'type'.
\r
185 * @return the value of field 'type'.
\r
187 public java.lang.String getType()
\r
190 } //-- java.lang.String getType()
\r
199 public boolean isValid()
\r
205 catch (org.exolab.castor.xml.ValidationException vex)
\r
210 } //-- boolean isValid()
\r
219 public void marshal(java.io.Writer out)
\r
220 throws org.exolab.castor.xml.MarshalException,
\r
221 org.exolab.castor.xml.ValidationException
\r
224 Marshaller.marshal(this, out);
\r
225 } //-- void marshal(java.io.Writer)
\r
234 public void marshal(org.xml.sax.ContentHandler handler)
\r
235 throws java.io.IOException, org.exolab.castor.xml.MarshalException,
\r
236 org.exolab.castor.xml.ValidationException
\r
239 Marshaller.marshal(this, handler);
\r
240 } //-- void marshal(org.xml.sax.ContentHandler)
\r
243 * Method removeAllPdbentryItem
\r
246 public void removeAllPdbentryItem()
\r
248 _items.removeAllElements();
\r
249 } //-- void removeAllPdbentryItem()
\r
252 * Method removePdbentryItem
\r
257 * @return PdbentryItem
\r
259 public jalview.schemabinding.version2.PdbentryItem removePdbentryItem(int
\r
262 java.lang.Object obj = _items.elementAt(index);
\r
263 _items.removeElementAt(index);
\r
264 return (jalview.schemabinding.version2.PdbentryItem) obj;
\r
265 } //-- jalview.schemabinding.version2.PdbentryItem removePdbentryItem(int)
\r
268 * Sets the value of field 'file'.
\r
270 * @param file the value of field 'file'.
\r
272 public void setFile(java.lang.String file)
\r
275 } //-- void setFile(java.lang.String)
\r
278 * Sets the value of field 'id'.
\r
280 * @param id the value of field 'id'.
\r
282 public void setId(java.lang.String id)
\r
285 } //-- void setId(java.lang.String)
\r
288 * Method setPdbentryItem
\r
293 * @param vPdbentryItem
\r
295 public void setPdbentryItem(int index,
\r
296 jalview.schemabinding.version2.PdbentryItem
\r
298 throws java.lang.IndexOutOfBoundsException
\r
300 //-- check bounds for index
\r
301 if ( (index < 0) || (index > _items.size()))
\r
303 throw new IndexOutOfBoundsException();
\r
305 _items.setElementAt(vPdbentryItem, index);
\r
306 } //-- void setPdbentryItem(int, jalview.schemabinding.version2.PdbentryItem)
\r
309 * Method setPdbentryItem
\r
313 * @param pdbentryItemArray
\r
315 public void setPdbentryItem(jalview.schemabinding.version2.PdbentryItem[]
\r
319 _items.removeAllElements();
\r
320 for (int i = 0; i < pdbentryItemArray.length; i++)
\r
322 _items.addElement(pdbentryItemArray[i]);
\r
324 } //-- void setPdbentryItem(jalview.schemabinding.version2.PdbentryItem)
\r
327 * Sets the value of field 'type'.
\r
329 * @param type the value of field 'type'.
\r
331 public void setType(java.lang.String type)
\r
334 } //-- void setType(java.lang.String)
\r
344 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
345 throws org.exolab.castor.xml.MarshalException,
\r
346 org.exolab.castor.xml.ValidationException
\r
348 return (jalview.schemabinding.version2.Pdbentry) Unmarshaller.unmarshal(
\r
349 jalview.schemabinding.version2.Pdbentry.class, reader);
\r
350 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
356 public void validate()
\r
357 throws org.exolab.castor.xml.ValidationException
\r
359 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.
\r
361 validator.validate(this);
\r
362 } //-- void validate()
\r