autogenerated java classes for current schema
[vamsas.git] / src / org / vamsas / objects / core / SequenceType.java
index 59b6058..ecf91db 100644 (file)
@@ -15,6 +15,8 @@ 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;
@@ -65,6 +67,17 @@ implements java.io.Serializable
      */
     private java.lang.String _name;
 
+    /**
+     * Field _description
+     */
+    private java.lang.String _description;
+
+    /**
+     * additional typed properties
+     *  
+     */
+    private java.util.Vector _propertyList;
+
 
       //----------------/
      //- Constructors -/
@@ -73,6 +86,7 @@ implements java.io.Serializable
     public SequenceType() 
      {
         super();
+        _propertyList = new Vector();
     } //-- org.vamsas.objects.core.SequenceType()
 
 
@@ -81,6 +95,33 @@ implements java.io.Serializable
     //-----------/
 
     /**
+     * Method addProperty
+     * 
+     * 
+     * 
+     * @param vProperty
+     */
+    public void addProperty(org.vamsas.objects.core.Property vProperty)
+        throws java.lang.IndexOutOfBoundsException
+    {
+        _propertyList.addElement(vProperty);
+    } //-- void addProperty(org.vamsas.objects.core.Property) 
+
+    /**
+     * Method addProperty
+     * 
+     * 
+     * 
+     * @param index
+     * @param vProperty
+     */
+    public void addProperty(int index, org.vamsas.objects.core.Property vProperty)
+        throws java.lang.IndexOutOfBoundsException
+    {
+        _propertyList.insertElementAt(vProperty, index);
+    } //-- void addProperty(int, org.vamsas.objects.core.Property) 
+
+    /**
      * Method deleteEnd
      * 
      */
@@ -99,6 +140,18 @@ implements java.io.Serializable
     } //-- void deleteStart() 
 
     /**
+     * Method enumerateProperty
+     * 
+     * 
+     * 
+     * @return Enumeration
+     */
+    public java.util.Enumeration enumerateProperty()
+    {
+        return _propertyList.elements();
+    } //-- java.util.Enumeration enumerateProperty() 
+
+    /**
      * Note: hashCode() has not been overriden
      * 
      * @param obj
@@ -137,12 +190,37 @@ implements java.io.Serializable
             }
             else if (temp._name != null)
                 return false;
+            if (this._description != null) {
+                if (temp._description == null) return false;
+                else if (!(this._description.equals(temp._description))) 
+                    return false;
+            }
+            else if (temp._description != null)
+                return false;
+            if (this._propertyList != null) {
+                if (temp._propertyList == null) return false;
+                else if (!(this._propertyList.equals(temp._propertyList))) 
+                    return false;
+            }
+            else if (temp._propertyList != null)
+                return false;
             return true;
         }
         return false;
     } //-- boolean equals(java.lang.Object) 
 
     /**
+     * Returns the value of field 'description'.
+     * 
+     * @return String
+     * @return the value of field 'description'.
+     */
+    public java.lang.String getDescription()
+    {
+        return this._description;
+    } //-- java.lang.String getDescription() 
+
+    /**
      * Returns the value of field 'end'.
      * 
      * @return int
@@ -165,6 +243,54 @@ implements java.io.Serializable
     } //-- java.lang.String getName() 
 
     /**
+     * Method getProperty
+     * 
+     * 
+     * 
+     * @param index
+     * @return Property
+     */
+    public org.vamsas.objects.core.Property getProperty(int index)
+        throws java.lang.IndexOutOfBoundsException
+    {
+        //-- check bounds for index
+        if ((index < 0) || (index > _propertyList.size())) {
+            throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");
+        }
+        
+        return (org.vamsas.objects.core.Property) _propertyList.elementAt(index);
+    } //-- org.vamsas.objects.core.Property getProperty(int) 
+
+    /**
+     * Method getProperty
+     * 
+     * 
+     * 
+     * @return Property
+     */
+    public org.vamsas.objects.core.Property[] getProperty()
+    {
+        int size = _propertyList.size();
+        org.vamsas.objects.core.Property[] mArray = new org.vamsas.objects.core.Property[size];
+        for (int index = 0; index < size; index++) {
+            mArray[index] = (org.vamsas.objects.core.Property) _propertyList.elementAt(index);
+        }
+        return mArray;
+    } //-- org.vamsas.objects.core.Property[] getProperty() 
+
+    /**
+     * Method getPropertyCount
+     * 
+     * 
+     * 
+     * @return int
+     */
+    public int getPropertyCount()
+    {
+        return _propertyList.size();
+    } //-- int getPropertyCount() 
+
+    /**
      * Returns the value of field 'sequence'.
      * 
      * @return String
@@ -257,6 +383,40 @@ implements java.io.Serializable
     } //-- void marshal(org.xml.sax.ContentHandler) 
 
     /**
+     * Method removeAllProperty
+     * 
+     */
+    public void removeAllProperty()
+    {
+        _propertyList.removeAllElements();
+    } //-- void removeAllProperty() 
+
+    /**
+     * Method removeProperty
+     * 
+     * 
+     * 
+     * @param index
+     * @return Property
+     */
+    public org.vamsas.objects.core.Property removeProperty(int index)
+    {
+        java.lang.Object obj = _propertyList.elementAt(index);
+        _propertyList.removeElementAt(index);
+        return (org.vamsas.objects.core.Property) obj;
+    } //-- org.vamsas.objects.core.Property removeProperty(int) 
+
+    /**
+     * Sets the value of field 'description'.
+     * 
+     * @param description the value of field 'description'.
+     */
+    public void setDescription(java.lang.String description)
+    {
+        this._description = description;
+    } //-- void setDescription(java.lang.String) 
+
+    /**
      * Sets the value of field 'end'.
      * 
      * @param end the value of field 'end'.
@@ -278,6 +438,40 @@ implements java.io.Serializable
     } //-- void setName(java.lang.String) 
 
     /**
+     * Method setProperty
+     * 
+     * 
+     * 
+     * @param index
+     * @param vProperty
+     */
+    public void setProperty(int index, org.vamsas.objects.core.Property vProperty)
+        throws java.lang.IndexOutOfBoundsException
+    {
+        //-- check bounds for index
+        if ((index < 0) || (index > _propertyList.size())) {
+            throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");
+        }
+        _propertyList.setElementAt(vProperty, index);
+    } //-- void setProperty(int, org.vamsas.objects.core.Property) 
+
+    /**
+     * Method setProperty
+     * 
+     * 
+     * 
+     * @param propertyArray
+     */
+    public void setProperty(org.vamsas.objects.core.Property[] propertyArray)
+    {
+        //-- copy array
+        _propertyList.removeAllElements();
+        for (int i = 0; i < propertyArray.length; i++) {
+            _propertyList.addElement(propertyArray[i]);
+        }
+    } //-- void setProperty(org.vamsas.objects.core.Property) 
+
+    /**
      * Sets the value of field 'sequence'.
      * 
      * @param sequence the value of field 'sequence'.