/*
* This class was automatically generated with
- * <a href="http://www.castor.org">Castor 0.9.9M1</a>, using an XML
+ * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
* Schema.
* $Id$
*/
//--------------------------/
/**
- * Field _alignmentAnnotations
+ * Field _gapChar
*/
- private org.vamsas.objects.core.AlignmentAnnotations _alignmentAnnotations;
+ private java.lang.String _gapChar;
+
+ /**
+ * Field _aligned
+ */
+ private boolean _aligned;
+
+ /**
+ * keeps track of state for field: _aligned
+ */
+ private boolean _has_aligned;
+
+ /**
+ * Field _id
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _alignmentAnnotationsList
+ */
+ 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 addTree(int, org.vamsas.objects.core.Tree)
/**
+ * Method deleteAligned
+ *
+ */
+ public void deleteAligned()
+ {
+ this._has_aligned= false;
+ } //-- void deleteAligned()
+
+ /**
+ * Method enumerateAlignmentAnnotations
+ *
+ *
+ *
+ * @return Enumeration
+ */
+ public java.util.Enumeration enumerateAlignmentAnnotations()
+ {
+ return _alignmentAnnotationsList.elements();
+ } //-- java.util.Enumeration enumerateAlignmentAnnotations()
+
+ /**
* Method enumerateAlignmentSequence
*
*
if (obj instanceof Alignment) {
Alignment temp = (Alignment)obj;
- if (this._alignmentAnnotations != null) {
- if (temp._alignmentAnnotations == null) return false;
- else if (!(this._alignmentAnnotations.equals(temp._alignmentAnnotations)))
+ if (this._gapChar != null) {
+ if (temp._gapChar == null) return false;
+ else if (!(this._gapChar.equals(temp._gapChar)))
+ return false;
+ }
+ else if (temp._gapChar != null)
+ return false;
+ if (this._aligned != temp._aligned)
+ return false;
+ if (this._has_aligned != temp._has_aligned)
+ return false;
+ if (this._id != null) {
+ if (temp._id == null) return false;
+ else if (!(this._id.equals(temp._id)))
+ return false;
+ }
+ else if (temp._id != null)
+ return false;
+ 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 equals(java.lang.Object)
/**
- * Returns the value of field 'alignmentAnnotations'.
+ * Returns the value of field 'aligned'.
+ *
+ * @return boolean
+ * @return the value of field 'aligned'.
+ */
+ public boolean getAligned()
+ {
+ return this._aligned;
+ } //-- boolean getAligned()
+
+ /**
+ * 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()
+ {
+ 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 this._alignmentAnnotations;
- } //-- org.vamsas.objects.core.AlignmentAnnotations getAlignmentAnnotations()
+ return _alignmentAnnotationsList.size();
+ } //-- int getAlignmentAnnotationsCount()
/**
* Method getAlignmentSequence
} //-- int getAlignmentSequenceCount()
/**
+ * Returns the value of field 'gapChar'.
+ *
+ * @return String
+ * @return the value of field 'gapChar'.
+ */
+ public java.lang.String getGapChar()
+ {
+ return this._gapChar;
+ } //-- java.lang.String getGapChar()
+
+ /**
+ * 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()
+
+ /**
* Returns the value of field 'provenance'.
*
* @return Provenance
} //-- int getTreeCount()
/**
+ * Method hasAligned
+ *
+ *
+ *
+ * @return boolean
+ */
+ public boolean hasAligned()
+ {
+ return this._has_aligned;
+ } //-- boolean hasAligned()
+
+ /**
* Method isValid
*
*
} //-- 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
*
*/
} //-- org.vamsas.objects.core.Tree removeTree(int)
/**
- * Sets the value of field 'alignmentAnnotations'.
+ * Sets the value of field 'aligned'.
+ *
+ * @param aligned the value of field 'aligned'.
+ */
+ public void setAligned(boolean aligned)
+ {
+ this._aligned = aligned;
+ this._has_aligned = true;
+ } //-- void setAligned(boolean)
+
+ /**
+ * 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)
/**
} //-- void setAlignmentSequence(org.vamsas.objects.core.AlignmentSequence)
/**
+ * Sets the value of field 'gapChar'.
+ *
+ * @param gapChar the value of field 'gapChar'.
+ */
+ public void setGapChar(java.lang.String gapChar)
+ {
+ this._gapChar = gapChar;
+ } //-- void setGapChar(java.lang.String)
+
+ /**
+ * 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)
+
+ /**
* Sets the value of field 'provenance'.
*
* @param provenance the value of field 'provenance'.