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;
*
* @version $Revision$ $Date$
*/
-public class DataSetAnnotations extends org.vamsas.client.Vobject
+public class DataSetAnnotations extends org.vamsas.objects.core.RangeAnnotation
implements java.io.Serializable
{
//--------------------------/
/**
- * Field _type
- */
- private java.lang.String _type;
-
- /**
- * Field _end
- */
- private int _end;
-
- /**
- * keeps track of state for field: _end
- */
- private boolean _has_end;
-
- /**
- * Field _begin
- */
- private int _begin;
-
- /**
- * keeps track of state for field: _begin
- */
- private boolean _has_begin;
-
- /**
- * Field _seqRef
+ * annotation is associated with a
+ * particular dataset sequence
*/
private java.lang.Object _seqRef;
/**
- * Field _id
- */
- private java.lang.String _id;
-
- /**
- * Field _description
+ * Field _provenance
*/
- private java.lang.String _description;
-
- /**
- * Field _status
- */
- private java.lang.String _status;
-
- /**
- * Field _annotationElementList
- */
- private java.util.Vector _annotationElementList;
-
- /**
- * Field _provenanceList
- */
- private java.util.Vector _provenanceList;
+ private org.vamsas.objects.core.Provenance _provenance;
//----------------/
public DataSetAnnotations()
{
super();
- _annotationElementList = new Vector();
- _provenanceList = new Vector();
} //-- org.vamsas.objects.core.DataSetAnnotations()
//-----------/
/**
- * Method addAnnotationElement
- *
- *
- *
- * @param vAnnotationElement
- */
- public void addAnnotationElement(org.vamsas.objects.core.AnnotationElement vAnnotationElement)
- throws java.lang.IndexOutOfBoundsException
- {
- _annotationElementList.addElement(vAnnotationElement);
- } //-- void addAnnotationElement(org.vamsas.objects.core.AnnotationElement)
-
- /**
- * Method addAnnotationElement
- *
- *
- *
- * @param index
- * @param vAnnotationElement
- */
- public void addAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)
- throws java.lang.IndexOutOfBoundsException
- {
- _annotationElementList.insertElementAt(vAnnotationElement, index);
- } //-- 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
- *
- */
- public void deleteBegin()
- {
- this._has_begin= false;
- } //-- void deleteBegin()
-
- /**
- * Method deleteEnd
- *
- */
- public void deleteEnd()
- {
- this._has_end= false;
- } //-- void deleteEnd()
-
- /**
- * Method enumerateAnnotationElement
- *
- *
- *
- * @return Enumeration
- */
- public java.util.Enumeration enumerateAnnotationElement()
- {
- return _annotationElementList.elements();
- } //-- 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
if (obj instanceof DataSetAnnotations) {
DataSetAnnotations temp = (DataSetAnnotations)obj;
- if (this._type != null) {
- if (temp._type == null) return false;
- else if (!(this._type.equals(temp._type)))
- return false;
- }
- else if (temp._type != null)
- return false;
- if (this._end != temp._end)
- return false;
- if (this._has_end != temp._has_end)
- return false;
- if (this._begin != temp._begin)
- return false;
- if (this._has_begin != temp._has_begin)
- return false;
if (this._seqRef != null) {
if (temp._seqRef == null) return false;
else if (!(this._seqRef.equals(temp._seqRef)))
}
else if (temp._seqRef != null)
return false;
- if (this._id != null) {
- if (temp._id == null) return false;
- else if (!(this._id.equals(temp._id)))
+ if (this._provenance != null) {
+ if (temp._provenance == null) return false;
+ else if (!(this._provenance.equals(temp._provenance)))
return false;
}
- else if (temp._id != null)
- return false;
- if (this._description != null) {
- if (temp._description == null) return false;
- else if (!(this._description.equals(temp._description)))
- return false;
- }
- else if (temp._description != null)
- return false;
- if (this._status != null) {
- if (temp._status == null) return false;
- else if (!(this._status.equals(temp._status)))
- return false;
- }
- else if (temp._status != null)
- return false;
- if (this._annotationElementList != null) {
- if (temp._annotationElementList == null) return false;
- else if (!(this._annotationElementList.equals(temp._annotationElementList)))
- return false;
- }
- else if (temp._annotationElementList != null)
- return false;
- if (this._provenanceList != null) {
- if (temp._provenanceList == null) return false;
- else if (!(this._provenanceList.equals(temp._provenanceList)))
- return false;
- }
- else if (temp._provenanceList != null)
+ else if (temp._provenance != null)
return false;
return true;
}
} //-- boolean equals(java.lang.Object)
/**
- * Method getAnnotationElement
- *
- *
- *
- * @param index
- * @return AnnotationElement
- */
- public org.vamsas.objects.core.AnnotationElement getAnnotationElement(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _annotationElementList.size())) {
- throw new IndexOutOfBoundsException("getAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");
- }
-
- return (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);
- } //-- org.vamsas.objects.core.AnnotationElement getAnnotationElement(int)
-
- /**
- * Method getAnnotationElement
- *
- *
- *
- * @return AnnotationElement
- */
- public org.vamsas.objects.core.AnnotationElement[] getAnnotationElement()
- {
- int size = _annotationElementList.size();
- org.vamsas.objects.core.AnnotationElement[] mArray = new org.vamsas.objects.core.AnnotationElement[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);
- }
- return mArray;
- } //-- org.vamsas.objects.core.AnnotationElement[] getAnnotationElement()
-
- /**
- * Method getAnnotationElementCount
- *
- *
- *
- * @return int
- */
- public int getAnnotationElementCount()
- {
- return _annotationElementList.size();
- } //-- int getAnnotationElementCount()
-
- /**
- * Returns the value of field 'begin'.
- *
- * @return int
- * @return the value of field 'begin'.
- */
- public int getBegin()
- {
- return this._begin;
- } //-- int getBegin()
-
- /**
- * Returns the value of field 'description'.
- *
- * @return String
- * @return the value of field 'description'.
- */
- public java.lang.String getDescription()
- {
- return this._description;
- } //-- java.lang.String getDescription()
-
- /**
- * Returns the value of field 'end'.
- *
- * @return int
- * @return the value of field 'end'.
- */
- public int getEnd()
- {
- return this._end;
- } //-- int getEnd()
-
- /**
- * Returns the value of field 'id'.
- *
- * @return String
- * @return the value of field 'id'.
- */
- public java.lang.String getId()
- {
- return this._id;
- } //-- 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()
+ return this._provenance;
+ } //-- org.vamsas.objects.core.Provenance getProvenance()
/**
- * Method getProvenanceCount
- *
- *
- *
- * @return int
- */
- public int getProvenanceCount()
- {
- return _provenanceList.size();
- } //-- int getProvenanceCount()
-
- /**
- * Returns the value of field 'seqRef'.
+ * Returns the value of field 'seqRef'. The field 'seqRef' has
+ * the following description: annotation is associated with a
+ * particular dataset sequence
*
* @return Object
* @return the value of field 'seqRef'.
} //-- java.lang.Object getSeqRef()
/**
- * Returns the value of field 'status'.
- *
- * @return String
- * @return the value of field 'status'.
- */
- public java.lang.String getStatus()
- {
- return this._status;
- } //-- java.lang.String getStatus()
-
- /**
- * Returns the value of field 'type'.
- *
- * @return String
- * @return the value of field 'type'.
- */
- public java.lang.String getType()
- {
- return this._type;
- } //-- java.lang.String getType()
-
- /**
- * Method hasBegin
- *
- *
- *
- * @return boolean
- */
- public boolean hasBegin()
- {
- return this._has_begin;
- } //-- boolean hasBegin()
-
- /**
- * Method hasEnd
- *
- *
- *
- * @return boolean
- */
- public boolean hasEnd()
- {
- return this._has_end;
- } //-- boolean hasEnd()
-
- /**
* Method isValid
*
*
} //-- void marshal(org.xml.sax.ContentHandler)
/**
- * Method removeAllAnnotationElement
+ * Sets the value of field 'provenance'.
*
+ * @param provenance the value of field 'provenance'.
*/
- public void removeAllAnnotationElement()
+ public void setProvenance(org.vamsas.objects.core.Provenance provenance)
{
- _annotationElementList.removeAllElements();
- } //-- void removeAllAnnotationElement()
-
- /**
- * Method removeAllProvenance
- *
- */
- public void removeAllProvenance()
- {
- _provenanceList.removeAllElements();
- } //-- void removeAllProvenance()
-
- /**
- * Method removeAnnotationElement
- *
- *
- *
- * @param index
- * @return AnnotationElement
- */
- public org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int index)
- {
- java.lang.Object obj = _annotationElementList.elementAt(index);
- _annotationElementList.removeElementAt(index);
- return (org.vamsas.objects.core.AnnotationElement) obj;
- } //-- 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
- *
- *
- *
- * @param index
- * @param vAnnotationElement
- */
- public void setAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _annotationElementList.size())) {
- throw new IndexOutOfBoundsException("setAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");
- }
- _annotationElementList.setElementAt(vAnnotationElement, index);
- } //-- void setAnnotationElement(int, org.vamsas.objects.core.AnnotationElement)
-
- /**
- * Method setAnnotationElement
- *
- *
- *
- * @param annotationElementArray
- */
- public void setAnnotationElement(org.vamsas.objects.core.AnnotationElement[] annotationElementArray)
- {
- //-- copy array
- _annotationElementList.removeAllElements();
- for (int i = 0; i < annotationElementArray.length; i++) {
- _annotationElementList.addElement(annotationElementArray[i]);
- }
- } //-- void setAnnotationElement(org.vamsas.objects.core.AnnotationElement)
-
- /**
- * Sets the value of field 'begin'.
- *
- * @param begin the value of field 'begin'.
- */
- public void setBegin(int begin)
- {
- this._begin = begin;
- this._has_begin = true;
- } //-- void setBegin(int)
-
- /**
- * Sets the value of field 'description'.
- *
- * @param description the value of field 'description'.
- */
- public void setDescription(java.lang.String description)
- {
- this._description = description;
- } //-- void setDescription(java.lang.String)
-
- /**
- * Sets the value of field 'end'.
- *
- * @param end the value of field 'end'.
- */
- public void setEnd(int end)
- {
- this._end = end;
- this._has_end = true;
- } //-- void setEnd(int)
-
- /**
- * Sets the value of field 'id'.
- *
- * @param id the value of field 'id'.
- */
- public void setId(java.lang.String id)
- {
- this._id = id;
- } //-- 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
- *
- *
- *
- * @param provenanceArray
- */
- public void setProvenance(org.vamsas.objects.core.Provenance[] provenanceArray)
- {
- //-- 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)
/**
- * Sets the value of field 'seqRef'.
+ * Sets the value of field 'seqRef'. The field 'seqRef' has the
+ * following description: annotation is associated with a
+ * particular dataset sequence
*
* @param seqRef the value of field 'seqRef'.
*/
} //-- void setSeqRef(java.lang.Object)
/**
- * Sets the value of field 'status'.
- *
- * @param status the value of field 'status'.
- */
- public void setStatus(java.lang.String status)
- {
- this._status = status;
- } //-- void setStatus(java.lang.String)
-
- /**
- * Sets the value of field 'type'.
- *
- * @param type the value of field 'type'.
- */
- public void setType(java.lang.String type)
- {
- this._type = type;
- } //-- void setType(java.lang.String)
-
- /**
* Method unmarshal
*
*
*
* @param reader
- * @return DataSetAnnotations
+ * @return RangeType
*/
- public static org.vamsas.objects.core.DataSetAnnotations unmarshal(java.io.Reader reader)
+ public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
{
return (org.vamsas.objects.core.DataSetAnnotations) Unmarshaller.unmarshal(org.vamsas.objects.core.DataSetAnnotations.class, reader);
- } //-- org.vamsas.objects.core.DataSetAnnotations unmarshal(java.io.Reader)
+ } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader)
/**
* Method validate