/*
* This class was automatically generated with
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
* Schema.
* $Id$
*/
//- Imported classes and packages -/
//---------------------------------/
-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;
-import org.exolab.castor.xml.ValidationException;
-import org.xml.sax.ContentHandler;
/**
* Class DataSet.
private java.lang.String _id;
/**
- * Field _sequenceList
+ * Field _sequenceList.
*/
private java.util.Vector _sequenceList;
/**
- * Field _dataSetAnnotationsList
+ * Field _dataSetAnnotationsList.
*/
private java.util.Vector _dataSetAnnotationsList;
/**
- * Field _alignmentList
+ * Field _alignmentList.
*/
private java.util.Vector _alignmentList;
/**
- * Field _treeList
+ * Field _treeList.
*/
private java.util.Vector _treeList;
/**
- * Field _provenance
+ * Field _provenance.
*/
private uk.ac.vamsas.objects.core.Provenance _provenance;
//- Constructors -/
//----------------/
- public DataSet()
- {
+ public DataSet() {
super();
- _sequenceList = new Vector();
- _dataSetAnnotationsList = new Vector();
- _alignmentList = new Vector();
- _treeList = new Vector();
- } //-- uk.ac.vamsas.objects.core.DataSet()
+ this._sequenceList = new java.util.Vector();
+ this._dataSetAnnotationsList = new java.util.Vector();
+ this._alignmentList = new java.util.Vector();
+ this._treeList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addAlignment
- *
*
*
* @param vAlignment
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addAlignment(uk.ac.vamsas.objects.core.Alignment vAlignment)
- throws java.lang.IndexOutOfBoundsException
- {
- _alignmentList.addElement(vAlignment);
- } //-- void addAlignment(uk.ac.vamsas.objects.core.Alignment)
+ public void addAlignment(
+ final uk.ac.vamsas.objects.core.Alignment vAlignment)
+ throws java.lang.IndexOutOfBoundsException {
+ this._alignmentList.addElement(vAlignment);
+ }
/**
- * Method addAlignment
- *
*
*
* @param index
* @param vAlignment
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addAlignment(int index, uk.ac.vamsas.objects.core.Alignment vAlignment)
- throws java.lang.IndexOutOfBoundsException
- {
- _alignmentList.insertElementAt(vAlignment, index);
- } //-- void addAlignment(int, uk.ac.vamsas.objects.core.Alignment)
+ public void addAlignment(
+ final int index,
+ final uk.ac.vamsas.objects.core.Alignment vAlignment)
+ throws java.lang.IndexOutOfBoundsException {
+ this._alignmentList.add(index, vAlignment);
+ }
/**
- * Method addDataSetAnnotations
- *
*
*
* @param vDataSetAnnotations
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addDataSetAnnotations(uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
- throws java.lang.IndexOutOfBoundsException
- {
- _dataSetAnnotationsList.addElement(vDataSetAnnotations);
- } //-- void addDataSetAnnotations(uk.ac.vamsas.objects.core.DataSetAnnotations)
+ public void addDataSetAnnotations(
+ final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
+ throws java.lang.IndexOutOfBoundsException {
+ this._dataSetAnnotationsList.addElement(vDataSetAnnotations);
+ }
/**
- * Method addDataSetAnnotations
- *
*
*
* @param index
* @param vDataSetAnnotations
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addDataSetAnnotations(int index, uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
- throws java.lang.IndexOutOfBoundsException
- {
- _dataSetAnnotationsList.insertElementAt(vDataSetAnnotations, index);
- } //-- void addDataSetAnnotations(int, uk.ac.vamsas.objects.core.DataSetAnnotations)
+ public void addDataSetAnnotations(
+ final int index,
+ final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
+ throws java.lang.IndexOutOfBoundsException {
+ this._dataSetAnnotationsList.add(index, vDataSetAnnotations);
+ }
/**
- * Method addSequence
- *
*
*
* @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addSequence(uk.ac.vamsas.objects.core.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- _sequenceList.addElement(vSequence);
- } //-- void addSequence(uk.ac.vamsas.objects.core.Sequence)
+ public void addSequence(
+ final uk.ac.vamsas.objects.core.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ this._sequenceList.addElement(vSequence);
+ }
/**
- * Method addSequence
- *
*
*
* @param index
* @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addSequence(int index, uk.ac.vamsas.objects.core.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- _sequenceList.insertElementAt(vSequence, index);
- } //-- void addSequence(int, uk.ac.vamsas.objects.core.Sequence)
+ public void addSequence(
+ final int index,
+ final uk.ac.vamsas.objects.core.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ this._sequenceList.add(index, vSequence);
+ }
/**
- * Method addTree
- *
*
*
* @param vTree
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addTree(uk.ac.vamsas.objects.core.Tree vTree)
- throws java.lang.IndexOutOfBoundsException
- {
- _treeList.addElement(vTree);
- } //-- void addTree(uk.ac.vamsas.objects.core.Tree)
+ public void addTree(
+ final uk.ac.vamsas.objects.core.Tree vTree)
+ throws java.lang.IndexOutOfBoundsException {
+ this._treeList.addElement(vTree);
+ }
/**
- * Method addTree
- *
*
*
* @param index
* @param vTree
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addTree(int index, uk.ac.vamsas.objects.core.Tree vTree)
- throws java.lang.IndexOutOfBoundsException
- {
- _treeList.insertElementAt(vTree, index);
- } //-- void addTree(int, uk.ac.vamsas.objects.core.Tree)
+ public void addTree(
+ final int index,
+ final uk.ac.vamsas.objects.core.Tree vTree)
+ throws java.lang.IndexOutOfBoundsException {
+ this._treeList.add(index, vTree);
+ }
/**
- * Method enumerateAlignment
- *
- *
+ * Method enumerateAlignment.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Alignment elements
*/
- public java.util.Enumeration enumerateAlignment()
- {
- return _alignmentList.elements();
- } //-- java.util.Enumeration enumerateAlignment()
+ public java.util.Enumeration enumerateAlignment(
+ ) {
+ return this._alignmentList.elements();
+ }
/**
- * Method enumerateDataSetAnnotations
+ * Method enumerateDataSetAnnotations.
*
- *
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.DataSetAnnotations elements
*/
- public java.util.Enumeration enumerateDataSetAnnotations()
- {
- return _dataSetAnnotationsList.elements();
- } //-- java.util.Enumeration enumerateDataSetAnnotations()
+ public java.util.Enumeration enumerateDataSetAnnotations(
+ ) {
+ return this._dataSetAnnotationsList.elements();
+ }
/**
- * Method enumerateSequence
- *
+ * Method enumerateSequence.
*
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Sequence elements
*/
- public java.util.Enumeration enumerateSequence()
- {
- return _sequenceList.elements();
- } //-- java.util.Enumeration enumerateSequence()
+ public java.util.Enumeration enumerateSequence(
+ ) {
+ return this._sequenceList.elements();
+ }
/**
- * Method enumerateTree
- *
+ * Method enumerateTree.
*
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Tree elements
*/
- public java.util.Enumeration enumerateTree()
- {
- return _treeList.elements();
- } //-- java.util.Enumeration enumerateTree()
+ public java.util.Enumeration enumerateTree(
+ ) {
+ return this._treeList.elements();
+ }
/**
- * Note: hashCode() has not been overriden
+ * Overrides the java.lang.Object.equals method.
*
* @param obj
- * @return boolean
+ * @return true if the objects are equal.
*/
- public boolean equals(java.lang.Object obj)
- {
+ public boolean equals(
+ final java.lang.Object obj) {
if ( this == obj )
return true;
return true;
}
return false;
- } //-- boolean equals(java.lang.Object)
+ }
/**
- * Method getAlignment
- *
- *
+ * Method getAlignment.
*
* @param index
- * @return Alignment
- */
- public uk.ac.vamsas.objects.core.Alignment getAlignment(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _alignmentList.size())) {
- throw new IndexOutOfBoundsException("getAlignment: Index value '"+index+"' not in range [0.."+_alignmentList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the uk.ac.vamsas.objects.core.Alignment
+ * at the given index
+ */
+ public uk.ac.vamsas.objects.core.Alignment getAlignment(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentList.size()) {
+ throw new IndexOutOfBoundsException("getAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Alignment) _alignmentList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Alignment getAlignment(int)
+ return (uk.ac.vamsas.objects.core.Alignment) _alignmentList.get(index);
+ }
/**
- * Method getAlignment
+ * Method getAlignment.Returns the contents of the collection
+ * in an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
*
- *
- *
- * @return Alignment
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Alignment[] getAlignment()
- {
- int size = _alignmentList.size();
- uk.ac.vamsas.objects.core.Alignment[] mArray = new uk.ac.vamsas.objects.core.Alignment[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Alignment) _alignmentList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Alignment[] getAlignment()
+ public uk.ac.vamsas.objects.core.Alignment[] getAlignment(
+ ) {
+ uk.ac.vamsas.objects.core.Alignment[] array = new uk.ac.vamsas.objects.core.Alignment[0];
+ return (uk.ac.vamsas.objects.core.Alignment[]) this._alignmentList.toArray(array);
+ }
/**
- * Method getAlignmentCount
- *
- *
+ * Method getAlignmentAsReference.Returns a reference to
+ * '_alignmentList'. No type checking is performed on any
+ * modifications to the Vector.
*
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getAlignmentCount()
- {
- return _alignmentList.size();
- } //-- int getAlignmentCount()
+ public java.util.Vector getAlignmentAsReference(
+ ) {
+ return this._alignmentList;
+ }
/**
- * Method getDataSetAnnotations
- *
+ * Method getAlignmentCount.
*
+ * @return the size of this collection
+ */
+ public int getAlignmentCount(
+ ) {
+ return this._alignmentList.size();
+ }
+
+ /**
+ * Method getDataSetAnnotations.
*
* @param index
- * @return DataSetAnnotations
- */
- public uk.ac.vamsas.objects.core.DataSetAnnotations getDataSetAnnotations(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _dataSetAnnotationsList.size())) {
- throw new IndexOutOfBoundsException("getDataSetAnnotations: Index value '"+index+"' not in range [0.."+_dataSetAnnotationsList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the
+ * uk.ac.vamsas.objects.core.DataSetAnnotations at the given
+ * index
+ */
+ public uk.ac.vamsas.objects.core.DataSetAnnotations getDataSetAnnotations(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._dataSetAnnotationsList.size()) {
+ throw new IndexOutOfBoundsException("getDataSetAnnotations: Index value '" + index + "' not in range [0.." + (this._dataSetAnnotationsList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.DataSetAnnotations) _dataSetAnnotationsList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.DataSetAnnotations getDataSetAnnotations(int)
+ return (uk.ac.vamsas.objects.core.DataSetAnnotations) _dataSetAnnotationsList.get(index);
+ }
/**
- * Method getDataSetAnnotations
- *
- *
- *
- * @return DataSetAnnotations
+ * Method getDataSetAnnotations.Returns the contents of the
+ * collection in an Array. <p>Note: Just in case the
+ * collection contents are changing in another thread, we pass
+ * a 0-length Array of the correct type into the API call.
+ * This way we <i>know</i> that the Array returned is of
+ * exactly the correct length.
+ *
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.DataSetAnnotations[] getDataSetAnnotations()
- {
- int size = _dataSetAnnotationsList.size();
- uk.ac.vamsas.objects.core.DataSetAnnotations[] mArray = new uk.ac.vamsas.objects.core.DataSetAnnotations[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.DataSetAnnotations) _dataSetAnnotationsList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.DataSetAnnotations[] getDataSetAnnotations()
+ public uk.ac.vamsas.objects.core.DataSetAnnotations[] getDataSetAnnotations(
+ ) {
+ uk.ac.vamsas.objects.core.DataSetAnnotations[] array = new uk.ac.vamsas.objects.core.DataSetAnnotations[0];
+ return (uk.ac.vamsas.objects.core.DataSetAnnotations[]) this._dataSetAnnotationsList.toArray(array);
+ }
/**
- * Method getDataSetAnnotationsCount
- *
+ * Method getDataSetAnnotationsAsReference.Returns a reference
+ * to '_dataSetAnnotationsList'. No type checking is performed
+ * on any modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getDataSetAnnotationsAsReference(
+ ) {
+ return this._dataSetAnnotationsList;
+ }
+
+ /**
+ * Method getDataSetAnnotationsCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getDataSetAnnotationsCount()
- {
- return _dataSetAnnotationsList.size();
- } //-- int getDataSetAnnotationsCount()
+ public int getDataSetAnnotationsCount(
+ ) {
+ return this._dataSetAnnotationsList.size();
+ }
/**
* Returns the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
* referencing
*
- * @return String
- * @return the value of field 'id'.
+ * @return the value of field 'Id'.
*/
- public java.lang.String getId()
- {
+ public java.lang.String getId(
+ ) {
return this._id;
- } //-- java.lang.String getId()
+ }
/**
* Returns the value of field 'provenance'.
*
- * @return Provenance
- * @return the value of field 'provenance'.
+ * @return the value of field 'Provenance'.
*/
- public uk.ac.vamsas.objects.core.Provenance getProvenance()
- {
+ public uk.ac.vamsas.objects.core.Provenance getProvenance(
+ ) {
return this._provenance;
- } //-- uk.ac.vamsas.objects.core.Provenance getProvenance()
+ }
/**
- * Method getSequence
- *
- *
+ * Method getSequence.
*
* @param index
- * @return Sequence
- */
- public uk.ac.vamsas.objects.core.Sequence getSequence(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _sequenceList.size())) {
- throw new IndexOutOfBoundsException("getSequence: Index value '"+index+"' not in range [0.."+_sequenceList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the uk.ac.vamsas.objects.core.Sequence
+ * at the given index
+ */
+ public uk.ac.vamsas.objects.core.Sequence getSequence(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._sequenceList.size()) {
+ throw new IndexOutOfBoundsException("getSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Sequence) _sequenceList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Sequence getSequence(int)
+ return (uk.ac.vamsas.objects.core.Sequence) _sequenceList.get(index);
+ }
/**
- * Method getSequence
- *
- *
+ * Method getSequence.Returns the contents of the collection in
+ * an Array. <p>Note: Just in case the collection contents
+ * are changing in another thread, we pass a 0-length Array of
+ * the correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
*
- * @return Sequence
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Sequence[] getSequence()
- {
- int size = _sequenceList.size();
- uk.ac.vamsas.objects.core.Sequence[] mArray = new uk.ac.vamsas.objects.core.Sequence[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Sequence) _sequenceList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Sequence[] getSequence()
+ public uk.ac.vamsas.objects.core.Sequence[] getSequence(
+ ) {
+ uk.ac.vamsas.objects.core.Sequence[] array = new uk.ac.vamsas.objects.core.Sequence[0];
+ return (uk.ac.vamsas.objects.core.Sequence[]) this._sequenceList.toArray(array);
+ }
/**
- * Method getSequenceCount
- *
+ * Method getSequenceAsReference.Returns a reference to
+ * '_sequenceList'. No type checking is performed on any
+ * modifications to the Vector.
*
- *
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getSequenceCount()
- {
- return _sequenceList.size();
- } //-- int getSequenceCount()
+ public java.util.Vector getSequenceAsReference(
+ ) {
+ return this._sequenceList;
+ }
/**
- * Method getTree
- *
+ * Method getSequenceCount.
*
+ * @return the size of this collection
+ */
+ public int getSequenceCount(
+ ) {
+ return this._sequenceList.size();
+ }
+
+ /**
+ * Method getTree.
*
* @param index
- * @return Tree
- */
- public uk.ac.vamsas.objects.core.Tree getTree(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _treeList.size())) {
- throw new IndexOutOfBoundsException("getTree: Index value '"+index+"' not in range [0.."+_treeList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the uk.ac.vamsas.objects.core.Tree at
+ * the given index
+ */
+ public uk.ac.vamsas.objects.core.Tree getTree(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._treeList.size()) {
+ throw new IndexOutOfBoundsException("getTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Tree) _treeList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Tree getTree(int)
+ return (uk.ac.vamsas.objects.core.Tree) _treeList.get(index);
+ }
/**
- * Method getTree
- *
+ * Method getTree.Returns the contents of the collection in an
+ * Array. <p>Note: Just in case the collection contents are
+ * changing in another thread, we pass a 0-length Array of the
+ * correct type into the API call. This way we <i>know</i>
+ * that the Array returned is of exactly the correct length.
*
- *
- * @return Tree
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Tree[] getTree()
- {
- int size = _treeList.size();
- uk.ac.vamsas.objects.core.Tree[] mArray = new uk.ac.vamsas.objects.core.Tree[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Tree) _treeList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Tree[] getTree()
+ public uk.ac.vamsas.objects.core.Tree[] getTree(
+ ) {
+ uk.ac.vamsas.objects.core.Tree[] array = new uk.ac.vamsas.objects.core.Tree[0];
+ return (uk.ac.vamsas.objects.core.Tree[]) this._treeList.toArray(array);
+ }
/**
- * Method getTreeCount
- *
- *
+ * Method getTreeAsReference.Returns a reference to
+ * '_treeList'. No type checking is performed on any
+ * modifications to the Vector.
*
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getTreeCount()
- {
- return _treeList.size();
- } //-- int getTreeCount()
+ public java.util.Vector getTreeAsReference(
+ ) {
+ return this._treeList;
+ }
/**
- * Method isValid
+ * Method getTreeCount.
*
+ * @return the size of this collection
+ */
+ public int getTreeCount(
+ ) {
+ return this._treeList.size();
+ }
+
+ /**
+ * Overrides the java.lang.Object.hashCode method.
+ * <p>
+ * The following steps came from <b>Effective Java Programming
+ * Language Guide</b> by Joshua Bloch, Chapter 3
*
+ * @return a hash code value for the object.
+ */
+ public int hashCode(
+ ) {
+ int result = super.hashCode();
+
+ long tmp;
+ if (_id != null) {
+ result = 37 * result + _id.hashCode();
+ }
+ if (_sequenceList != null) {
+ result = 37 * result + _sequenceList.hashCode();
+ }
+ if (_dataSetAnnotationsList != null) {
+ result = 37 * result + _dataSetAnnotationsList.hashCode();
+ }
+ if (_alignmentList != null) {
+ result = 37 * result + _alignmentList.hashCode();
+ }
+ if (_treeList != null) {
+ result = 37 * result + _treeList.hashCode();
+ }
+ if (_provenance != null) {
+ result = 37 * result + _provenance.hashCode();
+ }
+
+ return result;
+ }
+
+ /**
+ * Method isValid.
*
- * @return boolean
+ * @return true if this object is valid according to the schema
*/
- public boolean isValid()
- {
+ public boolean isValid(
+ ) {
try {
validate();
- }
- catch (org.exolab.castor.xml.ValidationException vex) {
+ } catch (org.exolab.castor.xml.ValidationException vex) {
return false;
}
return true;
- } //-- boolean isValid()
+ }
/**
- * Method marshal
- *
*
*
* @param out
+ * @throws org.exolab.castor.xml.MarshalException if object is
+ * null or if any SAXException is thrown during marshaling
+ * @throws org.exolab.castor.xml.ValidationException if this
+ * object is an invalid instance according to the schema
*/
- public void marshal(java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ public void marshal(
+ final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, out);
- } //-- void marshal(java.io.Writer)
+ }
/**
- * Method marshal
- *
*
*
* @param handler
+ * @throws java.io.IOException if an IOException occurs during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException if this
+ * object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException if object is
+ * null or if any SAXException is thrown during marshaling
*/
- public void marshal(org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ public void marshal(
+ final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, handler);
- } //-- void marshal(org.xml.sax.ContentHandler)
+ }
/**
- * Method removeAlignment
- *
+ * Method removeAlignment.
*
+ * @param vAlignment
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAlignment(
+ final uk.ac.vamsas.objects.core.Alignment vAlignment) {
+ boolean removed = _alignmentList.remove(vAlignment);
+ return removed;
+ }
+
+ /**
+ * Method removeAlignmentAt.
*
* @param index
- * @return Alignment
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Alignment removeAlignment(int index)
- {
- java.lang.Object obj = _alignmentList.elementAt(index);
- _alignmentList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Alignment removeAlignmentAt(
+ final int index) {
+ java.lang.Object obj = this._alignmentList.remove(index);
return (uk.ac.vamsas.objects.core.Alignment) obj;
- } //-- uk.ac.vamsas.objects.core.Alignment removeAlignment(int)
+ }
/**
- * Method removeAllAlignment
- *
*/
- public void removeAllAlignment()
- {
- _alignmentList.removeAllElements();
- } //-- void removeAllAlignment()
+ public void removeAllAlignment(
+ ) {
+ this._alignmentList.clear();
+ }
/**
- * Method removeAllDataSetAnnotations
- *
*/
- public void removeAllDataSetAnnotations()
- {
- _dataSetAnnotationsList.removeAllElements();
- } //-- void removeAllDataSetAnnotations()
+ public void removeAllDataSetAnnotations(
+ ) {
+ this._dataSetAnnotationsList.clear();
+ }
/**
- * Method removeAllSequence
- *
*/
- public void removeAllSequence()
- {
- _sequenceList.removeAllElements();
- } //-- void removeAllSequence()
+ public void removeAllSequence(
+ ) {
+ this._sequenceList.clear();
+ }
/**
- * Method removeAllTree
- *
*/
- public void removeAllTree()
- {
- _treeList.removeAllElements();
- } //-- void removeAllTree()
+ public void removeAllTree(
+ ) {
+ this._treeList.clear();
+ }
/**
- * Method removeDataSetAnnotations
- *
+ * Method removeDataSetAnnotations.
*
+ * @param vDataSetAnnotations
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeDataSetAnnotations(
+ final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations) {
+ boolean removed = _dataSetAnnotationsList.remove(vDataSetAnnotations);
+ return removed;
+ }
+
+ /**
+ * Method removeDataSetAnnotationsAt.
*
* @param index
- * @return DataSetAnnotations
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.DataSetAnnotations removeDataSetAnnotations(int index)
- {
- java.lang.Object obj = _dataSetAnnotationsList.elementAt(index);
- _dataSetAnnotationsList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.DataSetAnnotations removeDataSetAnnotationsAt(
+ final int index) {
+ java.lang.Object obj = this._dataSetAnnotationsList.remove(index);
return (uk.ac.vamsas.objects.core.DataSetAnnotations) obj;
- } //-- uk.ac.vamsas.objects.core.DataSetAnnotations removeDataSetAnnotations(int)
+ }
/**
- * Method removeSequence
- *
+ * Method removeSequence.
*
+ * @param vSequence
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSequence(
+ final uk.ac.vamsas.objects.core.Sequence vSequence) {
+ boolean removed = _sequenceList.remove(vSequence);
+ return removed;
+ }
+
+ /**
+ * Method removeSequenceAt.
*
* @param index
- * @return Sequence
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Sequence removeSequence(int index)
- {
- java.lang.Object obj = _sequenceList.elementAt(index);
- _sequenceList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Sequence removeSequenceAt(
+ final int index) {
+ java.lang.Object obj = this._sequenceList.remove(index);
return (uk.ac.vamsas.objects.core.Sequence) obj;
- } //-- uk.ac.vamsas.objects.core.Sequence removeSequence(int)
+ }
/**
- * Method removeTree
- *
+ * Method removeTree.
*
+ * @param vTree
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeTree(
+ final uk.ac.vamsas.objects.core.Tree vTree) {
+ boolean removed = _treeList.remove(vTree);
+ return removed;
+ }
+
+ /**
+ * Method removeTreeAt.
*
* @param index
- * @return Tree
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Tree removeTree(int index)
- {
- java.lang.Object obj = _treeList.elementAt(index);
- _treeList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Tree removeTreeAt(
+ final int index) {
+ java.lang.Object obj = this._treeList.remove(index);
return (uk.ac.vamsas.objects.core.Tree) obj;
- } //-- uk.ac.vamsas.objects.core.Tree removeTree(int)
+ }
/**
- * Method setAlignment
- *
*
*
* @param index
* @param vAlignment
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void setAlignment(int index, uk.ac.vamsas.objects.core.Alignment vAlignment)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _alignmentList.size())) {
- throw new IndexOutOfBoundsException("setAlignment: Index value '"+index+"' not in range [0.."+_alignmentList.size()+ "]");
+ public void setAlignment(
+ final int index,
+ final uk.ac.vamsas.objects.core.Alignment vAlignment)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentList.size()) {
+ throw new IndexOutOfBoundsException("setAlignment: Index value '" + index + "' not in range [0.." + (this._alignmentList.size() - 1) + "]");
}
- _alignmentList.setElementAt(vAlignment, index);
- } //-- void setAlignment(int, uk.ac.vamsas.objects.core.Alignment)
+
+ this._alignmentList.set(index, vAlignment);
+ }
/**
- * Method setAlignment
*
*
- *
- * @param alignmentArray
+ * @param vAlignmentArray
*/
- public void setAlignment(uk.ac.vamsas.objects.core.Alignment[] alignmentArray)
- {
+ public void setAlignment(
+ final uk.ac.vamsas.objects.core.Alignment[] vAlignmentArray) {
//-- copy array
- _alignmentList.removeAllElements();
- for (int i = 0; i < alignmentArray.length; i++) {
- _alignmentList.addElement(alignmentArray[i]);
+ _alignmentList.clear();
+
+ for (int i = 0; i < vAlignmentArray.length; i++) {
+ this._alignmentList.add(vAlignmentArray[i]);
}
- } //-- void setAlignment(uk.ac.vamsas.objects.core.Alignment)
+ }
/**
- * Method setDataSetAnnotations
+ * Sets the value of '_alignmentList' by copying the given
+ * Vector. All elements will be checked for type safety.
*
+ * @param vAlignmentList the Vector to copy.
+ */
+ public void setAlignment(
+ final java.util.Vector vAlignmentList) {
+ // copy vector
+ this._alignmentList.clear();
+
+ this._alignmentList.addAll(vAlignmentList);
+ }
+
+ /**
+ * Sets the value of '_alignmentList' by setting it to the
+ * given Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param alignmentVector the Vector to set.
+ */
+ public void setAlignmentAsReference(
+ final java.util.Vector alignmentVector) {
+ this._alignmentList = alignmentVector;
+ }
+
+ /**
*
*
* @param index
* @param vDataSetAnnotations
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void setDataSetAnnotations(int index, uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _dataSetAnnotationsList.size())) {
- throw new IndexOutOfBoundsException("setDataSetAnnotations: Index value '"+index+"' not in range [0.."+_dataSetAnnotationsList.size()+ "]");
+ public void setDataSetAnnotations(
+ final int index,
+ final uk.ac.vamsas.objects.core.DataSetAnnotations vDataSetAnnotations)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._dataSetAnnotationsList.size()) {
+ throw new IndexOutOfBoundsException("setDataSetAnnotations: Index value '" + index + "' not in range [0.." + (this._dataSetAnnotationsList.size() - 1) + "]");
}
- _dataSetAnnotationsList.setElementAt(vDataSetAnnotations, index);
- } //-- void setDataSetAnnotations(int, uk.ac.vamsas.objects.core.DataSetAnnotations)
+
+ this._dataSetAnnotationsList.set(index, vDataSetAnnotations);
+ }
/**
- * Method setDataSetAnnotations
- *
*
*
- * @param dataSetAnnotationsArray
+ * @param vDataSetAnnotationsArray
*/
- public void setDataSetAnnotations(uk.ac.vamsas.objects.core.DataSetAnnotations[] dataSetAnnotationsArray)
- {
+ public void setDataSetAnnotations(
+ final uk.ac.vamsas.objects.core.DataSetAnnotations[] vDataSetAnnotationsArray) {
//-- copy array
- _dataSetAnnotationsList.removeAllElements();
- for (int i = 0; i < dataSetAnnotationsArray.length; i++) {
- _dataSetAnnotationsList.addElement(dataSetAnnotationsArray[i]);
+ _dataSetAnnotationsList.clear();
+
+ for (int i = 0; i < vDataSetAnnotationsArray.length; i++) {
+ this._dataSetAnnotationsList.add(vDataSetAnnotationsArray[i]);
}
- } //-- void setDataSetAnnotations(uk.ac.vamsas.objects.core.DataSetAnnotations)
+ }
+
+ /**
+ * Sets the value of '_dataSetAnnotationsList' by copying the
+ * given Vector. All elements will be checked for type safety.
+ *
+ * @param vDataSetAnnotationsList the Vector to copy.
+ */
+ public void setDataSetAnnotations(
+ final java.util.Vector vDataSetAnnotationsList) {
+ // copy vector
+ this._dataSetAnnotationsList.clear();
+
+ this._dataSetAnnotationsList.addAll(vDataSetAnnotationsList);
+ }
+
+ /**
+ * Sets the value of '_dataSetAnnotationsList' by setting it to
+ * the given Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param dataSetAnnotationsVector the Vector to set.
+ */
+ public void setDataSetAnnotationsAsReference(
+ final java.util.Vector dataSetAnnotationsVector) {
+ this._dataSetAnnotationsList = dataSetAnnotationsVector;
+ }
/**
* Sets the value of field 'id'. The field 'id' has the
*
* @param id the value of field 'id'.
*/
- public void setId(java.lang.String id)
- {
+ public void setId(
+ final java.lang.String id) {
this._id = id;
- } //-- void setId(java.lang.String)
+ }
/**
* Sets the value of field 'provenance'.
*
* @param provenance the value of field 'provenance'.
*/
- public void setProvenance(uk.ac.vamsas.objects.core.Provenance provenance)
- {
+ public void setProvenance(
+ final uk.ac.vamsas.objects.core.Provenance provenance) {
this._provenance = provenance;
- } //-- void setProvenance(uk.ac.vamsas.objects.core.Provenance)
+ }
/**
- * Method setSequence
- *
*
*
* @param index
* @param vSequence
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void setSequence(int index, uk.ac.vamsas.objects.core.Sequence vSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _sequenceList.size())) {
- throw new IndexOutOfBoundsException("setSequence: Index value '"+index+"' not in range [0.."+_sequenceList.size()+ "]");
+ public void setSequence(
+ final int index,
+ final uk.ac.vamsas.objects.core.Sequence vSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._sequenceList.size()) {
+ throw new IndexOutOfBoundsException("setSequence: Index value '" + index + "' not in range [0.." + (this._sequenceList.size() - 1) + "]");
}
- _sequenceList.setElementAt(vSequence, index);
- } //-- void setSequence(int, uk.ac.vamsas.objects.core.Sequence)
+
+ this._sequenceList.set(index, vSequence);
+ }
/**
- * Method setSequence
- *
*
*
- * @param sequenceArray
+ * @param vSequenceArray
*/
- public void setSequence(uk.ac.vamsas.objects.core.Sequence[] sequenceArray)
- {
+ public void setSequence(
+ final uk.ac.vamsas.objects.core.Sequence[] vSequenceArray) {
//-- copy array
- _sequenceList.removeAllElements();
- for (int i = 0; i < sequenceArray.length; i++) {
- _sequenceList.addElement(sequenceArray[i]);
+ _sequenceList.clear();
+
+ for (int i = 0; i < vSequenceArray.length; i++) {
+ this._sequenceList.add(vSequenceArray[i]);
}
- } //-- void setSequence(uk.ac.vamsas.objects.core.Sequence)
+ }
+
+ /**
+ * Sets the value of '_sequenceList' by copying the given
+ * Vector. All elements will be checked for type safety.
+ *
+ * @param vSequenceList the Vector to copy.
+ */
+ public void setSequence(
+ final java.util.Vector vSequenceList) {
+ // copy vector
+ this._sequenceList.clear();
+
+ this._sequenceList.addAll(vSequenceList);
+ }
/**
- * Method setTree
+ * Sets the value of '_sequenceList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
*
+ * @param sequenceVector the Vector to set.
+ */
+ public void setSequenceAsReference(
+ final java.util.Vector sequenceVector) {
+ this._sequenceList = sequenceVector;
+ }
+
+ /**
*
*
* @param index
* @param vTree
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void setTree(int index, uk.ac.vamsas.objects.core.Tree vTree)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _treeList.size())) {
- throw new IndexOutOfBoundsException("setTree: Index value '"+index+"' not in range [0.."+_treeList.size()+ "]");
+ public void setTree(
+ final int index,
+ final uk.ac.vamsas.objects.core.Tree vTree)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._treeList.size()) {
+ throw new IndexOutOfBoundsException("setTree: Index value '" + index + "' not in range [0.." + (this._treeList.size() - 1) + "]");
}
- _treeList.setElementAt(vTree, index);
- } //-- void setTree(int, uk.ac.vamsas.objects.core.Tree)
+
+ this._treeList.set(index, vTree);
+ }
/**
- * Method setTree
- *
*
*
- * @param treeArray
+ * @param vTreeArray
*/
- public void setTree(uk.ac.vamsas.objects.core.Tree[] treeArray)
- {
+ public void setTree(
+ final uk.ac.vamsas.objects.core.Tree[] vTreeArray) {
//-- copy array
- _treeList.removeAllElements();
- for (int i = 0; i < treeArray.length; i++) {
- _treeList.addElement(treeArray[i]);
+ _treeList.clear();
+
+ for (int i = 0; i < vTreeArray.length; i++) {
+ this._treeList.add(vTreeArray[i]);
}
- } //-- void setTree(uk.ac.vamsas.objects.core.Tree)
+ }
/**
- * Method unmarshal
+ * Sets the value of '_treeList' by copying the given Vector.
+ * All elements will be checked for type safety.
*
+ * @param vTreeList the Vector to copy.
+ */
+ public void setTree(
+ final java.util.Vector vTreeList) {
+ // copy vector
+ this._treeList.clear();
+
+ this._treeList.addAll(vTreeList);
+ }
+
+ /**
+ * Sets the value of '_treeList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
*
+ * @param treeVector the Vector to set.
+ */
+ public void setTreeAsReference(
+ final java.util.Vector treeVector) {
+ this._treeList = treeVector;
+ }
+
+ /**
+ * Method unmarshal.
*
* @param reader
- * @return DataSet
+ * @throws org.exolab.castor.xml.MarshalException if object is
+ * null or if any SAXException is thrown during marshaling
+ * @throws org.exolab.castor.xml.ValidationException if this
+ * object is an invalid instance according to the schema
+ * @return the unmarshaled uk.ac.vamsas.objects.core.DataSet
*/
- public static uk.ac.vamsas.objects.core.DataSet unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ public static uk.ac.vamsas.objects.core.DataSet unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.DataSet) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.DataSet.class, reader);
- } //-- uk.ac.vamsas.objects.core.DataSet unmarshal(java.io.Reader)
+ }
/**
- * Method validate
*
+ *
+ * @throws org.exolab.castor.xml.ValidationException if this
+ * object is an invalid instance according to the schema
*/
- public void validate()
- throws org.exolab.castor.xml.ValidationException
- {
+ public void validate(
+ )
+ throws org.exolab.castor.xml.ValidationException {
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
validator.validate(this);
- } //-- void validate()
+ }
}