/* * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ package jalview.schemabinding.version2; //---------------------------------/ //- Imported classes and packages -/ //---------------------------------/ import java.io.Serializable; import java.util.Enumeration; import java.util.Vector; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; /** * Class PdbentryItem. * * @version $Revision$ $Date$ */ public class PdbentryItem implements java.io.Serializable { //--------------------------/ //- Class/Member Variables -/ //--------------------------/ /** * Field _propertyList */ private java.util.Vector _propertyList; //----------------/ //- Constructors -/ //----------------/ public PdbentryItem() { super(); _propertyList = new Vector(); } //-- jalview.schemabinding.version2.PdbentryItem() //-----------/ //- Methods -/ //-----------/ /** * Method addProperty * * * * @param vProperty */ public void addProperty(jalview.schemabinding.version2.Property vProperty) throws java.lang.IndexOutOfBoundsException { _propertyList.addElement(vProperty); } //-- void addProperty(jalview.schemabinding.version2.Property) /** * Method addProperty * * * * @param index * @param vProperty */ public void addProperty(int index, jalview.schemabinding.version2.Property vProperty) throws java.lang.IndexOutOfBoundsException { _propertyList.insertElementAt(vProperty, index); } //-- void addProperty(int, jalview.schemabinding.version2.Property) /** * Method enumerateProperty * * * * @return Enumeration */ public java.util.Enumeration enumerateProperty() { return _propertyList.elements(); } //-- java.util.Enumeration enumerateProperty() /** * Method getProperty * * * * @param index * @return Property */ public jalview.schemabinding.version2.Property getProperty(int index) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _propertyList.size())) { throw new IndexOutOfBoundsException(); } return (jalview.schemabinding.version2.Property) _propertyList.elementAt(index); } //-- jalview.schemabinding.version2.Property getProperty(int) /** * Method getProperty * * * * @return Property */ public jalview.schemabinding.version2.Property[] getProperty() { int size = _propertyList.size(); jalview.schemabinding.version2.Property[] mArray = new jalview.schemabinding.version2.Property[size]; for (int index = 0; index < size; index++) { mArray[index] = (jalview.schemabinding.version2.Property) _propertyList.elementAt(index); } return mArray; } //-- jalview.schemabinding.version2.Property[] getProperty() /** * Method getPropertyCount * * * * @return int */ public int getPropertyCount() { return _propertyList.size(); } //-- int getPropertyCount() /** * Method removeAllProperty * */ public void removeAllProperty() { _propertyList.removeAllElements(); } //-- void removeAllProperty() /** * Method removeProperty * * * * @param index * @return Property */ public jalview.schemabinding.version2.Property removeProperty(int index) { java.lang.Object obj = _propertyList.elementAt(index); _propertyList.removeElementAt(index); return (jalview.schemabinding.version2.Property) obj; } //-- jalview.schemabinding.version2.Property removeProperty(int) /** * Method setProperty * * * * @param index * @param vProperty */ public void setProperty(int index, jalview.schemabinding.version2.Property vProperty) throws java.lang.IndexOutOfBoundsException { //-- check bounds for index if ((index < 0) || (index > _propertyList.size())) { throw new IndexOutOfBoundsException(); } _propertyList.setElementAt(vProperty, index); } //-- void setProperty(int, jalview.schemabinding.version2.Property) /** * Method setProperty * * * * @param propertyArray */ public void setProperty(jalview.schemabinding.version2.Property[] propertyArray) { //-- copy array _propertyList.removeAllElements(); for (int i = 0; i < propertyArray.length; i++) { _propertyList.addElement(propertyArray[i]); } } //-- void setProperty(jalview.schemabinding.version2.Property) }