fixed the User element and the form of the ApplicationData dataType.xsd definition.
[vamsas.git] / src / org / vamsas / objects / core / AppData.java
index eef2ff7..a0fb387 100644 (file)
@@ -15,8 +15,6 @@ 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;
@@ -38,14 +36,19 @@ implements java.io.Serializable
     //--------------------------/
 
     /**
-     * Field _appDataChoice
+     * Internal choice value storage
      */
-    private org.vamsas.objects.core.AppDataChoice _appDataChoice;
+    private java.lang.Object _choiceValue;
 
     /**
-     * Field _userList
+     * Field _data
      */
-    private java.util.Vector _userList;
+    private byte[] _data;
+
+    /**
+     * Field _dataReference
+     */
+    private java.lang.String _dataReference;
 
 
       //----------------/
@@ -55,7 +58,6 @@ implements java.io.Serializable
     public AppData() 
      {
         super();
-        _userList = new Vector();
     } //-- org.vamsas.objects.core.AppData()
 
 
@@ -64,45 +66,6 @@ implements java.io.Serializable
     //-----------/
 
     /**
-     * Method addUser
-     * 
-     * 
-     * 
-     * @param vUser
-     */
-    public void addUser(org.vamsas.objects.core.User vUser)
-        throws java.lang.IndexOutOfBoundsException
-    {
-        _userList.addElement(vUser);
-    } //-- void addUser(org.vamsas.objects.core.User) 
-
-    /**
-     * Method addUser
-     * 
-     * 
-     * 
-     * @param index
-     * @param vUser
-     */
-    public void addUser(int index, org.vamsas.objects.core.User vUser)
-        throws java.lang.IndexOutOfBoundsException
-    {
-        _userList.insertElementAt(vUser, index);
-    } //-- void addUser(int, org.vamsas.objects.core.User) 
-
-    /**
-     * Method enumerateUser
-     * 
-     * 
-     * 
-     * @return Enumeration
-     */
-    public java.util.Enumeration enumerateUser()
-    {
-        return _userList.elements();
-    } //-- java.util.Enumeration enumerateUser() 
-
-    /**
      * Note: hashCode() has not been overriden
      * 
      * @param obj
@@ -119,19 +82,26 @@ implements java.io.Serializable
         if (obj instanceof AppData) {
         
             AppData temp = (AppData)obj;
-            if (this._appDataChoice != null) {
-                if (temp._appDataChoice == null) return false;
-                else if (!(this._appDataChoice.equals(temp._appDataChoice))) 
+            if (this._choiceValue != null) {
+                if (temp._choiceValue == null) return false;
+                else if (!(this._choiceValue.equals(temp._choiceValue))) 
                     return false;
             }
-            else if (temp._appDataChoice != null)
+            else if (temp._choiceValue != null)
                 return false;
-            if (this._userList != null) {
-                if (temp._userList == null) return false;
-                else if (!(this._userList.equals(temp._userList))) 
+            if (this._data != null) {
+                if (temp._data == null) return false;
+                else if (!(this._data.equals(temp._data))) 
                     return false;
             }
-            else if (temp._userList != null)
+            else if (temp._data != null)
+                return false;
+            if (this._dataReference != null) {
+                if (temp._dataReference == null) return false;
+                else if (!(this._dataReference.equals(temp._dataReference))) 
+                    return false;
+            }
+            else if (temp._dataReference != null)
                 return false;
             return true;
         }
@@ -139,63 +109,39 @@ implements java.io.Serializable
     } //-- boolean equals(java.lang.Object) 
 
     /**
-     * Returns the value of field 'appDataChoice'.
-     * 
-     * @return AppDataChoice
-     * @return the value of field 'appDataChoice'.
-     */
-    public org.vamsas.objects.core.AppDataChoice getAppDataChoice()
-    {
-        return this._appDataChoice;
-    } //-- org.vamsas.objects.core.AppDataChoice getAppDataChoice() 
-
-    /**
-     * Method getUser
+     * Returns the value of field 'choiceValue'. The field
+     * 'choiceValue' has the following description: Internal choice
+     * value storage
      * 
-     * 
-     * 
-     * @param index
-     * @return User
+     * @return Object
+     * @return the value of field 'choiceValue'.
      */
-    public org.vamsas.objects.core.User getUser(int index)
-        throws java.lang.IndexOutOfBoundsException
+    public java.lang.Object getChoiceValue()
     {
-        //-- check bounds for index
-        if ((index < 0) || (index > _userList.size())) {
-            throw new IndexOutOfBoundsException("getUser: Index value '"+index+"' not in range [0.."+_userList.size()+ "]");
-        }
-        
-        return (org.vamsas.objects.core.User) _userList.elementAt(index);
-    } //-- org.vamsas.objects.core.User getUser(int) 
+        return this._choiceValue;
+    } //-- java.lang.Object getChoiceValue() 
 
     /**
-     * Method getUser
+     * Returns the value of field 'data'.
      * 
-     * 
-     * 
-     * @return User
+     * @return byte
+     * @return the value of field 'data'.
      */
-    public org.vamsas.objects.core.User[] getUser()
+    public byte[] getData()
     {
-        int size = _userList.size();
-        org.vamsas.objects.core.User[] mArray = new org.vamsas.objects.core.User[size];
-        for (int index = 0; index < size; index++) {
-            mArray[index] = (org.vamsas.objects.core.User) _userList.elementAt(index);
-        }
-        return mArray;
-    } //-- org.vamsas.objects.core.User[] getUser() 
+        return this._data;
+    } //-- byte[] getData() 
 
     /**
-     * Method getUserCount
-     * 
+     * Returns the value of field 'dataReference'.
      * 
-     * 
-     * @return int
+     * @return String
+     * @return the value of field 'dataReference'.
      */
-    public int getUserCount()
+    public java.lang.String getDataReference()
     {
-        return _userList.size();
-    } //-- int getUserCount() 
+        return this._dataReference;
+    } //-- java.lang.String getDataReference() 
 
     /**
      * Method isValid
@@ -244,72 +190,26 @@ implements java.io.Serializable
     } //-- void marshal(org.xml.sax.ContentHandler) 
 
     /**
-     * Method removeAllUser
-     * 
-     */
-    public void removeAllUser()
-    {
-        _userList.removeAllElements();
-    } //-- void removeAllUser() 
-
-    /**
-     * Method removeUser
-     * 
-     * 
-     * 
-     * @param index
-     * @return User
-     */
-    public org.vamsas.objects.core.User removeUser(int index)
-    {
-        java.lang.Object obj = _userList.elementAt(index);
-        _userList.removeElementAt(index);
-        return (org.vamsas.objects.core.User) obj;
-    } //-- org.vamsas.objects.core.User removeUser(int) 
-
-    /**
-     * Sets the value of field 'appDataChoice'.
-     * 
-     * @param appDataChoice the value of field 'appDataChoice'.
-     */
-    public void setAppDataChoice(org.vamsas.objects.core.AppDataChoice appDataChoice)
-    {
-        this._appDataChoice = appDataChoice;
-    } //-- void setAppDataChoice(org.vamsas.objects.core.AppDataChoice) 
-
-    /**
-     * Method setUser
-     * 
-     * 
+     * Sets the value of field 'data'.
      * 
-     * @param index
-     * @param vUser
+     * @param data the value of field 'data'.
      */
-    public void setUser(int index, org.vamsas.objects.core.User vUser)
-        throws java.lang.IndexOutOfBoundsException
+    public void setData(byte[] data)
     {
-        //-- check bounds for index
-        if ((index < 0) || (index > _userList.size())) {
-            throw new IndexOutOfBoundsException("setUser: Index value '"+index+"' not in range [0.."+_userList.size()+ "]");
-        }
-        _userList.setElementAt(vUser, index);
-    } //-- void setUser(int, org.vamsas.objects.core.User) 
+        this._data = data;
+        this._choiceValue = data;
+    } //-- void setData(byte) 
 
     /**
-     * Method setUser
-     * 
+     * Sets the value of field 'dataReference'.
      * 
-     * 
-     * @param userArray
+     * @param dataReference the value of field 'dataReference'.
      */
-    public void setUser(org.vamsas.objects.core.User[] userArray)
+    public void setDataReference(java.lang.String dataReference)
     {
-        //-- copy array
-        _userList.removeAllElements();
-        for (int i = 0; i < userArray.length; i++) {
-            _userList.addElement(userArray[i]);
-        }
-    } //-- void setUser(org.vamsas.objects.core.User) 
+        this._dataReference = dataReference;
+        this._choiceValue = dataReference;
+    } //-- void setDataReference(java.lang.String) 
 
     /**
      * Method unmarshal