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 Pdbids extends jalview.schemabinding.version2.Pdbentry
\r
23 implements java.io.Serializable
\r
27 //--------------------------/
\r
28 //- Class/Member Variables -/
\r
29 //--------------------------/
\r
32 * Field _structureStateList.
\r
34 private java.util.Vector _structureStateList;
\r
43 this._structureStateList = new java.util.Vector();
\r
54 * @param vStructureState
\r
55 * @throws java.lang.IndexOutOfBoundsException if the index
\r
56 * given is outside the bounds of the collection
\r
58 public void addStructureState(
\r
59 final jalview.schemabinding.version2.StructureState vStructureState)
\r
60 throws java.lang.IndexOutOfBoundsException {
\r
61 this._structureStateList.addElement(vStructureState);
\r
68 * @param vStructureState
\r
69 * @throws java.lang.IndexOutOfBoundsException if the index
\r
70 * given is outside the bounds of the collection
\r
72 public void addStructureState(
\r
74 final jalview.schemabinding.version2.StructureState vStructureState)
\r
75 throws java.lang.IndexOutOfBoundsException {
\r
76 this._structureStateList.add(index, vStructureState);
\r
80 * Method enumerateStructureState.
\r
82 * @return an Enumeration over all
\r
83 * jalview.schemabinding.version2.StructureState elements
\r
85 public java.util.Enumeration enumerateStructureState(
\r
87 return this._structureStateList.elements();
\r
91 * Method getStructureState.
\r
94 * @throws java.lang.IndexOutOfBoundsException if the index
\r
95 * given is outside the bounds of the collection
\r
96 * @return the value of the
\r
97 * jalview.schemabinding.version2.StructureState at the given
\r
100 public jalview.schemabinding.version2.StructureState getStructureState(
\r
102 throws java.lang.IndexOutOfBoundsException {
\r
103 // check bounds for index
\r
104 if (index < 0 || index >= this._structureStateList.size()) {
\r
105 throw new IndexOutOfBoundsException("getStructureState: Index value '" + index + "' not in range [0.." + (this._structureStateList.size() - 1) + "]");
\r
108 return (jalview.schemabinding.version2.StructureState) _structureStateList.get(index);
\r
112 * Method getStructureState.Returns the contents of the
\r
113 * collection in an Array. <p>Note: Just in case the
\r
114 * collection contents are changing in another thread, we pass
\r
115 * a 0-length Array of the correct type into the API call.
\r
116 * This way we <i>know</i> that the Array returned is of
\r
117 * exactly the correct length.
\r
119 * @return this collection as an Array
\r
121 public jalview.schemabinding.version2.StructureState[] getStructureState(
\r
123 jalview.schemabinding.version2.StructureState[] array = new jalview.schemabinding.version2.StructureState[0];
\r
124 return (jalview.schemabinding.version2.StructureState[]) this._structureStateList.toArray(array);
\r
128 * Method getStructureStateCount.
\r
130 * @return the size of this collection
\r
132 public int getStructureStateCount(
\r
134 return this._structureStateList.size();
\r
140 * @return true if this object is valid according to the schema
\r
142 public boolean isValid(
\r
146 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
156 * @throws org.exolab.castor.xml.MarshalException if object is
\r
157 * null or if any SAXException is thrown during marshaling
\r
158 * @throws org.exolab.castor.xml.ValidationException if this
\r
159 * object is an invalid instance according to the schema
\r
161 public void marshal(
\r
162 final java.io.Writer out)
\r
163 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
164 Marshaller.marshal(this, out);
\r
171 * @throws java.io.IOException if an IOException occurs during
\r
173 * @throws org.exolab.castor.xml.ValidationException if this
\r
174 * object is an invalid instance according to the schema
\r
175 * @throws org.exolab.castor.xml.MarshalException if object is
\r
176 * null or if any SAXException is thrown during marshaling
\r
178 public void marshal(
\r
179 final org.xml.sax.ContentHandler handler)
\r
180 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
181 Marshaller.marshal(this, handler);
\r
186 public void removeAllStructureState(
\r
188 this._structureStateList.clear();
\r
192 * Method removeStructureState.
\r
194 * @param vStructureState
\r
195 * @return true if the object was removed from the collection.
\r
197 public boolean removeStructureState(
\r
198 final jalview.schemabinding.version2.StructureState vStructureState) {
\r
199 boolean removed = _structureStateList.remove(vStructureState);
\r
204 * Method removeStructureStateAt.
\r
207 * @return the element removed from the collection
\r
209 public jalview.schemabinding.version2.StructureState removeStructureStateAt(
\r
211 java.lang.Object obj = this._structureStateList.remove(index);
\r
212 return (jalview.schemabinding.version2.StructureState) obj;
\r
219 * @param vStructureState
\r
220 * @throws java.lang.IndexOutOfBoundsException if the index
\r
221 * given is outside the bounds of the collection
\r
223 public void setStructureState(
\r
225 final jalview.schemabinding.version2.StructureState vStructureState)
\r
226 throws java.lang.IndexOutOfBoundsException {
\r
227 // check bounds for index
\r
228 if (index < 0 || index >= this._structureStateList.size()) {
\r
229 throw new IndexOutOfBoundsException("setStructureState: Index value '" + index + "' not in range [0.." + (this._structureStateList.size() - 1) + "]");
\r
232 this._structureStateList.set(index, vStructureState);
\r
238 * @param vStructureStateArray
\r
240 public void setStructureState(
\r
241 final jalview.schemabinding.version2.StructureState[] vStructureStateArray) {
\r
243 _structureStateList.clear();
\r
245 for (int i = 0; i < vStructureStateArray.length; i++) {
\r
246 this._structureStateList.add(vStructureStateArray[i]);
\r
251 * Method unmarshal.
\r
254 * @throws org.exolab.castor.xml.MarshalException if object is
\r
255 * null or if any SAXException is thrown during marshaling
\r
256 * @throws org.exolab.castor.xml.ValidationException if this
\r
257 * object is an invalid instance according to the schema
\r
258 * @return the unmarshaled
\r
259 * jalview.schemabinding.version2.Pdbentry
\r
261 public static jalview.schemabinding.version2.Pdbentry unmarshal(
\r
262 final java.io.Reader reader)
\r
263 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
264 return (jalview.schemabinding.version2.Pdbentry) Unmarshaller.unmarshal(jalview.schemabinding.version2.Pdbids.class, reader);
\r
270 * @throws org.exolab.castor.xml.ValidationException if this
\r
271 * object is an invalid instance according to the schema
\r
273 public void validate(
\r
275 throws org.exolab.castor.xml.ValidationException {
\r
276 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
277 validator.validate(this);
\r