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.binding;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import java.io.IOException;
\r
15 import java.io.Reader;
\r
16 import java.io.Serializable;
\r
17 import java.io.Writer;
\r
18 import java.util.Enumeration;
\r
19 import java.util.Vector;
\r
20 import org.exolab.castor.xml.MarshalException;
\r
21 import org.exolab.castor.xml.Marshaller;
\r
22 import org.exolab.castor.xml.Unmarshaller;
\r
23 import org.exolab.castor.xml.ValidationException;
\r
24 import org.xml.sax.ContentHandler;
\r
29 * @version $Revision$ $Date$
\r
31 public class Pdbentry implements java.io.Serializable {
\r
34 //--------------------------/
\r
35 //- Class/Member Variables -/
\r
36 //--------------------------/
\r
41 private java.lang.String _id;
\r
46 private java.lang.String _type;
\r
51 private java.util.Vector _items;
\r
60 _items = new Vector();
\r
61 } //-- jalview.binding.Pdbentry()
\r
69 * Method addPdbentryItem
\r
73 * @param vPdbentryItem
\r
75 public void addPdbentryItem(jalview.binding.PdbentryItem vPdbentryItem)
\r
76 throws java.lang.IndexOutOfBoundsException
\r
78 _items.addElement(vPdbentryItem);
\r
79 } //-- void addPdbentryItem(jalview.binding.PdbentryItem)
\r
82 * Method addPdbentryItem
\r
87 * @param vPdbentryItem
\r
89 public void addPdbentryItem(int index, jalview.binding.PdbentryItem vPdbentryItem)
\r
90 throws java.lang.IndexOutOfBoundsException
\r
92 _items.insertElementAt(vPdbentryItem, index);
\r
93 } //-- void addPdbentryItem(int, jalview.binding.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 'id'.
\r
111 * @return the value of field 'id'.
\r
113 public java.lang.String getId()
\r
116 } //-- java.lang.String getId()
\r
119 * Method getPdbentryItem
\r
124 * @return PdbentryItem
\r
126 public jalview.binding.PdbentryItem getPdbentryItem(int index)
\r
127 throws java.lang.IndexOutOfBoundsException
\r
129 //-- check bounds for index
\r
130 if ((index < 0) || (index > _items.size())) {
\r
131 throw new IndexOutOfBoundsException();
\r
134 return (jalview.binding.PdbentryItem) _items.elementAt(index);
\r
135 } //-- jalview.binding.PdbentryItem getPdbentryItem(int)
\r
138 * Method getPdbentryItem
\r
142 * @return PdbentryItem
\r
144 public jalview.binding.PdbentryItem[] getPdbentryItem()
\r
146 int size = _items.size();
\r
147 jalview.binding.PdbentryItem[] mArray = new jalview.binding.PdbentryItem[size];
\r
148 for (int index = 0; index < size; index++) {
\r
149 mArray[index] = (jalview.binding.PdbentryItem) _items.elementAt(index);
\r
152 } //-- jalview.binding.PdbentryItem[] getPdbentryItem()
\r
155 * Method getPdbentryItemCount
\r
161 public int getPdbentryItemCount()
\r
163 return _items.size();
\r
164 } //-- int getPdbentryItemCount()
\r
167 * Returns the value of field 'type'.
\r
170 * @return the value of field 'type'.
\r
172 public java.lang.String getType()
\r
175 } //-- java.lang.String getType()
\r
184 public boolean isValid()
\r
189 catch (org.exolab.castor.xml.ValidationException vex) {
\r
193 } //-- boolean isValid()
\r
202 public void marshal(java.io.Writer out)
\r
203 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
206 Marshaller.marshal(this, out);
\r
207 } //-- void marshal(java.io.Writer)
\r
216 public void marshal(org.xml.sax.ContentHandler handler)
\r
217 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
220 Marshaller.marshal(this, handler);
\r
221 } //-- void marshal(org.xml.sax.ContentHandler)
\r
224 * Method removeAllPdbentryItem
\r
227 public void removeAllPdbentryItem()
\r
229 _items.removeAllElements();
\r
230 } //-- void removeAllPdbentryItem()
\r
233 * Method removePdbentryItem
\r
238 * @return PdbentryItem
\r
240 public jalview.binding.PdbentryItem removePdbentryItem(int index)
\r
242 java.lang.Object obj = _items.elementAt(index);
\r
243 _items.removeElementAt(index);
\r
244 return (jalview.binding.PdbentryItem) obj;
\r
245 } //-- jalview.binding.PdbentryItem removePdbentryItem(int)
\r
248 * Sets the value of field 'id'.
\r
250 * @param id the value of field 'id'.
\r
252 public void setId(java.lang.String id)
\r
255 } //-- void setId(java.lang.String)
\r
258 * Method setPdbentryItem
\r
263 * @param vPdbentryItem
\r
265 public void setPdbentryItem(int index, jalview.binding.PdbentryItem vPdbentryItem)
\r
266 throws java.lang.IndexOutOfBoundsException
\r
268 //-- check bounds for index
\r
269 if ((index < 0) || (index > _items.size())) {
\r
270 throw new IndexOutOfBoundsException();
\r
272 _items.setElementAt(vPdbentryItem, index);
\r
273 } //-- void setPdbentryItem(int, jalview.binding.PdbentryItem)
\r
276 * Method setPdbentryItem
\r
280 * @param pdbentryItemArray
\r
282 public void setPdbentryItem(jalview.binding.PdbentryItem[] pdbentryItemArray)
\r
285 _items.removeAllElements();
\r
286 for (int i = 0; i < pdbentryItemArray.length; i++) {
\r
287 _items.addElement(pdbentryItemArray[i]);
\r
289 } //-- void setPdbentryItem(jalview.binding.PdbentryItem)
\r
292 * Sets the value of field 'type'.
\r
294 * @param type the value of field 'type'.
\r
296 public void setType(java.lang.String type)
\r
299 } //-- void setType(java.lang.String)
\r
309 public static java.lang.Object unmarshal(java.io.Reader reader)
\r
310 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
312 return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(jalview.binding.Pdbentry.class, reader);
\r
313 } //-- java.lang.Object unmarshal(java.io.Reader)
\r
319 public void validate()
\r
320 throws org.exolab.castor.xml.ValidationException
\r
322 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
323 validator.validate(this);
\r
324 } //-- void validate()
\r