//--------------------------/
/**
- * 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;
private java.util.Vector _newickList;
/**
+ * Field _propertyList
+ */
+ private java.util.Vector _propertyList;
+
+ /**
* Field _provenance
*/
private org.vamsas.objects.core.Provenance _provenance;
{
super();
_newickList = new Vector();
+ _propertyList = new Vector();
} //-- org.vamsas.objects.core.Tree()
} //-- 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
*
*
} //-- 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
}
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)))
}
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)))
} //-- 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'.
} //-- 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
*
*
} //-- 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
} //-- java.lang.String getTitle()
/**
+ * Method hasModifiable
+ *
+ *
+ *
+ * @return boolean
+ */
+ public boolean hasModifiable()
+ {
+ return this._has_modifiable;
+ } //-- boolean hasModifiable()
+
+ /**
* Method isValid
*
*
} //-- void removeAllNewick()
/**
+ * Method removeAllProperty
+ *
+ */
+ public void removeAllProperty()
+ {
+ _propertyList.removeAllElements();
+ } //-- void removeAllProperty()
+
+ /**
* Method removeNewick
*
*
} //-- 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'.
*/
} //-- 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
*
*
} //-- 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'.