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