X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemabinding%2Fversion2%2FPdbentryItem.java;h=527f5abc783b1b619856e946c8dca949d4c72ca4;hb=7bc226b58110fa26d9dbd3f0c78095d06909ffc3;hp=6f6403680e9a526dc2aa05266322072254332e31;hpb=65df62f4b048a1615d32ea2c3576082ad2b63af8;p=jalview.git diff --git a/src/jalview/schemabinding/version2/PdbentryItem.java b/src/jalview/schemabinding/version2/PdbentryItem.java index 6f64036..527f5ab 100755 --- a/src/jalview/schemabinding/version2/PdbentryItem.java +++ b/src/jalview/schemabinding/version2/PdbentryItem.java @@ -1,5 +1,5 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ @@ -7,191 +7,197 @@ package jalview.schemabinding.version2; - //---------------------------------/ - //- Imported classes and packages -/ +//---------------------------------/ +//- 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; +import java.util.*; /** * 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() +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())) { - _propertyList.removeAllElements(); - } //-- void removeAllProperty() - - /** - * Method removeProperty - * - * - * - * @param index - * @return Property - */ - public jalview.schemabinding.version2.Property removeProperty(int index) + 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++) { - 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 + 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())) { - //-- 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) + 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++) { - //-- copy array - _propertyList.removeAllElements(); - for (int i = 0; i < propertyArray.length; i++) { - _propertyList.addElement(propertyArray[i]); - } - } //-- void setProperty(jalview.schemabinding.version2.Property) + _propertyList.addElement(propertyArray[i]); + } + } //-- void setProperty(jalview.schemabinding.version2.Property) }