autogenerated java classes for current schema
[vamsas.git] / src / org / vamsas / objects / core / Tree.java
index 5bd5c28..4ce66e5 100644 (file)
@@ -38,11 +38,24 @@ implements java.io.Serializable
     //--------------------------/
 
     /**
-     * Field _id
+     * Primary Key for vamsas object referencing
+     *  
      */
     private java.lang.String _id;
 
     /**
+     * objects with modifiable=false will not be
+     *  modified by a vamsas client update
+     *  
+     */
+    private boolean _modifiable = true;
+
+    /**
+     * keeps track of state for field: _modifiable
+     */
+    private boolean _has_modifiable;
+
+    /**
      * Field _title
      */
     private java.lang.String _title;
@@ -53,6 +66,11 @@ implements java.io.Serializable
     private java.util.Vector _newickList;
 
     /**
+     * Field _propertyList
+     */
+    private java.util.Vector _propertyList;
+
+    /**
      * Field _provenance
      */
     private org.vamsas.objects.core.Provenance _provenance;
@@ -66,6 +84,7 @@ implements java.io.Serializable
      {
         super();
         _newickList = new Vector();
+        _propertyList = new Vector();
     } //-- org.vamsas.objects.core.Tree()
 
 
@@ -101,6 +120,42 @@ implements java.io.Serializable
     } //-- void addNewick(int, org.vamsas.objects.core.Newick) 
 
     /**
+     * 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 deleteModifiable
+     * 
+     */
+    public void deleteModifiable()
+    {
+        this._has_modifiable= false;
+    } //-- void deleteModifiable() 
+
+    /**
      * Method enumerateNewick
      * 
      * 
@@ -113,6 +168,18 @@ implements java.io.Serializable
     } //-- java.util.Enumeration enumerateNewick() 
 
     /**
+     * Method enumerateProperty
+     * 
+     * 
+     * 
+     * @return Enumeration
+     */
+    public java.util.Enumeration enumerateProperty()
+    {
+        return _propertyList.elements();
+    } //-- java.util.Enumeration enumerateProperty() 
+
+    /**
      * Note: hashCode() has not been overriden
      * 
      * @param obj
@@ -136,6 +203,10 @@ implements java.io.Serializable
             }
             else if (temp._id != null)
                 return false;
+            if (this._modifiable != temp._modifiable)
+                return false;
+            if (this._has_modifiable != temp._has_modifiable)
+                return false;
             if (this._title != null) {
                 if (temp._title == null) return false;
                 else if (!(this._title.equals(temp._title))) 
@@ -150,6 +221,13 @@ implements java.io.Serializable
             }
             else if (temp._newickList != 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;
             if (this._provenance != null) {
                 if (temp._provenance == null) return false;
                 else if (!(this._provenance.equals(temp._provenance))) 
@@ -163,7 +241,10 @@ implements java.io.Serializable
     } //-- boolean equals(java.lang.Object) 
 
     /**
-     * Returns the value of field 'id'.
+     * Returns the value of field 'id'. The field 'id' has the
+     * following description: Primary Key for vamsas object
+     * referencing
+     *  
      * 
      * @return String
      * @return the value of field 'id'.
@@ -174,6 +255,21 @@ implements java.io.Serializable
     } //-- java.lang.String getId() 
 
     /**
+     * Returns the value of field 'modifiable'. The field
+     * 'modifiable' has the following description: objects with
+     * modifiable=false will not be
+     *  modified by a vamsas client update
+     *  
+     * 
+     * @return boolean
+     * @return the value of field 'modifiable'.
+     */
+    public boolean getModifiable()
+    {
+        return this._modifiable;
+    } //-- boolean getModifiable() 
+
+    /**
      * Method getNewick
      * 
      * 
@@ -222,6 +318,54 @@ implements java.io.Serializable
     } //-- int getNewickCount() 
 
     /**
+     * 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 'provenance'.
      * 
      * @return Provenance
@@ -244,6 +388,18 @@ implements java.io.Serializable
     } //-- java.lang.String getTitle() 
 
     /**
+     * Method hasModifiable
+     * 
+     * 
+     * 
+     * @return boolean
+     */
+    public boolean hasModifiable()
+    {
+        return this._has_modifiable;
+    } //-- boolean hasModifiable() 
+
+    /**
      * Method isValid
      * 
      * 
@@ -299,6 +455,15 @@ implements java.io.Serializable
     } //-- void removeAllNewick() 
 
     /**
+     * Method removeAllProperty
+     * 
+     */
+    public void removeAllProperty()
+    {
+        _propertyList.removeAllElements();
+    } //-- void removeAllProperty() 
+
+    /**
      * Method removeNewick
      * 
      * 
@@ -314,7 +479,25 @@ implements java.io.Serializable
     } //-- org.vamsas.objects.core.Newick removeNewick(int) 
 
     /**
-     * Sets the value of field 'id'.
+     * 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 'id'. The field 'id' has the
+     * following description: Primary Key for vamsas object
+     * referencing
+     *  
      * 
      * @param id the value of field 'id'.
      */
@@ -324,6 +507,21 @@ implements java.io.Serializable
     } //-- void setId(java.lang.String) 
 
     /**
+     * Sets the value of field 'modifiable'. The field 'modifiable'
+     * has the following description: objects with modifiable=false
+     * will not be
+     *  modified by a vamsas client update
+     *  
+     * 
+     * @param modifiable the value of field 'modifiable'.
+     */
+    public void setModifiable(boolean modifiable)
+    {
+        this._modifiable = modifiable;
+        this._has_modifiable = true;
+    } //-- void setModifiable(boolean) 
+
+    /**
      * Method setNewick
      * 
      * 
@@ -358,6 +556,40 @@ implements java.io.Serializable
     } //-- void setNewick(org.vamsas.objects.core.Newick) 
 
     /**
+     * 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 'provenance'.
      * 
      * @param provenance the value of field 'provenance'.