*/
package org.vamsas.client;
+import java.io.Serializable;
+
/**
* Uniquely describes a vamsas client application.
* @author jimp
*/
-public class ClientHandle {
+public class ClientHandle implements Serializable {
+ static final long serialVersionUID = 0;
/**
* @param clientName
* @param version
*/
public static final String DOCUMENT_UPDATE="org.vamsas.client.events.documentUpdateEvent";
/**
- * Generated when a new vamsas document is created
- * so an application may do its own data space initialization
+ * Generated when a new vamsas document is created (perhaps from some existing Vamsas data)
+ * so an application may do its own data space initialization.
+ * TODO: decide if this is called when an app is connected to a stored session...
*/
public static final String DOCUMENT_CREATE="org.vamsas.client.events.documentCreateEvent";
/**
*/
public static final String CLIENT_CREATION="org.vamsas.client.events.clientCreateEvent";
/**
- * Generated when a vamsas client leaves a session (Handle is passed).
+ * Generated when a vamsas client leaves a session (Handle is passed to all others).
*/
public static final String CLIENT_FINALIZATION="org.vamsas.client.events.clientFinalizationEvent";
/**
SessionHandle session = null;
ClientHandle client = null;
-
+
/*
* (non-Javadoc)
*
* @see org.vamsas.client.IClient#finalizeClient()
*/
public void finalizeClient() {
- // TODO: raise events
+ // TODO: determine if this is last client in session
+ // TODO: raise events like : ((lst_client && document.request.to.close), (client_finalization), (
+
+ // if (handlers.containsKey(Events.))
+ // if (handlers.containsKey(Events.CLIENT_FINALIZATION))
// deregister listeners.
// mark this instance as finalized
}
*/
protected void setInstanceIdField() {
if (registerable) {
- if (vorbaId!=null)
+ if (vorbaId != null)
try {
java.lang.reflect.Field fd = this.getClass().getField("id");
fd.set((Object) this, (Object) new String(vorbaId.id));
} catch (IllegalAccessException e) {
- System.err.println("SourceGeneration of "+this.getClass().toString()
- +"\n has resulted in an inaccessible 'id' field!\nCannot set ID from the vorbaId object.")
- e.printStackTrace(System.err);
- }
- catch (SecurityException e) {
+ System.err
+ .println("SourceGeneration of "
+ + this.getClass().toString()
+ + "\n has resulted in an inaccessible 'id' field!\nCannot set ID from the vorbaId object.");
+ e.printStackTrace(System.err);
+ } catch (SecurityException e) {
e.printStackTrace(System.err);
} catch (NoSuchFieldException e) {
this.setRegisterable(false);
}
} else {
System.err.println("Client error. Trying to setInstanceIdField on a "
- +this.getClass().toString()+" (which cannot be given a vorbaId)");
+ + this.getClass().toString() + " (which cannot be given a vorbaId)");
}
}
+
/**
* calculate a hash for the object with all housekeeping fields at standard
* values. (isRegisterable is an immutable attribute property)
}
/**
+ * TODO: combine two versions of the same collection object to resolve
+ * asynchronous updates to the same vamsas object Merges two vamsas objects,
+ * one of which is a later version of the earlier (ie they have the same
+ * vorbaId but one is a later version recently read from the vamsasDocument
+ * collection.
+ *
+ * @return
+ */
+ protected boolean merge(object laterCopy) {
+ return true;
+ }
+
+ /**
*
* @return true if object is registered
*/
--- /dev/null
+package org.vamsas.client.simpleclient;
+import org.vamsas.client.*;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutput;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+import java.util.Vector;
+
+/**
+ * @author jim
+ * Handler for the clientsFile within a vamsas session.
+ */
+public class ClientsFile {
+ private File filelist;
+ /**
+ * number of my client in list
+ * (not known at start but used when known to make lock)
+ */
+ private int syncnum=1;
+
+ ClientsFile(File filelist) {
+ this.filelist=filelist;
+ }
+ public ClientHandle[] retrieveClientList() {
+ if (filelist!=null) {
+ if (filelist.exists()) {
+ Lock listlock;
+ do {
+ listlock = new Lock(filelist); // TODO: wait around if we can't get the lock.
+ } while (!listlock.isLocked());
+ try {
+ ObjectInputStream is = new ObjectInputStream(new BufferedInputStream(new java.io.FileInputStream(filelist)));
+ ClientHandle[] clients;
+ clients = (ClientHandle[]) ((Vector) is.readObject()).toArray();
+ return clients;
+ }
+ catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ // else return null.
+ } else {
+ throw new Error("Tried to retrieve a clientList without specifying client list filename");
+ }
+ return null;
+
+ }
+ public boolean putClientList(ClientHandle[] clients) {
+ if (filelist!=null) {
+ if (filelist.exists()) {
+ Lock listlock;
+ do {
+ listlock = new Lock(filelist); // TODO: wait around if we can't get the lock? should return and make client wait until write has finished so it can read new client info...
+ } while (!listlock.isLocked());
+ try {
+ File templist=File.createTempFile(filelist.getName(),".temp",filelist);
+ ObjectOutputStream os = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(templist)));
+ os.writeObject(clients);
+ os.close();
+ }
+ catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ // else return null.
+ } else {
+ throw new Error("Tried to retrieve a clientList without specifying client list filename");
+ }
+ return false;
+ }
+}
--- /dev/null
+/**
+ *
+ */
+package org.vamsas.client.simpleclient;
+
+import java.io.File;
+
+/**
+ * @author jim
+ * Watches a particular file for its creation, deletion, or modification.
+ */
+public class FileWatcher {
+ private File subject=null;
+ private long lastStat;
+ boolean exists=false;
+ /**
+ * Make a watcher for a particular file.
+ * If the file doesn't exist, the watcher will watch
+ * for its creation (and indicate a change of state)
+ * @param subject
+ */
+ private boolean check() {
+ if (subject!=null) {
+ if (!subject.exists()) {
+ if (exists) {
+ exists=false;
+ return true;
+ }
+ return false;
+ } else {
+ long newStat=subject.lastModified();
+ if (exists && lastStat==newStat) {
+ return false;
+ }
+ lastStat=newStat;
+ exists=true;
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ public FileWatcher(File subject) {
+ // TODO Auto-generated constructor stub
+ this.subject = subject;
+ check();
+ }
+ public boolean hasChanged() {
+ return check();
+ }
+}
*/
public class documentHandler {
/**
+ * Vamsas client is intialised with a path to create live session directories.
+ * This path may contain a vamsas.properties file
+ * that sets additional parameters (otherwise client
+ * just uses the one on the classpath).
+ *
+ * A vamsas session consists of :
+ * SessionDir - translates to urn of a live session.
+ * Contains: Vamsas Document (as a jar), Session client list file,
+ * both of which may be locked, and additional
+ * temporary versions of these files when write
+ * operations are taking place.
+ *
* Zip file entries
* - vamsasdocument.xml : core info
* one or more:
* - <applicationname>.version.sessionnumber.raw (string given in vamsasdocument.xml applicationData entry)
+ *
* Lockfile
* - filename given in the vamsasdocument.xml. Should be checked for validity by any client and rewritten if necessary.
* The lockfile can point to the jar itself.
private java.lang.String _id;
/**
- * Field _alignmentAnnotations
+ * Field _alignmentAnnotationsList
*/
- private org.vamsas.objects.core.AlignmentAnnotations _alignmentAnnotations;
+ private java.util.Vector _alignmentAnnotationsList;
/**
* Field _treeList
public Alignment()
{
super();
+ _alignmentAnnotationsList = new Vector();
_treeList = new Vector();
_alignmentSequenceList = new Vector();
} //-- org.vamsas.objects.core.Alignment()
//-----------/
/**
+ * Method addAlignmentAnnotations
+ *
+ *
+ *
+ * @param vAlignmentAnnotations
+ */
+ public void addAlignmentAnnotations(org.vamsas.objects.core.AlignmentAnnotations vAlignmentAnnotations)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ _alignmentAnnotationsList.addElement(vAlignmentAnnotations);
+ } //-- void addAlignmentAnnotations(org.vamsas.objects.core.AlignmentAnnotations)
+
+ /**
+ * Method addAlignmentAnnotations
+ *
+ *
+ *
+ * @param index
+ * @param vAlignmentAnnotations
+ */
+ public void addAlignmentAnnotations(int index, org.vamsas.objects.core.AlignmentAnnotations vAlignmentAnnotations)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ _alignmentAnnotationsList.insertElementAt(vAlignmentAnnotations, index);
+ } //-- void addAlignmentAnnotations(int, org.vamsas.objects.core.AlignmentAnnotations)
+
+ /**
* Method addAlignmentSequence
*
*
} //-- void deleteAligned()
/**
+ * Method enumerateAlignmentAnnotations
+ *
+ *
+ *
+ * @return Enumeration
+ */
+ public java.util.Enumeration enumerateAlignmentAnnotations()
+ {
+ return _alignmentAnnotationsList.elements();
+ } //-- java.util.Enumeration enumerateAlignmentAnnotations()
+
+ /**
* Method enumerateAlignmentSequence
*
*
}
else if (temp._id != null)
return false;
- if (this._alignmentAnnotations != null) {
- if (temp._alignmentAnnotations == null) return false;
- else if (!(this._alignmentAnnotations.equals(temp._alignmentAnnotations)))
+ if (this._alignmentAnnotationsList != null) {
+ if (temp._alignmentAnnotationsList == null) return false;
+ else if (!(this._alignmentAnnotationsList.equals(temp._alignmentAnnotationsList)))
return false;
}
- else if (temp._alignmentAnnotations != null)
+ else if (temp._alignmentAnnotationsList != null)
return false;
if (this._treeList != null) {
if (temp._treeList == null) return false;
} //-- boolean getAligned()
/**
- * Returns the value of field 'alignmentAnnotations'.
+ * Method getAlignmentAnnotations
+ *
+ *
+ *
+ * @param index
+ * @return AlignmentAnnotations
+ */
+ public org.vamsas.objects.core.AlignmentAnnotations getAlignmentAnnotations(int index)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ //-- check bounds for index
+ if ((index < 0) || (index > _alignmentAnnotationsList.size())) {
+ throw new IndexOutOfBoundsException("getAlignmentAnnotations: Index value '"+index+"' not in range [0.."+_alignmentAnnotationsList.size()+ "]");
+ }
+
+ return (org.vamsas.objects.core.AlignmentAnnotations) _alignmentAnnotationsList.elementAt(index);
+ } //-- org.vamsas.objects.core.AlignmentAnnotations getAlignmentAnnotations(int)
+
+ /**
+ * Method getAlignmentAnnotations
+ *
+ *
*
* @return AlignmentAnnotations
- * @return the value of field 'alignmentAnnotations'.
*/
- public org.vamsas.objects.core.AlignmentAnnotations getAlignmentAnnotations()
+ public org.vamsas.objects.core.AlignmentAnnotations[] getAlignmentAnnotations()
{
- return this._alignmentAnnotations;
- } //-- org.vamsas.objects.core.AlignmentAnnotations getAlignmentAnnotations()
+ int size = _alignmentAnnotationsList.size();
+ org.vamsas.objects.core.AlignmentAnnotations[] mArray = new org.vamsas.objects.core.AlignmentAnnotations[size];
+ for (int index = 0; index < size; index++) {
+ mArray[index] = (org.vamsas.objects.core.AlignmentAnnotations) _alignmentAnnotationsList.elementAt(index);
+ }
+ return mArray;
+ } //-- org.vamsas.objects.core.AlignmentAnnotations[] getAlignmentAnnotations()
+
+ /**
+ * Method getAlignmentAnnotationsCount
+ *
+ *
+ *
+ * @return int
+ */
+ public int getAlignmentAnnotationsCount()
+ {
+ return _alignmentAnnotationsList.size();
+ } //-- int getAlignmentAnnotationsCount()
/**
* Method getAlignmentSequence
} //-- void marshal(org.xml.sax.ContentHandler)
/**
+ * Method removeAlignmentAnnotations
+ *
+ *
+ *
+ * @param index
+ * @return AlignmentAnnotations
+ */
+ public org.vamsas.objects.core.AlignmentAnnotations removeAlignmentAnnotations(int index)
+ {
+ java.lang.Object obj = _alignmentAnnotationsList.elementAt(index);
+ _alignmentAnnotationsList.removeElementAt(index);
+ return (org.vamsas.objects.core.AlignmentAnnotations) obj;
+ } //-- org.vamsas.objects.core.AlignmentAnnotations removeAlignmentAnnotations(int)
+
+ /**
* Method removeAlignmentSequence
*
*
} //-- org.vamsas.objects.core.AlignmentSequence removeAlignmentSequence(int)
/**
+ * Method removeAllAlignmentAnnotations
+ *
+ */
+ public void removeAllAlignmentAnnotations()
+ {
+ _alignmentAnnotationsList.removeAllElements();
+ } //-- void removeAllAlignmentAnnotations()
+
+ /**
* Method removeAllAlignmentSequence
*
*/
} //-- void setAligned(boolean)
/**
- * Sets the value of field 'alignmentAnnotations'.
+ * Method setAlignmentAnnotations
+ *
+ *
+ *
+ * @param index
+ * @param vAlignmentAnnotations
+ */
+ public void setAlignmentAnnotations(int index, org.vamsas.objects.core.AlignmentAnnotations vAlignmentAnnotations)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ //-- check bounds for index
+ if ((index < 0) || (index > _alignmentAnnotationsList.size())) {
+ throw new IndexOutOfBoundsException("setAlignmentAnnotations: Index value '"+index+"' not in range [0.."+_alignmentAnnotationsList.size()+ "]");
+ }
+ _alignmentAnnotationsList.setElementAt(vAlignmentAnnotations, index);
+ } //-- void setAlignmentAnnotations(int, org.vamsas.objects.core.AlignmentAnnotations)
+
+ /**
+ * Method setAlignmentAnnotations
+ *
+ *
*
- * @param alignmentAnnotations the value of field
- * 'alignmentAnnotations'.
+ * @param alignmentAnnotationsArray
*/
- public void setAlignmentAnnotations(org.vamsas.objects.core.AlignmentAnnotations alignmentAnnotations)
+ public void setAlignmentAnnotations(org.vamsas.objects.core.AlignmentAnnotations[] alignmentAnnotationsArray)
{
- this._alignmentAnnotations = alignmentAnnotations;
+ //-- copy array
+ _alignmentAnnotationsList.removeAllElements();
+ for (int i = 0; i < alignmentAnnotationsArray.length; i++) {
+ _alignmentAnnotationsList.addElement(alignmentAnnotationsArray[i]);
+ }
} //-- void setAlignmentAnnotations(org.vamsas.objects.core.AlignmentAnnotations)
/**
desc.setValidator(fieldValidator);
//-- initialize element descriptors
- //-- _alignmentAnnotations
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.AlignmentAnnotations.class, "_alignmentAnnotations", "AlignmentAnnotations", org.exolab.castor.xml.NodeType.Element);
+ //-- _alignmentAnnotationsList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.AlignmentAnnotations.class, "_alignmentAnnotationsList", "AlignmentAnnotations", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
try {
Alignment target = (Alignment) object;
- target.setAlignmentAnnotations( (org.vamsas.objects.core.AlignmentAnnotations) value);
+ target.addAlignmentAnnotations( (org.vamsas.objects.core.AlignmentAnnotations) value);
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
};
desc.setHandler(handler);
desc.setNameSpaceURI("http://www.vamsas.org");
- desc.setMultivalued(false);
+ desc.setMultivalued(true);
addFieldDescriptor(desc);
- //-- validation code for: _alignmentAnnotations
+ //-- validation code for: _alignmentAnnotationsList
fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
{ //-- local scope
}
desc.setValidator(fieldValidator);
//-- validation code for: _alignmentSequenceList
fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(2);
+ fieldValidator.setMinOccurs(1);
{ //-- local scope
}
desc.setValidator(fieldValidator);
private java.util.Vector _treeList;
/**
- * Field _provenanceList
+ * Field _provenance
*/
- private java.util.Vector _provenanceList;
+ private org.vamsas.objects.core.Provenance _provenance;
//----------------/
_dataSetAnnotationsList = new Vector();
_alignmentList = new Vector();
_treeList = new Vector();
- _provenanceList = new Vector();
} //-- org.vamsas.objects.core.DataSet()
} //-- void addDataSetAnnotations(int, org.vamsas.objects.core.DataSetAnnotations)
/**
- * Method addProvenance
- *
- *
- *
- * @param vProvenance
- */
- public void addProvenance(org.vamsas.objects.core.Provenance vProvenance)
- throws java.lang.IndexOutOfBoundsException
- {
- _provenanceList.addElement(vProvenance);
- } //-- void addProvenance(org.vamsas.objects.core.Provenance)
-
- /**
- * Method addProvenance
- *
- *
- *
- * @param index
- * @param vProvenance
- */
- public void addProvenance(int index, org.vamsas.objects.core.Provenance vProvenance)
- throws java.lang.IndexOutOfBoundsException
- {
- _provenanceList.insertElementAt(vProvenance, index);
- } //-- void addProvenance(int, org.vamsas.objects.core.Provenance)
-
- /**
* Method addSequence
*
*
} //-- java.util.Enumeration enumerateDataSetAnnotations()
/**
- * Method enumerateProvenance
- *
- *
- *
- * @return Enumeration
- */
- public java.util.Enumeration enumerateProvenance()
- {
- return _provenanceList.elements();
- } //-- java.util.Enumeration enumerateProvenance()
-
- /**
* Method enumerateSequence
*
*
}
else if (temp._treeList != null)
return false;
- if (this._provenanceList != null) {
- if (temp._provenanceList == null) return false;
- else if (!(this._provenanceList.equals(temp._provenanceList)))
+ if (this._provenance != null) {
+ if (temp._provenance == null) return false;
+ else if (!(this._provenance.equals(temp._provenance)))
return false;
}
- else if (temp._provenanceList != null)
+ else if (temp._provenance != null)
return false;
return true;
}
} //-- java.lang.String getId()
/**
- * Method getProvenance
- *
- *
- *
- * @param index
- * @return Provenance
- */
- public org.vamsas.objects.core.Provenance getProvenance(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _provenanceList.size())) {
- throw new IndexOutOfBoundsException("getProvenance: Index value '"+index+"' not in range [0.."+_provenanceList.size()+ "]");
- }
-
- return (org.vamsas.objects.core.Provenance) _provenanceList.elementAt(index);
- } //-- org.vamsas.objects.core.Provenance getProvenance(int)
-
- /**
- * Method getProvenance
- *
- *
+ * Returns the value of field 'provenance'.
*
* @return Provenance
+ * @return the value of field 'provenance'.
*/
- public org.vamsas.objects.core.Provenance[] getProvenance()
+ public org.vamsas.objects.core.Provenance getProvenance()
{
- int size = _provenanceList.size();
- org.vamsas.objects.core.Provenance[] mArray = new org.vamsas.objects.core.Provenance[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (org.vamsas.objects.core.Provenance) _provenanceList.elementAt(index);
- }
- return mArray;
- } //-- org.vamsas.objects.core.Provenance[] getProvenance()
-
- /**
- * Method getProvenanceCount
- *
- *
- *
- * @return int
- */
- public int getProvenanceCount()
- {
- return _provenanceList.size();
- } //-- int getProvenanceCount()
+ return this._provenance;
+ } //-- org.vamsas.objects.core.Provenance getProvenance()
/**
* Method getSequence
} //-- void removeAllDataSetAnnotations()
/**
- * Method removeAllProvenance
- *
- */
- public void removeAllProvenance()
- {
- _provenanceList.removeAllElements();
- } //-- void removeAllProvenance()
-
- /**
* Method removeAllSequence
*
*/
} //-- org.vamsas.objects.core.DataSetAnnotations removeDataSetAnnotations(int)
/**
- * Method removeProvenance
- *
- *
- *
- * @param index
- * @return Provenance
- */
- public org.vamsas.objects.core.Provenance removeProvenance(int index)
- {
- java.lang.Object obj = _provenanceList.elementAt(index);
- _provenanceList.removeElementAt(index);
- return (org.vamsas.objects.core.Provenance) obj;
- } //-- org.vamsas.objects.core.Provenance removeProvenance(int)
-
- /**
* Method removeSequence
*
*
} //-- void setId(java.lang.String)
/**
- * Method setProvenance
- *
- *
- *
- * @param index
- * @param vProvenance
- */
- public void setProvenance(int index, org.vamsas.objects.core.Provenance vProvenance)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _provenanceList.size())) {
- throw new IndexOutOfBoundsException("setProvenance: Index value '"+index+"' not in range [0.."+_provenanceList.size()+ "]");
- }
- _provenanceList.setElementAt(vProvenance, index);
- } //-- void setProvenance(int, org.vamsas.objects.core.Provenance)
-
- /**
- * Method setProvenance
- *
- *
+ * Sets the value of field 'provenance'.
*
- * @param provenanceArray
+ * @param provenance the value of field 'provenance'.
*/
- public void setProvenance(org.vamsas.objects.core.Provenance[] provenanceArray)
+ public void setProvenance(org.vamsas.objects.core.Provenance provenance)
{
- //-- copy array
- _provenanceList.removeAllElements();
- for (int i = 0; i < provenanceArray.length; i++) {
- _provenanceList.addElement(provenanceArray[i]);
- }
+ this._provenance = provenance;
} //-- void setProvenance(org.vamsas.objects.core.Provenance)
/**
};
desc.setHandler(handler);
desc.setNameSpaceURI("http://www.vamsas.org");
+ desc.setRequired(true);
desc.setMultivalued(true);
addFieldDescriptor(desc);
//-- validation code for: _provenanceList
fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(0);
+ fieldValidator.setMinOccurs(1);
{ //-- local scope
}
desc.setValidator(fieldValidator);
{ //-- local scope
}
desc.setValidator(fieldValidator);
- //-- _provenanceList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Provenance.class, "_provenanceList", "Provenance", org.exolab.castor.xml.NodeType.Element);
+ //-- _provenance
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
try {
DataSet target = (DataSet) object;
- target.addProvenance( (org.vamsas.objects.core.Provenance) value);
+ target.setProvenance( (org.vamsas.objects.core.Provenance) value);
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
desc.setHandler(handler);
desc.setNameSpaceURI("http://www.vamsas.org");
desc.setRequired(true);
- desc.setMultivalued(true);
+ desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _provenanceList
+ //-- validation code for: _provenance
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(1);
{ //-- local scope
};
desc.setHandler(handler);
desc.setNameSpaceURI("http://www.vamsas.org");
+ desc.setRequired(true);
desc.setMultivalued(true);
addFieldDescriptor(desc);
//-- validation code for: _entryList
fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(0);
+ fieldValidator.setMinOccurs(1);
{ //-- local scope
}
desc.setValidator(fieldValidator);