autogenerated java classes for current schema
[vamsas.git] / src / org / vamsas / objects / core / VamsasDocument.java
index cbf50ba..fd4eef1 100644 (file)
@@ -53,7 +53,9 @@ implements java.io.Serializable
     private Provenance _provenance;
 
     /**
-     * Field _VAMSASList
+     * contains unassociated trees and a number of analysis
+     *  sets
+     *  
      */
     private java.util.Vector _VAMSASList;
 
@@ -62,6 +64,11 @@ implements java.io.Serializable
      */
     private java.util.Vector _applicationDataList;
 
+    /**
+     * Field _attachmentList
+     */
+    private java.util.Vector _attachmentList;
+
 
       //----------------/
      //- Constructors -/
@@ -72,6 +79,7 @@ implements java.io.Serializable
         super();
         _VAMSASList = new Vector();
         _applicationDataList = new Vector();
+        _attachmentList = new Vector();
     } //-- org.vamsas.objects.core.VamsasDocument()
 
 
@@ -107,6 +115,33 @@ implements java.io.Serializable
     } //-- 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
      * 
      * 
@@ -146,6 +181,18 @@ implements java.io.Serializable
     } //-- java.util.Enumeration enumerateApplicationData() 
 
     /**
+     * Method enumerateAttachment
+     * 
+     * 
+     * 
+     * @return Enumeration
+     */
+    public java.util.Enumeration enumerateAttachment()
+    {
+        return _attachmentList.elements();
+    } //-- java.util.Enumeration enumerateAttachment() 
+
+    /**
      * Method enumerateVAMSAS
      * 
      * 
@@ -209,6 +256,13 @@ implements java.io.Serializable
             }
             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;
@@ -263,6 +317,54 @@ implements java.io.Serializable
     } //-- 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
@@ -401,6 +503,15 @@ implements java.io.Serializable
     } //-- void removeAllApplicationData() 
 
     /**
+     * Method removeAllAttachment
+     * 
+     */
+    public void removeAllAttachment()
+    {
+        _attachmentList.removeAllElements();
+    } //-- void removeAllAttachment() 
+
+    /**
      * Method removeAllVAMSAS
      * 
      */
@@ -425,6 +536,21 @@ implements java.io.Serializable
     } //-- 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
      * 
      * 
@@ -474,6 +600,40 @@ implements java.io.Serializable
     } //-- 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'.