removed old Mapping object dependency
[vamsas.git] / src / uk / ac / vamsas / objects / core / SequenceType.java
index 4c057a4..6b25c6f 100644 (file)
@@ -68,11 +68,6 @@ implements java.io.Serializable
      */
     private java.util.Vector _propertyList;
 
-    /**
-     * Field _mappingList.
-     */
-    private java.util.Vector _mappingList;
-
 
       //----------------/
      //- Constructors -/
@@ -81,7 +76,6 @@ implements java.io.Serializable
     public SequenceType() {
         super();
         this._propertyList = new java.util.Vector();
-        this._mappingList = new java.util.Vector();
     }
 
 
@@ -92,34 +86,6 @@ implements java.io.Serializable
     /**
      * 
      * 
-     * @param vMapping
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     */
-    public void addMapping(
-            final uk.ac.vamsas.objects.core.Mapping vMapping)
-    throws java.lang.IndexOutOfBoundsException {
-        this._mappingList.addElement(vMapping);
-    }
-
-    /**
-     * 
-     * 
-     * @param index
-     * @param vMapping
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     */
-    public void addMapping(
-            final int index,
-            final uk.ac.vamsas.objects.core.Mapping vMapping)
-    throws java.lang.IndexOutOfBoundsException {
-        this._mappingList.add(index, vMapping);
-    }
-
-    /**
-     * 
-     * 
      * @param vProperty
      * @throws java.lang.IndexOutOfBoundsException if the index
      * given is outside the bounds of the collection
@@ -160,17 +126,6 @@ implements java.io.Serializable
     }
 
     /**
-     * Method enumerateMapping.
-     * 
-     * @return an Enumeration over all
-     * uk.ac.vamsas.objects.core.Mapping elements
-     */
-    public java.util.Enumeration enumerateMapping(
-    ) {
-        return this._mappingList.elements();
-    }
-
-    /**
      * Method enumerateProperty.
      * 
      * @return an Enumeration over all
@@ -234,13 +189,6 @@ implements java.io.Serializable
             }
             else if (temp._propertyList != null)
                 return false;
-            if (this._mappingList != null) {
-                if (temp._mappingList == null) return false;
-                else if (!(this._mappingList.equals(temp._mappingList))) 
-                    return false;
-            }
-            else if (temp._mappingList != null)
-                return false;
             return true;
         }
         return false;
@@ -267,63 +215,6 @@ implements java.io.Serializable
     }
 
     /**
-     * Method getMapping.
-     * 
-     * @param index
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     * @return the value of the uk.ac.vamsas.objects.core.Mapping
-     * at the given index
-     */
-    public uk.ac.vamsas.objects.core.Mapping getMapping(
-            final int index)
-    throws java.lang.IndexOutOfBoundsException {
-        // check bounds for index
-        if (index < 0 || index >= this._mappingList.size()) {
-            throw new IndexOutOfBoundsException("getMapping: Index value '" + index + "' not in range [0.." + (this._mappingList.size() - 1) + "]");
-        }
-        
-        return (uk.ac.vamsas.objects.core.Mapping) _mappingList.get(index);
-    }
-
-    /**
-     * Method getMapping.Returns the contents of the collection in
-     * an Array.  <p>Note:  Just in case the collection contents
-     * are changing in another thread, we pass a 0-length Array of
-     * the correct type into the API call.  This way we <i>know</i>
-     * that the Array returned is of exactly the correct length.
-     * 
-     * @return this collection as an Array
-     */
-    public uk.ac.vamsas.objects.core.Mapping[] getMapping(
-    ) {
-        uk.ac.vamsas.objects.core.Mapping[] array = new uk.ac.vamsas.objects.core.Mapping[0];
-        return (uk.ac.vamsas.objects.core.Mapping[]) this._mappingList.toArray(array);
-    }
-
-    /**
-     * Method getMappingAsReference.Returns a reference to
-     * '_mappingList'. No type checking is performed on any
-     * modifications to the Vector.
-     * 
-     * @return a reference to the Vector backing this class
-     */
-    public java.util.Vector getMappingAsReference(
-    ) {
-        return this._mappingList;
-    }
-
-    /**
-     * Method getMappingCount.
-     * 
-     * @return the size of this collection
-     */
-    public int getMappingCount(
-    ) {
-        return this._mappingList.size();
-    }
-
-    /**
      * Returns the value of field 'name'.
      * 
      * @return the value of field 'Name'.
@@ -457,9 +348,6 @@ implements java.io.Serializable
         if (_propertyList != null) {
            result = 37 * result + _propertyList.hashCode();
         }
-        if (_mappingList != null) {
-           result = 37 * result + _mappingList.hashCode();
-        }
         
         return result;
     }
@@ -513,43 +401,12 @@ implements java.io.Serializable
 
     /**
      */
-    public void removeAllMapping(
-    ) {
-        this._mappingList.clear();
-    }
-
-    /**
-     */
     public void removeAllProperty(
     ) {
         this._propertyList.clear();
     }
 
     /**
-     * Method removeMapping.
-     * 
-     * @param vMapping
-     * @return true if the object was removed from the collection.
-     */
-    public boolean removeMapping(
-            final uk.ac.vamsas.objects.core.Mapping vMapping) {
-        boolean removed = _mappingList.remove(vMapping);
-        return removed;
-    }
-
-    /**
-     * Method removeMappingAt.
-     * 
-     * @param index
-     * @return the element removed from the collection
-     */
-    public uk.ac.vamsas.objects.core.Mapping removeMappingAt(
-            final int index) {
-        java.lang.Object obj = this._mappingList.remove(index);
-        return (uk.ac.vamsas.objects.core.Mapping) obj;
-    }
-
-    /**
      * Method removeProperty.
      * 
      * @param vProperty
@@ -595,67 +452,6 @@ implements java.io.Serializable
     }
 
     /**
-     * 
-     * 
-     * @param index
-     * @param vMapping
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     */
-    public void setMapping(
-            final int index,
-            final uk.ac.vamsas.objects.core.Mapping vMapping)
-    throws java.lang.IndexOutOfBoundsException {
-        // check bounds for index
-        if (index < 0 || index >= this._mappingList.size()) {
-            throw new IndexOutOfBoundsException("setMapping: Index value '" + index + "' not in range [0.." + (this._mappingList.size() - 1) + "]");
-        }
-        
-        this._mappingList.set(index, vMapping);
-    }
-
-    /**
-     * 
-     * 
-     * @param vMappingArray
-     */
-    public void setMapping(
-            final uk.ac.vamsas.objects.core.Mapping[] vMappingArray) {
-        //-- copy array
-        _mappingList.clear();
-        
-        for (int i = 0; i < vMappingArray.length; i++) {
-                this._mappingList.add(vMappingArray[i]);
-        }
-    }
-
-    /**
-     * Sets the value of '_mappingList' by copying the given
-     * Vector. All elements will be checked for type safety.
-     * 
-     * @param vMappingList the Vector to copy.
-     */
-    public void setMapping(
-            final java.util.Vector vMappingList) {
-        // copy vector
-        this._mappingList.clear();
-        
-        this._mappingList.addAll(vMappingList);
-    }
-
-    /**
-     * Sets the value of '_mappingList' by setting it to the given
-     * Vector. No type checking is performed.
-     * @deprecated
-     * 
-     * @param mappingVector the Vector to set.
-     */
-    public void setMappingAsReference(
-            final java.util.Vector mappingVector) {
-        this._mappingList = mappingVector;
-    }
-
-    /**
      * Sets the value of field 'name'.
      * 
      * @param name the value of field 'name'.