private Provenance _provenance;
/**
- * Field _VAMSASList
+ * contains unassociated trees and a number of analysis
+ * sets
+ *
*/
private java.util.Vector _VAMSASList;
*/
private java.util.Vector _applicationDataList;
+ /**
+ * Field _attachmentList
+ */
+ private java.util.Vector _attachmentList;
+
//----------------/
//- Constructors -/
super();
_VAMSASList = new Vector();
_applicationDataList = new Vector();
+ _attachmentList = new Vector();
} //-- org.vamsas.objects.core.VamsasDocument()
} //-- void addApplicationData(int, ApplicationData)
/**
+ * Method addAttachment
+ *
+ *
+ *
+ * @param vAttachment
+ */
+ public void addAttachment(Attachment vAttachment)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ _attachmentList.addElement(vAttachment);
+ } //-- void addAttachment(Attachment)
+
+ /**
+ * Method addAttachment
+ *
+ *
+ *
+ * @param index
+ * @param vAttachment
+ */
+ public void addAttachment(int index, Attachment vAttachment)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ _attachmentList.insertElementAt(vAttachment, index);
+ } //-- void addAttachment(int, Attachment)
+
+ /**
* Method addVAMSAS
*
*
} //-- java.util.Enumeration enumerateApplicationData()
/**
+ * Method enumerateAttachment
+ *
+ *
+ *
+ * @return Enumeration
+ */
+ public java.util.Enumeration enumerateAttachment()
+ {
+ return _attachmentList.elements();
+ } //-- java.util.Enumeration enumerateAttachment()
+
+ /**
* Method enumerateVAMSAS
*
*
}
else if (temp._applicationDataList != null)
return false;
+ if (this._attachmentList != null) {
+ if (temp._attachmentList == null) return false;
+ else if (!(this._attachmentList.equals(temp._attachmentList)))
+ return false;
+ }
+ else if (temp._attachmentList != null)
+ return false;
return true;
}
return false;
} //-- int getApplicationDataCount()
/**
+ * Method getAttachment
+ *
+ *
+ *
+ * @param index
+ * @return Attachment
+ */
+ public Attachment getAttachment(int index)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ //-- check bounds for index
+ if ((index < 0) || (index > _attachmentList.size())) {
+ throw new IndexOutOfBoundsException("getAttachment: Index value '"+index+"' not in range [0.."+_attachmentList.size()+ "]");
+ }
+
+ return (Attachment) _attachmentList.elementAt(index);
+ } //-- Attachment getAttachment(int)
+
+ /**
+ * Method getAttachment
+ *
+ *
+ *
+ * @return Attachment
+ */
+ public Attachment[] getAttachment()
+ {
+ int size = _attachmentList.size();
+ Attachment[] mArray = new Attachment[size];
+ for (int index = 0; index < size; index++) {
+ mArray[index] = (Attachment) _attachmentList.elementAt(index);
+ }
+ return mArray;
+ } //-- Attachment[] getAttachment()
+
+ /**
+ * Method getAttachmentCount
+ *
+ *
+ *
+ * @return int
+ */
+ public int getAttachmentCount()
+ {
+ return _attachmentList.size();
+ } //-- int getAttachmentCount()
+
+ /**
* Returns the value of field 'lockFile'.
*
* @return LockFile
} //-- void removeAllApplicationData()
/**
+ * Method removeAllAttachment
+ *
+ */
+ public void removeAllAttachment()
+ {
+ _attachmentList.removeAllElements();
+ } //-- void removeAllAttachment()
+
+ /**
* Method removeAllVAMSAS
*
*/
} //-- ApplicationData removeApplicationData(int)
/**
+ * Method removeAttachment
+ *
+ *
+ *
+ * @param index
+ * @return Attachment
+ */
+ public Attachment removeAttachment(int index)
+ {
+ java.lang.Object obj = _attachmentList.elementAt(index);
+ _attachmentList.removeElementAt(index);
+ return (Attachment) obj;
+ } //-- Attachment removeAttachment(int)
+
+ /**
* Method removeVAMSAS
*
*
} //-- void setApplicationData(ApplicationData)
/**
+ * Method setAttachment
+ *
+ *
+ *
+ * @param index
+ * @param vAttachment
+ */
+ public void setAttachment(int index, Attachment vAttachment)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ //-- check bounds for index
+ if ((index < 0) || (index > _attachmentList.size())) {
+ throw new IndexOutOfBoundsException("setAttachment: Index value '"+index+"' not in range [0.."+_attachmentList.size()+ "]");
+ }
+ _attachmentList.setElementAt(vAttachment, index);
+ } //-- void setAttachment(int, Attachment)
+
+ /**
+ * Method setAttachment
+ *
+ *
+ *
+ * @param attachmentArray
+ */
+ public void setAttachment(Attachment[] attachmentArray)
+ {
+ //-- copy array
+ _attachmentList.removeAllElements();
+ for (int i = 0; i < attachmentArray.length; i++) {
+ _attachmentList.addElement(attachmentArray[i]);
+ }
+ } //-- void setAttachment(Attachment)
+
+ /**
* Sets the value of field 'lockFile'.
*
* @param lockFile the value of field 'lockFile'.