private java.util.Vector _annotationElementList;
/**
- * Field _provenanceList
+ * Field _provenance
*/
- private java.util.Vector _provenanceList;
+ private org.vamsas.objects.core.Provenance _provenance;
//----------------/
{
super();
_annotationElementList = new Vector();
- _provenanceList = new Vector();
} //-- org.vamsas.objects.core.DataSetAnnotations()
} //-- void addAnnotationElement(int, org.vamsas.objects.core.AnnotationElement)
/**
- * 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 deleteBegin
*
*/
} //-- java.util.Enumeration enumerateAnnotationElement()
/**
- * Method enumerateProvenance
- *
- *
- *
- * @return Enumeration
- */
- public java.util.Enumeration enumerateProvenance()
- {
- return _provenanceList.elements();
- } //-- java.util.Enumeration enumerateProvenance()
-
- /**
* Note: hashCode() has not been overriden
*
* @param obj
}
else if (temp._annotationElementList != 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()
/**
* Returns the value of field 'seqRef'.
} //-- void removeAllAnnotationElement()
/**
- * Method removeAllProvenance
- *
- */
- public void removeAllProvenance()
- {
- _provenanceList.removeAllElements();
- } //-- void removeAllProvenance()
-
- /**
* Method removeAnnotationElement
*
*
} //-- org.vamsas.objects.core.AnnotationElement removeAnnotationElement(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 setAnnotationElement
*
*
} //-- 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)
/**
{ //-- 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 {
DataSetAnnotations target = (DataSetAnnotations) 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