Formatting
[jalview.git] / src / jalview / schemabinding / version2 / PdbentryItem.java
1 /*\r
2  * This class was automatically generated with\r
3  * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package jalview.schemabinding.version2;\r
9 \r
10 //---------------------------------/\r
11 //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import java.util.*;\r
15 \r
16 /**\r
17  * Class PdbentryItem.\r
18  *\r
19  * @version $Revision$ $Date$\r
20  */\r
21 public class PdbentryItem\r
22     implements java.io.Serializable\r
23 {\r
24 \r
25   //--------------------------/\r
26   //- Class/Member Variables -/\r
27   //--------------------------/\r
28 \r
29   /**\r
30    * Field _propertyList\r
31    */\r
32   private java.util.Vector _propertyList;\r
33 \r
34   //----------------/\r
35   //- Constructors -/\r
36   //----------------/\r
37 \r
38   public PdbentryItem()\r
39   {\r
40     super();\r
41     _propertyList = new Vector();\r
42   } //-- jalview.schemabinding.version2.PdbentryItem()\r
43 \r
44   //-----------/\r
45   //- Methods -/\r
46   //-----------/\r
47 \r
48   /**\r
49    * Method addProperty\r
50    *\r
51    *\r
52    *\r
53    * @param vProperty\r
54    */\r
55   public void addProperty(jalview.schemabinding.version2.Property vProperty)\r
56       throws java.lang.IndexOutOfBoundsException\r
57   {\r
58     _propertyList.addElement(vProperty);\r
59   } //-- void addProperty(jalview.schemabinding.version2.Property)\r
60 \r
61   /**\r
62    * Method addProperty\r
63    *\r
64    *\r
65    *\r
66    * @param index\r
67    * @param vProperty\r
68    */\r
69   public void addProperty(int index,\r
70                           jalview.schemabinding.version2.Property vProperty)\r
71       throws java.lang.IndexOutOfBoundsException\r
72   {\r
73     _propertyList.insertElementAt(vProperty, index);\r
74   } //-- void addProperty(int, jalview.schemabinding.version2.Property)\r
75 \r
76   /**\r
77    * Method enumerateProperty\r
78    *\r
79    *\r
80    *\r
81    * @return Enumeration\r
82    */\r
83   public java.util.Enumeration enumerateProperty()\r
84   {\r
85     return _propertyList.elements();\r
86   } //-- java.util.Enumeration enumerateProperty()\r
87 \r
88   /**\r
89    * Method getProperty\r
90    *\r
91    *\r
92    *\r
93    * @param index\r
94    * @return Property\r
95    */\r
96   public jalview.schemabinding.version2.Property getProperty(int index)\r
97       throws java.lang.IndexOutOfBoundsException\r
98   {\r
99     //-- check bounds for index\r
100     if ( (index < 0) || (index > _propertyList.size()))\r
101     {\r
102       throw new IndexOutOfBoundsException();\r
103     }\r
104 \r
105     return (jalview.schemabinding.version2.Property) _propertyList.elementAt(\r
106         index);\r
107   } //-- jalview.schemabinding.version2.Property getProperty(int)\r
108 \r
109   /**\r
110    * Method getProperty\r
111    *\r
112    *\r
113    *\r
114    * @return Property\r
115    */\r
116   public jalview.schemabinding.version2.Property[] getProperty()\r
117   {\r
118     int size = _propertyList.size();\r
119     jalview.schemabinding.version2.Property[] mArray = new jalview.\r
120         schemabinding.version2.Property[size];\r
121     for (int index = 0; index < size; index++)\r
122     {\r
123       mArray[index] = (jalview.schemabinding.version2.Property) _propertyList.\r
124           elementAt(index);\r
125     }\r
126     return mArray;\r
127   } //-- jalview.schemabinding.version2.Property[] getProperty()\r
128 \r
129   /**\r
130    * Method getPropertyCount\r
131    *\r
132    *\r
133    *\r
134    * @return int\r
135    */\r
136   public int getPropertyCount()\r
137   {\r
138     return _propertyList.size();\r
139   } //-- int getPropertyCount()\r
140 \r
141   /**\r
142    * Method removeAllProperty\r
143    *\r
144    */\r
145   public void removeAllProperty()\r
146   {\r
147     _propertyList.removeAllElements();\r
148   } //-- void removeAllProperty()\r
149 \r
150   /**\r
151    * Method removeProperty\r
152    *\r
153    *\r
154    *\r
155    * @param index\r
156    * @return Property\r
157    */\r
158   public jalview.schemabinding.version2.Property removeProperty(int index)\r
159   {\r
160     java.lang.Object obj = _propertyList.elementAt(index);\r
161     _propertyList.removeElementAt(index);\r
162     return (jalview.schemabinding.version2.Property) obj;\r
163   } //-- jalview.schemabinding.version2.Property removeProperty(int)\r
164 \r
165   /**\r
166    * Method setProperty\r
167    *\r
168    *\r
169    *\r
170    * @param index\r
171    * @param vProperty\r
172    */\r
173   public void setProperty(int index,\r
174                           jalview.schemabinding.version2.Property vProperty)\r
175       throws java.lang.IndexOutOfBoundsException\r
176   {\r
177     //-- check bounds for index\r
178     if ( (index < 0) || (index > _propertyList.size()))\r
179     {\r
180       throw new IndexOutOfBoundsException();\r
181     }\r
182     _propertyList.setElementAt(vProperty, index);\r
183   } //-- void setProperty(int, jalview.schemabinding.version2.Property)\r
184 \r
185   /**\r
186    * Method setProperty\r
187    *\r
188    *\r
189    *\r
190    * @param propertyArray\r
191    */\r
192   public void setProperty(jalview.schemabinding.version2.Property[]\r
193                           propertyArray)\r
194   {\r
195     //-- copy array\r
196     _propertyList.removeAllElements();\r
197     for (int i = 0; i < propertyArray.length; i++)\r
198     {\r
199       _propertyList.addElement(propertyArray[i]);\r
200     }\r
201   } //-- void setProperty(jalview.schemabinding.version2.Property)\r
202 \r
203 }\r