X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Forg%2Fvamsas%2Fobjects%2Fcore%2FSequenceType.java;h=1adc80a3dd9ade2e83c4ddb59d2fc2aa4b9ed39a;hb=2e92d5449226c6b2423129d779977df26fe74ec6;hp=e6204d6c873ffa58b6ad7a70740eb7be66bc70ff;hpb=c062fe4c183d567877484f0229631dc555ddc9f5;p=vamsas.git diff --git a/src/org/vamsas/objects/core/SequenceType.java b/src/org/vamsas/objects/core/SequenceType.java index e6204d6..1adc80a 100644 --- a/src/org/vamsas/objects/core/SequenceType.java +++ b/src/org/vamsas/objects/core/SequenceType.java @@ -15,8 +15,6 @@ import java.io.IOException; import java.io.Reader; import java.io.Serializable; import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; @@ -58,11 +56,6 @@ implements java.io.Serializable private boolean _has_end; /** - * Field _id - */ - private java.lang.String _id; - - /** * Field _sequence */ private java.lang.String _sequence; @@ -72,11 +65,6 @@ implements java.io.Serializable */ private java.lang.String _name; - /** - * Field _dbRefList - */ - private java.util.Vector _dbRefList; - //----------------/ //- Constructors -/ @@ -85,7 +73,6 @@ implements java.io.Serializable public SequenceType() { super(); - _dbRefList = new Vector(); } //-- org.vamsas.objects.core.SequenceType() @@ -94,33 +81,6 @@ implements java.io.Serializable //-----------/ /** - * Method addDbRef - * - * - * - * @param vDbRef - */ - public void addDbRef(org.vamsas.objects.core.DbRef vDbRef) - throws java.lang.IndexOutOfBoundsException - { - _dbRefList.addElement(vDbRef); - } //-- void addDbRef(org.vamsas.objects.core.DbRef) - - /** - * Method addDbRef - * - * - * - * @param index - * @param vDbRef - */ - public void addDbRef(int index, org.vamsas.objects.core.DbRef vDbRef) - throws java.lang.IndexOutOfBoundsException - { - _dbRefList.insertElementAt(vDbRef, index); - } //-- void addDbRef(int, org.vamsas.objects.core.DbRef) - - /** * Method deleteEnd * */ @@ -139,18 +99,6 @@ implements java.io.Serializable } //-- void deleteStart() /** - * Method enumerateDbRef - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateDbRef() - { - return _dbRefList.elements(); - } //-- java.util.Enumeration enumerateDbRef() - - /** * Note: hashCode() has not been overriden * * @param obj @@ -175,13 +123,6 @@ implements java.io.Serializable return false; if (this._has_end != temp._has_end) return false; - if (this._id != null) { - if (temp._id == null) return false; - else if (!(this._id.equals(temp._id))) - return false; - } - else if (temp._id != null) - return false; if (this._sequence != null) { if (temp._sequence == null) return false; else if (!(this._sequence.equals(temp._sequence))) @@ -196,67 +137,12 @@ implements java.io.Serializable } else if (temp._name != null) return false; - if (this._dbRefList != null) { - if (temp._dbRefList == null) return false; - else if (!(this._dbRefList.equals(temp._dbRefList))) - return false; - } - else if (temp._dbRefList != null) - return false; return true; } return false; } //-- boolean equals(java.lang.Object) /** - * Method getDbRef - * - * - * - * @param index - * @return DbRef - */ - public org.vamsas.objects.core.DbRef getDbRef(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _dbRefList.size())) { - throw new IndexOutOfBoundsException("getDbRef: Index value '"+index+"' not in range [0.."+_dbRefList.size()+ "]"); - } - - return (org.vamsas.objects.core.DbRef) _dbRefList.elementAt(index); - } //-- org.vamsas.objects.core.DbRef getDbRef(int) - - /** - * Method getDbRef - * - * - * - * @return DbRef - */ - public org.vamsas.objects.core.DbRef[] getDbRef() - { - int size = _dbRefList.size(); - org.vamsas.objects.core.DbRef[] mArray = new org.vamsas.objects.core.DbRef[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (org.vamsas.objects.core.DbRef) _dbRefList.elementAt(index); - } - return mArray; - } //-- org.vamsas.objects.core.DbRef[] getDbRef() - - /** - * Method getDbRefCount - * - * - * - * @return int - */ - public int getDbRefCount() - { - return _dbRefList.size(); - } //-- int getDbRefCount() - - /** * Returns the value of field 'end'. * * @return int @@ -268,17 +154,6 @@ implements java.io.Serializable } //-- int getEnd() /** - * Returns the value of field 'id'. - * - * @return String - * @return the value of field 'id'. - */ - public java.lang.String getId() - { - return this._id; - } //-- java.lang.String getId() - - /** * Returns the value of field 'name'. * * @return String @@ -382,64 +257,6 @@ implements java.io.Serializable } //-- void marshal(org.xml.sax.ContentHandler) /** - * Method removeAllDbRef - * - */ - public void removeAllDbRef() - { - _dbRefList.removeAllElements(); - } //-- void removeAllDbRef() - - /** - * Method removeDbRef - * - * - * - * @param index - * @return DbRef - */ - public org.vamsas.objects.core.DbRef removeDbRef(int index) - { - java.lang.Object obj = _dbRefList.elementAt(index); - _dbRefList.removeElementAt(index); - return (org.vamsas.objects.core.DbRef) obj; - } //-- org.vamsas.objects.core.DbRef removeDbRef(int) - - /** - * Method setDbRef - * - * - * - * @param index - * @param vDbRef - */ - public void setDbRef(int index, org.vamsas.objects.core.DbRef vDbRef) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _dbRefList.size())) { - throw new IndexOutOfBoundsException("setDbRef: Index value '"+index+"' not in range [0.."+_dbRefList.size()+ "]"); - } - _dbRefList.setElementAt(vDbRef, index); - } //-- void setDbRef(int, org.vamsas.objects.core.DbRef) - - /** - * Method setDbRef - * - * - * - * @param dbRefArray - */ - public void setDbRef(org.vamsas.objects.core.DbRef[] dbRefArray) - { - //-- copy array - _dbRefList.removeAllElements(); - for (int i = 0; i < dbRefArray.length; i++) { - _dbRefList.addElement(dbRefArray[i]); - } - } //-- void setDbRef(org.vamsas.objects.core.DbRef) - - /** * Sets the value of field 'end'. * * @param end the value of field 'end'. @@ -451,16 +268,6 @@ implements java.io.Serializable } //-- void setEnd(int) /** - * Sets the value of field 'id'. - * - * @param id the value of field 'id'. - */ - public void setId(java.lang.String id) - { - this._id = id; - } //-- void setId(java.lang.String) - - /** * Sets the value of field 'name'. * * @param name the value of field 'name'.