--- listing properties --\r
-uk.ac.vamsas.objects.core.LockFile=uk.ac.vamsas.objects.core.LockFileDes...\r
-uk.ac.vamsas.objects.core.VamsasDocument=uk.ac.vamsas.objects.core.VamsasDocum...\r
+#Tue Apr 24 16:26:33 BST 2007\r
+uk.ac.vamsas.objects.core.SequenceType=uk.ac.vamsas.objects.core.descriptors.SequenceTypeDescriptor\r
+uk.ac.vamsas.objects.core.DbRef=uk.ac.vamsas.objects.core.descriptors.DbRefDescriptor\r
+uk.ac.vamsas.objects.core.Tree=uk.ac.vamsas.objects.core.descriptors.TreeDescriptor\r
+uk.ac.vamsas.objects.core.VAMSAS=uk.ac.vamsas.objects.core.descriptors.VAMSASDescriptor\r
+uk.ac.vamsas.objects.core.Mapping=uk.ac.vamsas.objects.core.descriptors.MappingDescriptor\r
+uk.ac.vamsas.objects.core.Glyph=uk.ac.vamsas.objects.core.descriptors.GlyphDescriptor\r
+uk.ac.vamsas.objects.core.DataSet=uk.ac.vamsas.objects.core.descriptors.DataSetDescriptor\r
+uk.ac.vamsas.objects.core.AnnotationElement=uk.ac.vamsas.objects.core.descriptors.AnnotationElementDescriptor\r
+uk.ac.vamsas.objects.core.Attachment=uk.ac.vamsas.objects.core.descriptors.AttachmentDescriptor\r
+uk.ac.vamsas.objects.core.Entry=uk.ac.vamsas.objects.core.descriptors.EntryDescriptor\r
+uk.ac.vamsas.objects.core.User=uk.ac.vamsas.objects.core.descriptors.UserDescriptor\r
+uk.ac.vamsas.objects.core.Provenance=uk.ac.vamsas.objects.core.descriptors.ProvenanceDescriptor\r
+uk.ac.vamsas.objects.core.RangeType=uk.ac.vamsas.objects.core.descriptors.RangeTypeDescriptor\r
+uk.ac.vamsas.objects.core.Newick=uk.ac.vamsas.objects.core.descriptors.NewickDescriptor\r
+uk.ac.vamsas.objects.core.ApplicationData=uk.ac.vamsas.objects.core.descriptors.ApplicationDataDescriptor\r
+uk.ac.vamsas.objects.core.Property=uk.ac.vamsas.objects.core.descriptors.PropertyDescriptor\r
+uk.ac.vamsas.objects.core.Instance=uk.ac.vamsas.objects.core.descriptors.InstanceDescriptor\r
+uk.ac.vamsas.objects.core.AlignmentAnnotation=uk.ac.vamsas.objects.core.descriptors.AlignmentAnnotationDescriptor\r
+uk.ac.vamsas.objects.core.LockFile=uk.ac.vamsas.objects.core.descriptors.LockFileDescriptor\r
+uk.ac.vamsas.objects.core.Common=uk.ac.vamsas.objects.core.descriptors.CommonDescriptor\r
+uk.ac.vamsas.objects.core.Map=uk.ac.vamsas.objects.core.descriptors.MapDescriptor\r
+uk.ac.vamsas.objects.core.RangeAnnotation=uk.ac.vamsas.objects.core.descriptors.RangeAnnotationDescriptor\r
+uk.ac.vamsas.objects.core.MapList=uk.ac.vamsas.objects.core.descriptors.MapListDescriptor\r
+uk.ac.vamsas.objects.core.Sequence=uk.ac.vamsas.objects.core.descriptors.SequenceDescriptor\r
+uk.ac.vamsas.objects.core.Pos=uk.ac.vamsas.objects.core.descriptors.PosDescriptor\r
+uk.ac.vamsas.objects.core.Alignment=uk.ac.vamsas.objects.core.descriptors.AlignmentDescriptor\r
+uk.ac.vamsas.objects.core.Seg=uk.ac.vamsas.objects.core.descriptors.SegDescriptor\r
+uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation=uk.ac.vamsas.objects.core.descriptors.AlignmentSequenceAnnotationDescriptor\r
+uk.ac.vamsas.objects.core.Score=uk.ac.vamsas.objects.core.descriptors.ScoreDescriptor\r
+uk.ac.vamsas.objects.core.DataSetAnnotations=uk.ac.vamsas.objects.core.descriptors.DataSetAnnotationsDescriptor\r
+uk.ac.vamsas.objects.core.Input=uk.ac.vamsas.objects.core.descriptors.InputDescriptor\r
+uk.ac.vamsas.objects.core.VamsasDocument=uk.ac.vamsas.objects.core.descriptors.VamsasDocumentDescriptor\r
+--=listing properties --\r
+uk.ac.vamsas.objects.core.AppData=uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor\r
+uk.ac.vamsas.objects.core.Param=uk.ac.vamsas.objects.core.descriptors.ParamDescriptor\r
+uk.ac.vamsas.objects.core.AlignmentSequence=uk.ac.vamsas.objects.core.descriptors.AlignmentSequenceDescriptor\r
+uk.ac.vamsas.objects.core.Link=uk.ac.vamsas.objects.core.descriptors.LinkDescriptor\r
/*
* 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 Alignment.
//--------------------------/
/**
- * Field _gapChar
+ * Field _gapChar.
*/
private java.lang.String _gapChar;
/**
- * Field _aligned
+ * Field _aligned.
*/
private boolean _aligned;
private java.lang.String _id;
/**
- * Field _modifiable
+ * Field _modifiable.
*/
private java.lang.String _modifiable;
private java.util.Vector _alignmentAnnotationList;
/**
- * Field _treeList
+ * Field _treeList.
*/
private java.util.Vector _treeList;
/**
- * Field _alignmentSequenceList
+ * Field _alignmentSequenceList.
*/
private java.util.Vector _alignmentSequenceList;
private java.util.Vector _propertyList;
/**
- * Field _provenance
+ * Field _provenance.
*/
private uk.ac.vamsas.objects.core.Provenance _provenance;
//- Constructors -/
//----------------/
- public Alignment()
- {
+ public Alignment() {
super();
- _alignmentAnnotationList = new Vector();
- _treeList = new Vector();
- _alignmentSequenceList = new Vector();
- _propertyList = new Vector();
- } //-- uk.ac.vamsas.objects.core.Alignment()
+ this._alignmentAnnotationList = new java.util.Vector();
+ this._treeList = new java.util.Vector();
+ this._alignmentSequenceList = new java.util.Vector();
+ this._propertyList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addAlignmentAnnotation
- *
*
*
* @param vAlignmentAnnotation
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addAlignmentAnnotation(uk.ac.vamsas.objects.core.AlignmentAnnotation vAlignmentAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- _alignmentAnnotationList.addElement(vAlignmentAnnotation);
- } //-- void addAlignmentAnnotation(uk.ac.vamsas.objects.core.AlignmentAnnotation)
+ public void addAlignmentAnnotation(
+ final uk.ac.vamsas.objects.core.AlignmentAnnotation vAlignmentAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ this._alignmentAnnotationList.addElement(vAlignmentAnnotation);
+ }
/**
- * Method addAlignmentAnnotation
- *
*
*
* @param index
* @param vAlignmentAnnotation
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addAlignmentAnnotation(int index, uk.ac.vamsas.objects.core.AlignmentAnnotation vAlignmentAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- _alignmentAnnotationList.insertElementAt(vAlignmentAnnotation, index);
- } //-- void addAlignmentAnnotation(int, uk.ac.vamsas.objects.core.AlignmentAnnotation)
+ public void addAlignmentAnnotation(
+ final int index,
+ final uk.ac.vamsas.objects.core.AlignmentAnnotation vAlignmentAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ this._alignmentAnnotationList.add(index, vAlignmentAnnotation);
+ }
/**
- * Method addAlignmentSequence
- *
*
*
* @param vAlignmentSequence
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addAlignmentSequence(uk.ac.vamsas.objects.core.AlignmentSequence vAlignmentSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- _alignmentSequenceList.addElement(vAlignmentSequence);
- } //-- void addAlignmentSequence(uk.ac.vamsas.objects.core.AlignmentSequence)
+ public void addAlignmentSequence(
+ final uk.ac.vamsas.objects.core.AlignmentSequence vAlignmentSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ this._alignmentSequenceList.addElement(vAlignmentSequence);
+ }
/**
- * Method addAlignmentSequence
- *
*
*
* @param index
* @param vAlignmentSequence
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addAlignmentSequence(int index, uk.ac.vamsas.objects.core.AlignmentSequence vAlignmentSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- _alignmentSequenceList.insertElementAt(vAlignmentSequence, index);
- } //-- void addAlignmentSequence(int, uk.ac.vamsas.objects.core.AlignmentSequence)
+ public void addAlignmentSequence(
+ final int index,
+ final uk.ac.vamsas.objects.core.AlignmentSequence vAlignmentSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ this._alignmentSequenceList.add(index, vAlignmentSequence);
+ }
/**
- * Method addProperty
- *
*
*
* @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addProperty(uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- _propertyList.addElement(vProperty);
- } //-- void addProperty(uk.ac.vamsas.objects.core.Property)
+ public void addProperty(
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.addElement(vProperty);
+ }
/**
- * Method addProperty
- *
*
*
* @param index
* @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- _propertyList.insertElementAt(vProperty, index);
- } //-- void addProperty(int, uk.ac.vamsas.objects.core.Property)
+ public void addProperty(
+ final int index,
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.add(index, vProperty);
+ }
/**
- * 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 deleteAligned
- *
*/
- public void deleteAligned()
- {
+ public void deleteAligned(
+ ) {
this._has_aligned= false;
- } //-- void deleteAligned()
+ }
/**
- * Method enumerateAlignmentAnnotation
- *
+ * Method enumerateAlignmentAnnotation.
*
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.AlignmentAnnotation elements
*/
- public java.util.Enumeration enumerateAlignmentAnnotation()
- {
- return _alignmentAnnotationList.elements();
- } //-- java.util.Enumeration enumerateAlignmentAnnotation()
+ public java.util.Enumeration enumerateAlignmentAnnotation(
+ ) {
+ return this._alignmentAnnotationList.elements();
+ }
/**
- * Method enumerateAlignmentSequence
- *
- *
+ * Method enumerateAlignmentSequence.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.AlignmentSequence elements
*/
- public java.util.Enumeration enumerateAlignmentSequence()
- {
- return _alignmentSequenceList.elements();
- } //-- java.util.Enumeration enumerateAlignmentSequence()
+ public java.util.Enumeration enumerateAlignmentSequence(
+ ) {
+ return this._alignmentSequenceList.elements();
+ }
/**
- * Method enumerateProperty
- *
- *
+ * Method enumerateProperty.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Property elements
*/
- public java.util.Enumeration enumerateProperty()
- {
- return _propertyList.elements();
- } //-- java.util.Enumeration enumerateProperty()
+ public java.util.Enumeration enumerateProperty(
+ ) {
+ return this._propertyList.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)
+ }
/**
* Returns the value of field 'aligned'.
*
- * @return boolean
- * @return the value of field 'aligned'.
+ * @return the value of field 'Aligned'.
*/
- public boolean getAligned()
- {
+ public boolean getAligned(
+ ) {
return this._aligned;
- } //-- boolean getAligned()
+ }
/**
- * Method getAlignmentAnnotation
- *
- *
+ * Method getAlignmentAnnotation.
*
* @param index
- * @return AlignmentAnnotation
- */
- public uk.ac.vamsas.objects.core.AlignmentAnnotation getAlignmentAnnotation(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _alignmentAnnotationList.size())) {
- throw new IndexOutOfBoundsException("getAlignmentAnnotation: Index value '"+index+"' not in range [0.."+_alignmentAnnotationList.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.AlignmentAnnotation at the given
+ * index
+ */
+ public uk.ac.vamsas.objects.core.AlignmentAnnotation getAlignmentAnnotation(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentAnnotationList.size()) {
+ throw new IndexOutOfBoundsException("getAlignmentAnnotation: Index value '" + index + "' not in range [0.." + (this._alignmentAnnotationList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.AlignmentAnnotation) _alignmentAnnotationList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.AlignmentAnnotation getAlignmentAnnotation(int)
+ return (uk.ac.vamsas.objects.core.AlignmentAnnotation) _alignmentAnnotationList.get(index);
+ }
/**
- * Method getAlignmentAnnotation
- *
+ * Method getAlignmentAnnotation.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 AlignmentAnnotation
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.AlignmentAnnotation[] getAlignmentAnnotation()
- {
- int size = _alignmentAnnotationList.size();
- uk.ac.vamsas.objects.core.AlignmentAnnotation[] mArray = new uk.ac.vamsas.objects.core.AlignmentAnnotation[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.AlignmentAnnotation) _alignmentAnnotationList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.AlignmentAnnotation[] getAlignmentAnnotation()
+ public uk.ac.vamsas.objects.core.AlignmentAnnotation[] getAlignmentAnnotation(
+ ) {
+ uk.ac.vamsas.objects.core.AlignmentAnnotation[] array = new uk.ac.vamsas.objects.core.AlignmentAnnotation[0];
+ return (uk.ac.vamsas.objects.core.AlignmentAnnotation[]) this._alignmentAnnotationList.toArray(array);
+ }
/**
- * Method getAlignmentAnnotationCount
- *
+ * Method getAlignmentAnnotationAsReference.Returns a reference
+ * to '_alignmentAnnotationList'. No type checking is performed
+ * on any modifications to the Vector.
*
- *
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getAlignmentAnnotationCount()
- {
- return _alignmentAnnotationList.size();
- } //-- int getAlignmentAnnotationCount()
+ public java.util.Vector getAlignmentAnnotationAsReference(
+ ) {
+ return this._alignmentAnnotationList;
+ }
/**
- * Method getAlignmentSequence
- *
+ * Method getAlignmentAnnotationCount.
*
+ * @return the size of this collection
+ */
+ public int getAlignmentAnnotationCount(
+ ) {
+ return this._alignmentAnnotationList.size();
+ }
+
+ /**
+ * Method getAlignmentSequence.
*
* @param index
- * @return AlignmentSequence
- */
- public uk.ac.vamsas.objects.core.AlignmentSequence getAlignmentSequence(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _alignmentSequenceList.size())) {
- throw new IndexOutOfBoundsException("getAlignmentSequence: Index value '"+index+"' not in range [0.."+_alignmentSequenceList.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.AlignmentSequence at the given inde
+ */
+ public uk.ac.vamsas.objects.core.AlignmentSequence getAlignmentSequence(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentSequenceList.size()) {
+ throw new IndexOutOfBoundsException("getAlignmentSequence: Index value '" + index + "' not in range [0.." + (this._alignmentSequenceList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.AlignmentSequence) _alignmentSequenceList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.AlignmentSequence getAlignmentSequence(int)
+ return (uk.ac.vamsas.objects.core.AlignmentSequence) _alignmentSequenceList.get(index);
+ }
/**
- * Method getAlignmentSequence
- *
- *
+ * Method getAlignmentSequence.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 AlignmentSequence
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.AlignmentSequence[] getAlignmentSequence()
- {
- int size = _alignmentSequenceList.size();
- uk.ac.vamsas.objects.core.AlignmentSequence[] mArray = new uk.ac.vamsas.objects.core.AlignmentSequence[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.AlignmentSequence) _alignmentSequenceList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.AlignmentSequence[] getAlignmentSequence()
+ public uk.ac.vamsas.objects.core.AlignmentSequence[] getAlignmentSequence(
+ ) {
+ uk.ac.vamsas.objects.core.AlignmentSequence[] array = new uk.ac.vamsas.objects.core.AlignmentSequence[0];
+ return (uk.ac.vamsas.objects.core.AlignmentSequence[]) this._alignmentSequenceList.toArray(array);
+ }
/**
- * Method getAlignmentSequenceCount
- *
+ * Method getAlignmentSequenceAsReference.Returns a reference
+ * to '_alignmentSequenceList'. No type checking is performed
+ * on any modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getAlignmentSequenceAsReference(
+ ) {
+ return this._alignmentSequenceList;
+ }
+
+ /**
+ * Method getAlignmentSequenceCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getAlignmentSequenceCount()
- {
- return _alignmentSequenceList.size();
- } //-- int getAlignmentSequenceCount()
+ public int getAlignmentSequenceCount(
+ ) {
+ return this._alignmentSequenceList.size();
+ }
/**
* Returns the value of field 'gapChar'.
*
- * @return String
- * @return the value of field 'gapChar'.
+ * @return the value of field 'GapChar'.
*/
- public java.lang.String getGapChar()
- {
+ public java.lang.String getGapChar(
+ ) {
return this._gapChar;
- } //-- java.lang.String getGapChar()
+ }
/**
* Returns the value of field 'id'. The field 'id' has the
* 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 'modifiable'.
*
- * @return String
- * @return the value of field 'modifiable'.
+ * @return the value of field 'Modifiable'.
*/
- public java.lang.String getModifiable()
- {
+ public java.lang.String getModifiable(
+ ) {
return this._modifiable;
- } //-- java.lang.String getModifiable()
+ }
/**
- * Method getProperty
- *
- *
+ * Method getProperty.
*
* @param index
- * @return Property
- */
- public uk.ac.vamsas.objects.core.Property getProperty(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _propertyList.size())) {
- throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.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.Property
+ * at the given index
+ */
+ public uk.ac.vamsas.objects.core.Property getProperty(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Property getProperty(int)
+ return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);
+ }
/**
- * Method getProperty
- *
+ * Method getProperty.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 Property
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Property[] getProperty()
- {
- int size = _propertyList.size();
- uk.ac.vamsas.objects.core.Property[] mArray = new uk.ac.vamsas.objects.core.Property[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Property[] getProperty()
+ public uk.ac.vamsas.objects.core.Property[] getProperty(
+ ) {
+ uk.ac.vamsas.objects.core.Property[] array = new uk.ac.vamsas.objects.core.Property[0];
+ return (uk.ac.vamsas.objects.core.Property[]) this._propertyList.toArray(array);
+ }
/**
- * Method getPropertyCount
- *
+ * Method getPropertyAsReference.Returns a reference to
+ * '_propertyList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getPropertyAsReference(
+ ) {
+ return this._propertyList;
+ }
+
+ /**
+ * Method getPropertyCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getPropertyCount()
- {
- return _propertyList.size();
- } //-- int getPropertyCount()
+ public int getPropertyCount(
+ ) {
+ return this._propertyList.size();
+ }
/**
* 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 getTree
- *
- *
+ * 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 hasAligned
- *
+ * Method getTreeCount.
*
+ * @return the size of this collection
+ */
+ public int getTreeCount(
+ ) {
+ return this._treeList.size();
+ }
+
+ /**
+ * Method hasAligned.
*
- * @return boolean
+ * @return true if at least one Aligned has been added
*/
- public boolean hasAligned()
- {
+ public boolean hasAligned(
+ ) {
return this._has_aligned;
- } //-- boolean hasAligned()
+ }
/**
- * Method isValid
+ * 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 (_gapChar != null) {
+ result = 37 * result + _gapChar.hashCode();
+ }
+ result = 37 * result + (_aligned?0:1);
+ if (_id != null) {
+ result = 37 * result + _id.hashCode();
+ }
+ if (_modifiable != null) {
+ result = 37 * result + _modifiable.hashCode();
+ }
+ if (_alignmentAnnotationList != null) {
+ result = 37 * result + _alignmentAnnotationList.hashCode();
+ }
+ if (_treeList != null) {
+ result = 37 * result + _treeList.hashCode();
+ }
+ if (_alignmentSequenceList != null) {
+ result = 37 * result + _alignmentSequenceList.hashCode();
+ }
+ if (_propertyList != null) {
+ result = 37 * result + _propertyList.hashCode();
+ }
+ if (_provenance != null) {
+ result = 37 * result + _provenance.hashCode();
+ }
+
+ return result;
+ }
+
+ /**
+ * Returns the value of field 'aligned'.
*
+ * @return the value of field 'Aligned'.
+ */
+ public boolean isAligned(
+ ) {
+ return this._aligned;
+ }
+
+ /**
+ * 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
- */
- public void marshal(java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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
- */
- public void marshal(org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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 removeAlignmentAnnotation
- *
+ * Method removeAlignmentAnnotation.
*
+ * @param vAlignmentAnnotation
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAlignmentAnnotation(
+ final uk.ac.vamsas.objects.core.AlignmentAnnotation vAlignmentAnnotation) {
+ boolean removed = _alignmentAnnotationList.remove(vAlignmentAnnotation);
+ return removed;
+ }
+
+ /**
+ * Method removeAlignmentAnnotationAt.
*
* @param index
- * @return AlignmentAnnotation
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.AlignmentAnnotation removeAlignmentAnnotation(int index)
- {
- java.lang.Object obj = _alignmentAnnotationList.elementAt(index);
- _alignmentAnnotationList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.AlignmentAnnotation removeAlignmentAnnotationAt(
+ final int index) {
+ java.lang.Object obj = this._alignmentAnnotationList.remove(index);
return (uk.ac.vamsas.objects.core.AlignmentAnnotation) obj;
- } //-- uk.ac.vamsas.objects.core.AlignmentAnnotation removeAlignmentAnnotation(int)
+ }
/**
- * Method removeAlignmentSequence
- *
+ * Method removeAlignmentSequence.
*
+ * @param vAlignmentSequence
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAlignmentSequence(
+ final uk.ac.vamsas.objects.core.AlignmentSequence vAlignmentSequence) {
+ boolean removed = _alignmentSequenceList.remove(vAlignmentSequence);
+ return removed;
+ }
+
+ /**
+ * Method removeAlignmentSequenceAt.
*
* @param index
- * @return AlignmentSequence
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.AlignmentSequence removeAlignmentSequence(int index)
- {
- java.lang.Object obj = _alignmentSequenceList.elementAt(index);
- _alignmentSequenceList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.AlignmentSequence removeAlignmentSequenceAt(
+ final int index) {
+ java.lang.Object obj = this._alignmentSequenceList.remove(index);
return (uk.ac.vamsas.objects.core.AlignmentSequence) obj;
- } //-- uk.ac.vamsas.objects.core.AlignmentSequence removeAlignmentSequence(int)
+ }
/**
- * Method removeAllAlignmentAnnotation
- *
*/
- public void removeAllAlignmentAnnotation()
- {
- _alignmentAnnotationList.removeAllElements();
- } //-- void removeAllAlignmentAnnotation()
+ public void removeAllAlignmentAnnotation(
+ ) {
+ this._alignmentAnnotationList.clear();
+ }
/**
- * Method removeAllAlignmentSequence
- *
*/
- public void removeAllAlignmentSequence()
- {
- _alignmentSequenceList.removeAllElements();
- } //-- void removeAllAlignmentSequence()
+ public void removeAllAlignmentSequence(
+ ) {
+ this._alignmentSequenceList.clear();
+ }
/**
- * Method removeAllProperty
- *
*/
- public void removeAllProperty()
- {
- _propertyList.removeAllElements();
- } //-- void removeAllProperty()
+ public void removeAllProperty(
+ ) {
+ this._propertyList.clear();
+ }
/**
- * Method removeAllTree
- *
*/
- public void removeAllTree()
- {
- _treeList.removeAllElements();
- } //-- void removeAllTree()
+ public void removeAllTree(
+ ) {
+ this._treeList.clear();
+ }
/**
- * Method removeProperty
- *
+ * Method removeProperty.
*
+ * @param vProperty
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeProperty(
+ final uk.ac.vamsas.objects.core.Property vProperty) {
+ boolean removed = _propertyList.remove(vProperty);
+ return removed;
+ }
+
+ /**
+ * Method removePropertyAt.
*
* @param index
- * @return Property
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Property removeProperty(int index)
- {
- java.lang.Object obj = _propertyList.elementAt(index);
- _propertyList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Property removePropertyAt(
+ final int index) {
+ java.lang.Object obj = this._propertyList.remove(index);
return (uk.ac.vamsas.objects.core.Property) obj;
- } //-- uk.ac.vamsas.objects.core.Property removeProperty(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)
+ }
/**
* Sets the value of field 'aligned'.
*
* @param aligned the value of field 'aligned'.
*/
- public void setAligned(boolean aligned)
- {
+ public void setAligned(
+ final boolean aligned) {
this._aligned = aligned;
this._has_aligned = true;
- } //-- void setAligned(boolean)
+ }
/**
- * Method setAlignmentAnnotation
- *
*
*
* @param index
* @param vAlignmentAnnotation
- */
- public void setAlignmentAnnotation(int index, uk.ac.vamsas.objects.core.AlignmentAnnotation vAlignmentAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _alignmentAnnotationList.size())) {
- throw new IndexOutOfBoundsException("setAlignmentAnnotation: Index value '"+index+"' not in range [0.."+_alignmentAnnotationList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setAlignmentAnnotation(
+ final int index,
+ final uk.ac.vamsas.objects.core.AlignmentAnnotation vAlignmentAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentAnnotationList.size()) {
+ throw new IndexOutOfBoundsException("setAlignmentAnnotation: Index value '" + index + "' not in range [0.." + (this._alignmentAnnotationList.size() - 1) + "]");
}
- _alignmentAnnotationList.setElementAt(vAlignmentAnnotation, index);
- } //-- void setAlignmentAnnotation(int, uk.ac.vamsas.objects.core.AlignmentAnnotation)
+
+ this._alignmentAnnotationList.set(index, vAlignmentAnnotation);
+ }
/**
- * Method setAlignmentAnnotation
*
*
- *
- * @param alignmentAnnotationArray
+ * @param vAlignmentAnnotationArray
*/
- public void setAlignmentAnnotation(uk.ac.vamsas.objects.core.AlignmentAnnotation[] alignmentAnnotationArray)
- {
+ public void setAlignmentAnnotation(
+ final uk.ac.vamsas.objects.core.AlignmentAnnotation[] vAlignmentAnnotationArray) {
//-- copy array
- _alignmentAnnotationList.removeAllElements();
- for (int i = 0; i < alignmentAnnotationArray.length; i++) {
- _alignmentAnnotationList.addElement(alignmentAnnotationArray[i]);
+ _alignmentAnnotationList.clear();
+
+ for (int i = 0; i < vAlignmentAnnotationArray.length; i++) {
+ this._alignmentAnnotationList.add(vAlignmentAnnotationArray[i]);
}
- } //-- void setAlignmentAnnotation(uk.ac.vamsas.objects.core.AlignmentAnnotation)
+ }
/**
- * Method setAlignmentSequence
+ * Sets the value of '_alignmentAnnotationList' by copying the
+ * given Vector. All elements will be checked for type safety.
*
+ * @param vAlignmentAnnotationList the Vector to copy.
+ */
+ public void setAlignmentAnnotation(
+ final java.util.Vector vAlignmentAnnotationList) {
+ // copy vector
+ this._alignmentAnnotationList.clear();
+
+ this._alignmentAnnotationList.addAll(vAlignmentAnnotationList);
+ }
+
+ /**
+ * Sets the value of '_alignmentAnnotationList' by setting it
+ * to the given Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param alignmentAnnotationVector the Vector to set.
+ */
+ public void setAlignmentAnnotationAsReference(
+ final java.util.Vector alignmentAnnotationVector) {
+ this._alignmentAnnotationList = alignmentAnnotationVector;
+ }
+
+ /**
*
*
* @param index
* @param vAlignmentSequence
- */
- public void setAlignmentSequence(int index, uk.ac.vamsas.objects.core.AlignmentSequence vAlignmentSequence)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _alignmentSequenceList.size())) {
- throw new IndexOutOfBoundsException("setAlignmentSequence: Index value '"+index+"' not in range [0.."+_alignmentSequenceList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setAlignmentSequence(
+ final int index,
+ final uk.ac.vamsas.objects.core.AlignmentSequence vAlignmentSequence)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentSequenceList.size()) {
+ throw new IndexOutOfBoundsException("setAlignmentSequence: Index value '" + index + "' not in range [0.." + (this._alignmentSequenceList.size() - 1) + "]");
}
- _alignmentSequenceList.setElementAt(vAlignmentSequence, index);
- } //-- void setAlignmentSequence(int, uk.ac.vamsas.objects.core.AlignmentSequence)
+
+ this._alignmentSequenceList.set(index, vAlignmentSequence);
+ }
/**
- * Method setAlignmentSequence
*
*
- *
- * @param alignmentSequenceArray
+ * @param vAlignmentSequenceArray
*/
- public void setAlignmentSequence(uk.ac.vamsas.objects.core.AlignmentSequence[] alignmentSequenceArray)
- {
+ public void setAlignmentSequence(
+ final uk.ac.vamsas.objects.core.AlignmentSequence[] vAlignmentSequenceArray) {
//-- copy array
- _alignmentSequenceList.removeAllElements();
- for (int i = 0; i < alignmentSequenceArray.length; i++) {
- _alignmentSequenceList.addElement(alignmentSequenceArray[i]);
+ _alignmentSequenceList.clear();
+
+ for (int i = 0; i < vAlignmentSequenceArray.length; i++) {
+ this._alignmentSequenceList.add(vAlignmentSequenceArray[i]);
}
- } //-- void setAlignmentSequence(uk.ac.vamsas.objects.core.AlignmentSequence)
+ }
+
+ /**
+ * Sets the value of '_alignmentSequenceList' by copying the
+ * given Vector. All elements will be checked for type safety.
+ *
+ * @param vAlignmentSequenceList the Vector to copy.
+ */
+ public void setAlignmentSequence(
+ final java.util.Vector vAlignmentSequenceList) {
+ // copy vector
+ this._alignmentSequenceList.clear();
+
+ this._alignmentSequenceList.addAll(vAlignmentSequenceList);
+ }
+
+ /**
+ * Sets the value of '_alignmentSequenceList' by setting it to
+ * the given Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param alignmentSequenceVector the Vector to set.
+ */
+ public void setAlignmentSequenceAsReference(
+ final java.util.Vector alignmentSequenceVector) {
+ this._alignmentSequenceList = alignmentSequenceVector;
+ }
/**
* Sets the value of field 'gapChar'.
*
* @param gapChar the value of field 'gapChar'.
*/
- public void setGapChar(java.lang.String gapChar)
- {
+ public void setGapChar(
+ final java.lang.String gapChar) {
this._gapChar = gapChar;
- } //-- void setGapChar(java.lang.String)
+ }
/**
* 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 'modifiable'.
*
* @param modifiable the value of field 'modifiable'.
*/
- public void setModifiable(java.lang.String modifiable)
- {
+ public void setModifiable(
+ final java.lang.String modifiable) {
this._modifiable = modifiable;
- } //-- void setModifiable(java.lang.String)
+ }
/**
- * Method setProperty
- *
*
*
* @param index
* @param vProperty
- */
- public void setProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _propertyList.size())) {
- throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setProperty(
+ final int index,
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
}
- _propertyList.setElementAt(vProperty, index);
- } //-- void setProperty(int, uk.ac.vamsas.objects.core.Property)
+
+ this._propertyList.set(index, vProperty);
+ }
/**
- * Method setProperty
- *
*
*
- * @param propertyArray
+ * @param vPropertyArray
*/
- public void setProperty(uk.ac.vamsas.objects.core.Property[] propertyArray)
- {
+ public void setProperty(
+ final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {
//-- copy array
- _propertyList.removeAllElements();
- for (int i = 0; i < propertyArray.length; i++) {
- _propertyList.addElement(propertyArray[i]);
+ _propertyList.clear();
+
+ for (int i = 0; i < vPropertyArray.length; i++) {
+ this._propertyList.add(vPropertyArray[i]);
}
- } //-- void setProperty(uk.ac.vamsas.objects.core.Property)
+ }
+
+ /**
+ * Sets the value of '_propertyList' by copying the given
+ * Vector. All elements will be checked for type safety.
+ *
+ * @param vPropertyList the Vector to copy.
+ */
+ public void setProperty(
+ final java.util.Vector vPropertyList) {
+ // copy vector
+ this._propertyList.clear();
+
+ this._propertyList.addAll(vPropertyList);
+ }
+
+ /**
+ * Sets the value of '_propertyList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param propertyVector the Vector to set.
+ */
+ public void setPropertyAsReference(
+ final java.util.Vector propertyVector) {
+ this._propertyList = propertyVector;
+ }
/**
* 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 setTree
- *
*
*
* @param index
* @param vTree
- */
- 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()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ 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 Alignment
- */
- public static uk.ac.vamsas.objects.core.Alignment unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ * @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.Alignment
+ */
+ public static uk.ac.vamsas.objects.core.Alignment unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.Alignment) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Alignment.class, reader);
- } //-- uk.ac.vamsas.objects.core.Alignment 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()
+ }
}
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* This is annotation over the coordinate frame\r
private boolean _has_graph;\r
\r
/**\r
- * Field _provenance\r
+ * Field _provenance.\r
*/\r
private uk.ac.vamsas.objects.core.Provenance _provenance;\r
\r
//- Constructors -/\r
//----------------/\r
\r
- public AlignmentAnnotation() \r
- {\r
+ public AlignmentAnnotation() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.AlignmentAnnotation()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Method deleteGraph\r
- * \r
*/\r
- public void deleteGraph()\r
- {\r
+ public void deleteGraph(\r
+ ) {\r
this._has_graph= false;\r
- } //-- void deleteGraph() \r
+ }\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'graph'. The field 'graph' has\r
* the annotationElement values together form a\r
* graph \r
* \r
- * @return boolean\r
- * @return the value of field 'graph'.\r
+ * @return the value of field 'Graph'.\r
*/\r
- public boolean getGraph()\r
- {\r
+ public boolean getGraph(\r
+ ) {\r
return this._graph;\r
- } //-- boolean getGraph() \r
+ }\r
\r
/**\r
* Returns the value of field 'provenance'.\r
* \r
- * @return Provenance\r
- * @return the value of field 'provenance'.\r
+ * @return the value of field 'Provenance'.\r
*/\r
- public uk.ac.vamsas.objects.core.Provenance getProvenance()\r
- {\r
+ public uk.ac.vamsas.objects.core.Provenance getProvenance(\r
+ ) {\r
return this._provenance;\r
- } //-- uk.ac.vamsas.objects.core.Provenance getProvenance() \r
+ }\r
\r
/**\r
- * Method hasGraph\r
- * \r
+ * Method hasGraph.\r
* \r
- * \r
- * @return boolean\r
+ * @return true if at least one Graph has been added\r
*/\r
- public boolean hasGraph()\r
- {\r
+ public boolean hasGraph(\r
+ ) {\r
return this._has_graph;\r
- } //-- boolean hasGraph() \r
+ }\r
\r
/**\r
- * Method isValid\r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ result = 37 * result + (_graph?0:1);\r
+ if (_provenance != null) {\r
+ result = 37 * result + _provenance.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'graph'. The field 'graph' has\r
+ * the following description: TODO: decide if this flag is\r
+ * redundant - when true it would suggest that\r
+ * the annotationElement values together form a\r
+ * graph \r
* \r
+ * @return the value of field 'Graph'.\r
+ */\r
+ public boolean isGraph(\r
+ ) {\r
+ return this._graph;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'graph'. The field 'graph' has the\r
* \r
* @param graph the value of field 'graph'.\r
*/\r
- public void setGraph(boolean graph)\r
- {\r
+ public void setGraph(\r
+ final boolean graph) {\r
this._graph = graph;\r
this._has_graph = true;\r
- } //-- void setGraph(boolean) \r
+ }\r
\r
/**\r
* Sets the value of field 'provenance'.\r
* \r
* @param provenance the value of field 'provenance'.\r
*/\r
- public void setProvenance(uk.ac.vamsas.objects.core.Provenance provenance)\r
- {\r
+ public void setProvenance(\r
+ final uk.ac.vamsas.objects.core.Provenance provenance) {\r
this._provenance = provenance;\r
- } //-- void setProvenance(uk.ac.vamsas.objects.core.Provenance) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return RangeType\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType\r
*/\r
- public static uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- return (uk.ac.vamsas.objects.core.AlignmentAnnotation) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AlignmentAnnotation.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader) \r
+ public static uk.ac.vamsas.objects.core.RangeType unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+ return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AlignmentAnnotation.class, reader);\r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*
* 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 AlignmentSequence.
private java.lang.Object _refid;
/**
- * Field _alignmentSequenceAnnotationList
+ * Field _alignmentSequenceAnnotationList.
*/
private java.util.Vector _alignmentSequenceAnnotationList;
//- Constructors -/
//----------------/
- public AlignmentSequence()
- {
+ public AlignmentSequence() {
super();
- _alignmentSequenceAnnotationList = new Vector();
- } //-- uk.ac.vamsas.objects.core.AlignmentSequence()
+ this._alignmentSequenceAnnotationList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addAlignmentSequenceAnnotation
- *
*
*
* @param vAlignmentSequenceAnnotation
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addAlignmentSequenceAnnotation(uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation vAlignmentSequenceAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- _alignmentSequenceAnnotationList.addElement(vAlignmentSequenceAnnotation);
- } //-- void addAlignmentSequenceAnnotation(uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation)
+ public void addAlignmentSequenceAnnotation(
+ final uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation vAlignmentSequenceAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ this._alignmentSequenceAnnotationList.addElement(vAlignmentSequenceAnnotation);
+ }
/**
- * Method addAlignmentSequenceAnnotation
- *
*
*
* @param index
* @param vAlignmentSequenceAnnotation
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addAlignmentSequenceAnnotation(int index, uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation vAlignmentSequenceAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- _alignmentSequenceAnnotationList.insertElementAt(vAlignmentSequenceAnnotation, index);
- } //-- void addAlignmentSequenceAnnotation(int, uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation)
+ public void addAlignmentSequenceAnnotation(
+ final int index,
+ final uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation vAlignmentSequenceAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ this._alignmentSequenceAnnotationList.add(index, vAlignmentSequenceAnnotation);
+ }
/**
- * Method enumerateAlignmentSequenceAnnotation
- *
- *
+ * Method enumerateAlignmentSequenceAnnotation.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation element
*/
- public java.util.Enumeration enumerateAlignmentSequenceAnnotation()
- {
- return _alignmentSequenceAnnotationList.elements();
- } //-- java.util.Enumeration enumerateAlignmentSequenceAnnotation()
+ public java.util.Enumeration enumerateAlignmentSequenceAnnotation(
+ ) {
+ return this._alignmentSequenceAnnotationList.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 getAlignmentSequenceAnnotation
- *
- *
+ * Method getAlignmentSequenceAnnotation.
*
* @param index
- * @return AlignmentSequenceAnnotation
+ * @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.AlignmentSequenceAnnotation at the
+ * given index
*/
- public uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation getAlignmentSequenceAnnotation(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _alignmentSequenceAnnotationList.size())) {
- throw new IndexOutOfBoundsException("getAlignmentSequenceAnnotation: Index value '"+index+"' not in range [0.."+_alignmentSequenceAnnotationList.size()+ "]");
+ public uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation getAlignmentSequenceAnnotation(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentSequenceAnnotationList.size()) {
+ throw new IndexOutOfBoundsException("getAlignmentSequenceAnnotation: Index value '" + index + "' not in range [0.." + (this._alignmentSequenceAnnotationList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation) _alignmentSequenceAnnotationList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation getAlignmentSequenceAnnotation(int)
+ return (uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation) _alignmentSequenceAnnotationList.get(index);
+ }
/**
- * Method getAlignmentSequenceAnnotation
- *
- *
- *
- * @return AlignmentSequenceAnnotation
+ * Method getAlignmentSequenceAnnotation.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.AlignmentSequenceAnnotation[] getAlignmentSequenceAnnotation()
- {
- int size = _alignmentSequenceAnnotationList.size();
- uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation[] mArray = new uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation) _alignmentSequenceAnnotationList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation[] getAlignmentSequenceAnnotation()
+ public uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation[] getAlignmentSequenceAnnotation(
+ ) {
+ uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation[] array = new uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation[0];
+ return (uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation[]) this._alignmentSequenceAnnotationList.toArray(array);
+ }
/**
- * Method getAlignmentSequenceAnnotationCount
- *
+ * Method getAlignmentSequenceAnnotationAsReference.Returns a
+ * reference to '_alignmentSequenceAnnotationList'. No type
+ * checking is performed on any modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getAlignmentSequenceAnnotationAsReference(
+ ) {
+ return this._alignmentSequenceAnnotationList;
+ }
+
+ /**
+ * Method getAlignmentSequenceAnnotationCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getAlignmentSequenceAnnotationCount()
- {
- return _alignmentSequenceAnnotationList.size();
- } //-- int getAlignmentSequenceAnnotationCount()
+ public int getAlignmentSequenceAnnotationCount(
+ ) {
+ return this._alignmentSequenceAnnotationList.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 'refid'. The field 'refid' has
* this alignment sequence is taken from
*
*
- * @return Object
- * @return the value of field 'refid'.
+ * @return the value of field 'Refid'.
*/
- public java.lang.Object getRefid()
- {
+ public java.lang.Object getRefid(
+ ) {
return this._refid;
- } //-- java.lang.Object getRefid()
+ }
/**
- * Method isValid
- *
+ * 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 (_refid != null) {
+ result = 37 * result + _refid.hashCode();
+ }
+ if (_alignmentSequenceAnnotationList != null) {
+ result = 37 * result + _alignmentSequenceAnnotationList.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 removeAlignmentSequenceAnnotation
- *
+ * Method removeAlignmentSequenceAnnotation.
*
+ * @param vAlignmentSequenceAnnotation
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAlignmentSequenceAnnotation(
+ final uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation vAlignmentSequenceAnnotation) {
+ boolean removed = _alignmentSequenceAnnotationList.remove(vAlignmentSequenceAnnotation);
+ return removed;
+ }
+
+ /**
+ * Method removeAlignmentSequenceAnnotationAt.
*
* @param index
- * @return AlignmentSequenceAnnotation
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation removeAlignmentSequenceAnnotation(int index)
- {
- java.lang.Object obj = _alignmentSequenceAnnotationList.elementAt(index);
- _alignmentSequenceAnnotationList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation removeAlignmentSequenceAnnotationAt(
+ final int index) {
+ java.lang.Object obj = this._alignmentSequenceAnnotationList.remove(index);
return (uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation) obj;
- } //-- uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation removeAlignmentSequenceAnnotation(int)
+ }
/**
- * Method removeAllAlignmentSequenceAnnotation
- *
*/
- public void removeAllAlignmentSequenceAnnotation()
- {
- _alignmentSequenceAnnotationList.removeAllElements();
- } //-- void removeAllAlignmentSequenceAnnotation()
+ public void removeAllAlignmentSequenceAnnotation(
+ ) {
+ this._alignmentSequenceAnnotationList.clear();
+ }
/**
- * Method setAlignmentSequenceAnnotation
- *
*
*
* @param index
* @param vAlignmentSequenceAnnotation
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void setAlignmentSequenceAnnotation(int index, uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation vAlignmentSequenceAnnotation)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _alignmentSequenceAnnotationList.size())) {
- throw new IndexOutOfBoundsException("setAlignmentSequenceAnnotation: Index value '"+index+"' not in range [0.."+_alignmentSequenceAnnotationList.size()+ "]");
+ public void setAlignmentSequenceAnnotation(
+ final int index,
+ final uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation vAlignmentSequenceAnnotation)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._alignmentSequenceAnnotationList.size()) {
+ throw new IndexOutOfBoundsException("setAlignmentSequenceAnnotation: Index value '" + index + "' not in range [0.." + (this._alignmentSequenceAnnotationList.size() - 1) + "]");
}
- _alignmentSequenceAnnotationList.setElementAt(vAlignmentSequenceAnnotation, index);
- } //-- void setAlignmentSequenceAnnotation(int, uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation)
+
+ this._alignmentSequenceAnnotationList.set(index, vAlignmentSequenceAnnotation);
+ }
/**
- * Method setAlignmentSequenceAnnotation
- *
*
*
- * @param alignmentSequenceAnnotationArray
+ * @param vAlignmentSequenceAnnotationArray
*/
- public void setAlignmentSequenceAnnotation(uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation[] alignmentSequenceAnnotationArray)
- {
+ public void setAlignmentSequenceAnnotation(
+ final uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation[] vAlignmentSequenceAnnotationArray) {
//-- copy array
- _alignmentSequenceAnnotationList.removeAllElements();
- for (int i = 0; i < alignmentSequenceAnnotationArray.length; i++) {
- _alignmentSequenceAnnotationList.addElement(alignmentSequenceAnnotationArray[i]);
+ _alignmentSequenceAnnotationList.clear();
+
+ for (int i = 0; i < vAlignmentSequenceAnnotationArray.length; i++) {
+ this._alignmentSequenceAnnotationList.add(vAlignmentSequenceAnnotationArray[i]);
}
- } //-- void setAlignmentSequenceAnnotation(uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation)
+ }
+
+ /**
+ * Sets the value of '_alignmentSequenceAnnotationList' by
+ * copying the given Vector. All elements will be checked for
+ * type safety.
+ *
+ * @param vAlignmentSequenceAnnotationList the Vector to copy.
+ */
+ public void setAlignmentSequenceAnnotation(
+ final java.util.Vector vAlignmentSequenceAnnotationList) {
+ // copy vector
+ this._alignmentSequenceAnnotationList.clear();
+
+ this._alignmentSequenceAnnotationList.addAll(vAlignmentSequenceAnnotationList);
+ }
+
+ /**
+ * Sets the value of '_alignmentSequenceAnnotationList' by
+ * setting it to the given Vector. No type checking is
+ * performed.
+ * @deprecated
+ *
+ * @param alignmentSequenceAnnotationVector the Vector to set.
+ */
+ public void setAlignmentSequenceAnnotationAsReference(
+ final java.util.Vector alignmentSequenceAnnotationVector) {
+ this._alignmentSequenceAnnotationList = alignmentSequenceAnnotationVector;
+ }
/**
* 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 'refid'. The field 'refid' has the
*
* @param refid the value of field 'refid'.
*/
- public void setRefid(java.lang.Object refid)
- {
+ public void setRefid(
+ final java.lang.Object refid) {
this._refid = refid;
- } //-- void setRefid(java.lang.Object)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return SequenceType
+ * @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.SequenceTyp
*/
- public static uk.ac.vamsas.objects.core.SequenceType unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
- return (uk.ac.vamsas.objects.core.AlignmentSequence) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AlignmentSequence.class, reader);
- } //-- uk.ac.vamsas.objects.core.SequenceType unmarshal(java.io.Reader)
+ public static uk.ac.vamsas.objects.core.SequenceType unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (uk.ac.vamsas.objects.core.SequenceType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AlignmentSequence.class, 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()
+ }
}
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Class AlignmentSequenceAnnotation.\r
private boolean _has_graph;\r
\r
/**\r
- * Field _provenance\r
+ * Field _provenance.\r
*/\r
private uk.ac.vamsas.objects.core.Provenance _provenance;\r
\r
//- Constructors -/\r
//----------------/\r
\r
- public AlignmentSequenceAnnotation() \r
- {\r
+ public AlignmentSequenceAnnotation() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Method deleteGraph\r
- * \r
*/\r
- public void deleteGraph()\r
- {\r
+ public void deleteGraph(\r
+ ) {\r
this._has_graph= false;\r
- } //-- void deleteGraph() \r
+ }\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'graph'. The field 'graph' has\r
* together form a graph\r
* \r
* \r
- * @return boolean\r
- * @return the value of field 'graph'.\r
+ * @return the value of field 'Graph'.\r
*/\r
- public boolean getGraph()\r
- {\r
+ public boolean getGraph(\r
+ ) {\r
return this._graph;\r
- } //-- boolean getGraph() \r
+ }\r
\r
/**\r
* Returns the value of field 'provenance'.\r
* \r
- * @return Provenance\r
- * @return the value of field 'provenance'.\r
+ * @return the value of field 'Provenance'.\r
*/\r
- public uk.ac.vamsas.objects.core.Provenance getProvenance()\r
- {\r
+ public uk.ac.vamsas.objects.core.Provenance getProvenance(\r
+ ) {\r
return this._provenance;\r
- } //-- uk.ac.vamsas.objects.core.Provenance getProvenance() \r
+ }\r
\r
/**\r
- * Method hasGraph\r
- * \r
+ * Method hasGraph.\r
* \r
- * \r
- * @return boolean\r
+ * @return true if at least one Graph has been added\r
*/\r
- public boolean hasGraph()\r
- {\r
+ public boolean hasGraph(\r
+ ) {\r
return this._has_graph;\r
- } //-- boolean hasGraph() \r
+ }\r
\r
/**\r
- * Method isValid\r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ result = 37 * result + (_graph?0:1);\r
+ if (_provenance != null) {\r
+ result = 37 * result + _provenance.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'graph'. The field 'graph' has\r
+ * the following description: TODO:\r
+ * decide if this flag is\r
+ * redundant - when true it\r
+ * would suggest that the\r
+ * annotationElement values\r
+ * together form a graph\r
+ * \r
* \r
+ * @return the value of field 'Graph'.\r
+ */\r
+ public boolean isGraph(\r
+ ) {\r
+ return this._graph;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'graph'. The field 'graph' has the\r
* \r
* @param graph the value of field 'graph'.\r
*/\r
- public void setGraph(boolean graph)\r
- {\r
+ public void setGraph(\r
+ final boolean graph) {\r
this._graph = graph;\r
this._has_graph = true;\r
- } //-- void setGraph(boolean) \r
+ }\r
\r
/**\r
* Sets the value of field 'provenance'.\r
* \r
* @param provenance the value of field 'provenance'.\r
*/\r
- public void setProvenance(uk.ac.vamsas.objects.core.Provenance provenance)\r
- {\r
+ public void setProvenance(\r
+ final uk.ac.vamsas.objects.core.Provenance provenance) {\r
this._provenance = provenance;\r
- } //-- void setProvenance(uk.ac.vamsas.objects.core.Provenance) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return RangeType\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType\r
*/\r
- public static uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- return (uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader) \r
+ public static uk.ac.vamsas.objects.core.RangeType unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+ return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation.class, reader);\r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*
* 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 AnnotationElement.
* position with respect to the coordinate frame defined by a
* rangeType specification
*/
- private int _position;
+ private long _position;
/**
* keeps track of state for field: _position
//- Constructors -/
//----------------/
- public AnnotationElement()
- {
+ public AnnotationElement() {
super();
- _glyphList = new Vector();
- _valueList = new Vector();
- } //-- uk.ac.vamsas.objects.core.AnnotationElement()
+ this._glyphList = new java.util.Vector();
+ this._valueList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addGlyph
- *
*
*
* @param vGlyph
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addGlyph(uk.ac.vamsas.objects.core.Glyph vGlyph)
- throws java.lang.IndexOutOfBoundsException
- {
- _glyphList.addElement(vGlyph);
- } //-- void addGlyph(uk.ac.vamsas.objects.core.Glyph)
+ public void addGlyph(
+ final uk.ac.vamsas.objects.core.Glyph vGlyph)
+ throws java.lang.IndexOutOfBoundsException {
+ this._glyphList.addElement(vGlyph);
+ }
/**
- * Method addGlyph
- *
*
*
* @param index
* @param vGlyph
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addGlyph(int index, uk.ac.vamsas.objects.core.Glyph vGlyph)
- throws java.lang.IndexOutOfBoundsException
- {
- _glyphList.insertElementAt(vGlyph, index);
- } //-- void addGlyph(int, uk.ac.vamsas.objects.core.Glyph)
+ public void addGlyph(
+ final int index,
+ final uk.ac.vamsas.objects.core.Glyph vGlyph)
+ throws java.lang.IndexOutOfBoundsException {
+ this._glyphList.add(index, vGlyph);
+ }
/**
- * Method addValue
- *
*
*
* @param vValue
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addValue(float vValue)
- throws java.lang.IndexOutOfBoundsException
- {
- _valueList.addElement(new java.lang.Float(vValue));
- } //-- void addValue(float)
+ public void addValue(
+ final float vValue)
+ throws java.lang.IndexOutOfBoundsException {
+ this._valueList.addElement(new java.lang.Float(vValue));
+ }
/**
- * Method addValue
- *
*
*
* @param index
* @param vValue
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addValue(int index, float vValue)
- throws java.lang.IndexOutOfBoundsException
- {
- _valueList.insertElementAt(new java.lang.Float(vValue), index);
- } //-- void addValue(int, float)
+ public void addValue(
+ final int index,
+ final float vValue)
+ throws java.lang.IndexOutOfBoundsException {
+ this._valueList.add(index, new java.lang.Float(vValue));
+ }
/**
- * Method deleteAfter
- *
*/
- public void deleteAfter()
- {
+ public void deleteAfter(
+ ) {
this._has_after= false;
- } //-- void deleteAfter()
+ }
/**
- * Method deletePosition
- *
*/
- public void deletePosition()
- {
+ public void deletePosition(
+ ) {
this._has_position= false;
- } //-- void deletePosition()
+ }
/**
- * Method enumerateGlyph
+ * Method enumerateGlyph.
*
- *
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Glyph elements
*/
- public java.util.Enumeration enumerateGlyph()
- {
- return _glyphList.elements();
- } //-- java.util.Enumeration enumerateGlyph()
+ public java.util.Enumeration enumerateGlyph(
+ ) {
+ return this._glyphList.elements();
+ }
/**
- * Method enumerateValue
- *
+ * Method enumerateValue.
*
- *
- * @return Enumeration
+ * @return an Enumeration over all float elements
*/
- public java.util.Enumeration enumerateValue()
- {
- return _valueList.elements();
- } //-- java.util.Enumeration enumerateValue()
+ public java.util.Enumeration enumerateValue(
+ ) {
+ return this._valueList.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)
+ }
/**
* Returns the value of field 'after'. The field 'after' has
* appears between the
* specified position and the next
*
- * @return boolean
- * @return the value of field 'after'.
+ * @return the value of field 'After'.
*/
- public boolean getAfter()
- {
+ public boolean getAfter(
+ ) {
return this._after;
- } //-- boolean getAfter()
+ }
/**
* Returns the value of field 'description'. The field
* 'description' has the following description: Free text at
* this position
*
- * @return String
- * @return the value of field 'description'.
+ * @return the value of field 'Description'.
*/
- public java.lang.String getDescription()
- {
+ public java.lang.String getDescription(
+ ) {
return this._description;
- } //-- java.lang.String getDescription()
+ }
/**
- * Method getGlyph
- *
- *
+ * Method getGlyph.
*
* @param index
- * @return Glyph
- */
- public uk.ac.vamsas.objects.core.Glyph getGlyph(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _glyphList.size())) {
- throw new IndexOutOfBoundsException("getGlyph: Index value '"+index+"' not in range [0.."+_glyphList.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.Glyph at
+ * the given index
+ */
+ public uk.ac.vamsas.objects.core.Glyph getGlyph(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._glyphList.size()) {
+ throw new IndexOutOfBoundsException("getGlyph: Index value '" + index + "' not in range [0.." + (this._glyphList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Glyph) _glyphList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Glyph getGlyph(int)
+ return (uk.ac.vamsas.objects.core.Glyph) _glyphList.get(index);
+ }
/**
- * Method getGlyph
+ * Method getGlyph.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 Glyph
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Glyph[] getGlyph()
- {
- int size = _glyphList.size();
- uk.ac.vamsas.objects.core.Glyph[] mArray = new uk.ac.vamsas.objects.core.Glyph[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Glyph) _glyphList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Glyph[] getGlyph()
+ public uk.ac.vamsas.objects.core.Glyph[] getGlyph(
+ ) {
+ uk.ac.vamsas.objects.core.Glyph[] array = new uk.ac.vamsas.objects.core.Glyph[0];
+ return (uk.ac.vamsas.objects.core.Glyph[]) this._glyphList.toArray(array);
+ }
/**
- * Method getGlyphCount
- *
+ * Method getGlyphAsReference.Returns a reference to
+ * '_glyphList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getGlyphAsReference(
+ ) {
+ return this._glyphList;
+ }
+
+ /**
+ * Method getGlyphCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getGlyphCount()
- {
- return _glyphList.size();
- } //-- int getGlyphCount()
+ public int getGlyphCount(
+ ) {
+ return this._glyphList.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 'position'. The field 'position'
* coordinate frame defined by a
* rangeType specification
*
- * @return int
- * @return the value of field 'position'.
+ * @return the value of field 'Position'.
*/
- public int getPosition()
- {
+ public long getPosition(
+ ) {
return this._position;
- } //-- int getPosition()
+ }
/**
- * Method getValue
- *
- *
+ * Method getValue.
*
* @param index
- * @return float
- */
- public float getValue(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _valueList.size())) {
- throw new IndexOutOfBoundsException("getValue: Index value '"+index+"' not in range [0.."+_valueList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the float at the given index
+ */
+ public float getValue(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._valueList.size()) {
+ throw new IndexOutOfBoundsException("getValue: Index value '" + index + "' not in range [0.." + (this._valueList.size() - 1) + "]");
}
- return ((java.lang.Float)_valueList.elementAt(index)).floatValue();
- } //-- float getValue(int)
+ return ((java.lang.Float) _valueList.get(index)).floatValue();
+ }
/**
- * Method getValue
- *
- *
+ * Method getValue.Returns the contents of the collection in an
+ * Array.
*
- * @return float
+ * @return this collection as an Array
*/
- public float[] getValue()
- {
- int size = _valueList.size();
- float[] mArray = new float[size];
+ public float[] getValue(
+ ) {
+ int size = this._valueList.size();
+ float[] array = new float[size];
+ java.util.Iterator iter = _valueList.iterator();
for (int index = 0; index < size; index++) {
- mArray[index] = ((java.lang.Float)_valueList.elementAt(index)).floatValue();
+ array[index] = ((java.lang.Float) iter.next()).floatValue();
}
- return mArray;
- } //-- float[] getValue()
+ return array;
+ }
/**
- * Method getValueCount
+ * Method getValueAsReference.Returns a reference to
+ * '_valueList'. No type checking is performed on any
+ * modifications to the Vector.
*
- *
- *
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getValueCount()
- {
- return _valueList.size();
- } //-- int getValueCount()
+ public java.util.Vector getValueAsReference(
+ ) {
+ return this._valueList;
+ }
/**
- * Method hasAfter
- *
+ * Method getValueCount.
*
+ * @return the size of this collection
+ */
+ public int getValueCount(
+ ) {
+ return this._valueList.size();
+ }
+
+ /**
+ * Method hasAfter.
*
- * @return boolean
+ * @return true if at least one After has been added
*/
- public boolean hasAfter()
- {
+ public boolean hasAfter(
+ ) {
return this._has_after;
- } //-- boolean hasAfter()
+ }
/**
- * Method hasPosition
+ * Method hasPosition.
*
- *
- *
- * @return boolean
+ * @return true if at least one Position has been added
*/
- public boolean hasPosition()
- {
+ public boolean hasPosition(
+ ) {
return this._has_position;
- } //-- boolean hasPosition()
+ }
/**
- * Method isValid
+ * 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;
+ result = 37 * result + (int)(_position^(_position>>>32));
+ result = 37 * result + (_after?0:1);
+ if (_id != null) {
+ result = 37 * result + _id.hashCode();
+ }
+ if (_description != null) {
+ result = 37 * result + _description.hashCode();
+ }
+ if (_glyphList != null) {
+ result = 37 * result + _glyphList.hashCode();
+ }
+ if (_valueList != null) {
+ result = 37 * result + _valueList.hashCode();
+ }
+
+ return result;
+ }
+
+ /**
+ * Returns the value of field 'after'. The field 'after' has
+ * the following description: true means the annotation element
+ * appears between the
+ * specified position and the next
*
+ * @return the value of field 'After'.
+ */
+ public boolean isAfter(
+ ) {
+ return this._after;
+ }
+
+ /**
+ * 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
- */
- public void marshal(java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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
- */
- public void marshal(org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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 removeAllGlyph
- *
*/
- public void removeAllGlyph()
- {
- _glyphList.removeAllElements();
- } //-- void removeAllGlyph()
+ public void removeAllGlyph(
+ ) {
+ this._glyphList.clear();
+ }
/**
- * Method removeAllValue
- *
*/
- public void removeAllValue()
- {
- _valueList.removeAllElements();
- } //-- void removeAllValue()
+ public void removeAllValue(
+ ) {
+ this._valueList.clear();
+ }
/**
- * Method removeGlyph
- *
+ * Method removeGlyph.
*
+ * @param vGlyph
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeGlyph(
+ final uk.ac.vamsas.objects.core.Glyph vGlyph) {
+ boolean removed = _glyphList.remove(vGlyph);
+ return removed;
+ }
+
+ /**
+ * Method removeGlyphAt.
*
* @param index
- * @return Glyph
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Glyph removeGlyph(int index)
- {
- java.lang.Object obj = _glyphList.elementAt(index);
- _glyphList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Glyph removeGlyphAt(
+ final int index) {
+ java.lang.Object obj = this._glyphList.remove(index);
return (uk.ac.vamsas.objects.core.Glyph) obj;
- } //-- uk.ac.vamsas.objects.core.Glyph removeGlyph(int)
+ }
/**
- * Method removeValue
- *
+ * Method removeValue.
*
+ * @param vValue
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeValue(
+ final float vValue) {
+ boolean removed = _valueList.remove(new java.lang.Float(vValue));
+ return removed;
+ }
+
+ /**
+ * Method removeValueAt.
*
* @param index
- * @return float
+ * @return the element removed from the collection
*/
- public float removeValue(int index)
- {
- java.lang.Object obj = _valueList.elementAt(index);
- _valueList.removeElementAt(index);
- return ((java.lang.Float)obj).floatValue();
- } //-- float removeValue(int)
+ public float removeValueAt(
+ final int index) {
+ java.lang.Object obj = this._valueList.remove(index);
+ return ((java.lang.Float) obj).floatValue();
+ }
/**
* Sets the value of field 'after'. The field 'after' has the
*
* @param after the value of field 'after'.
*/
- public void setAfter(boolean after)
- {
+ public void setAfter(
+ final boolean after) {
this._after = after;
this._has_after = true;
- } //-- void setAfter(boolean)
+ }
/**
* Sets the value of field 'description'. The field
*
* @param description the value of field 'description'.
*/
- public void setDescription(java.lang.String description)
- {
+ public void setDescription(
+ final java.lang.String description) {
this._description = description;
- } //-- void setDescription(java.lang.String)
+ }
/**
- * Method setGlyph
- *
*
*
* @param index
* @param vGlyph
- */
- public void setGlyph(int index, uk.ac.vamsas.objects.core.Glyph vGlyph)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _glyphList.size())) {
- throw new IndexOutOfBoundsException("setGlyph: Index value '"+index+"' not in range [0.."+_glyphList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setGlyph(
+ final int index,
+ final uk.ac.vamsas.objects.core.Glyph vGlyph)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._glyphList.size()) {
+ throw new IndexOutOfBoundsException("setGlyph: Index value '" + index + "' not in range [0.." + (this._glyphList.size() - 1) + "]");
}
- _glyphList.setElementAt(vGlyph, index);
- } //-- void setGlyph(int, uk.ac.vamsas.objects.core.Glyph)
+
+ this._glyphList.set(index, vGlyph);
+ }
/**
- * Method setGlyph
- *
*
*
- * @param glyphArray
+ * @param vGlyphArray
*/
- public void setGlyph(uk.ac.vamsas.objects.core.Glyph[] glyphArray)
- {
+ public void setGlyph(
+ final uk.ac.vamsas.objects.core.Glyph[] vGlyphArray) {
//-- copy array
- _glyphList.removeAllElements();
- for (int i = 0; i < glyphArray.length; i++) {
- _glyphList.addElement(glyphArray[i]);
+ _glyphList.clear();
+
+ for (int i = 0; i < vGlyphArray.length; i++) {
+ this._glyphList.add(vGlyphArray[i]);
}
- } //-- void setGlyph(uk.ac.vamsas.objects.core.Glyph)
+ }
+
+ /**
+ * Sets the value of '_glyphList' by copying the given Vector.
+ * All elements will be checked for type safety.
+ *
+ * @param vGlyphList the Vector to copy.
+ */
+ public void setGlyph(
+ final java.util.Vector vGlyphList) {
+ // copy vector
+ this._glyphList.clear();
+
+ this._glyphList.addAll(vGlyphList);
+ }
+
+ /**
+ * Sets the value of '_glyphList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param glyphVector the Vector to set.
+ */
+ public void setGlyphAsReference(
+ final java.util.Vector glyphVector) {
+ this._glyphList = glyphVector;
+ }
/**
* 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 'position'. The field 'position' has
*
* @param position the value of field 'position'.
*/
- public void setPosition(int position)
- {
+ public void setPosition(
+ final long position) {
this._position = position;
this._has_position = true;
- } //-- void setPosition(int)
+ }
/**
- * Method setValue
- *
*
*
* @param index
* @param vValue
- */
- public void setValue(int index, float vValue)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _valueList.size())) {
- throw new IndexOutOfBoundsException("setValue: Index value '"+index+"' not in range [0.."+_valueList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setValue(
+ final int index,
+ final float vValue)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._valueList.size()) {
+ throw new IndexOutOfBoundsException("setValue: Index value '" + index + "' not in range [0.." + (this._valueList.size() - 1) + "]");
}
- _valueList.setElementAt(new java.lang.Float(vValue), index);
- } //-- void setValue(int, float)
+
+ this._valueList.set(index, new java.lang.Float(vValue));
+ }
/**
- * Method setValue
- *
*
*
- * @param valueArray
+ * @param vValueArray
*/
- public void setValue(float[] valueArray)
- {
+ public void setValue(
+ final float[] vValueArray) {
//-- copy array
- _valueList.removeAllElements();
- for (int i = 0; i < valueArray.length; i++) {
- _valueList.addElement(new java.lang.Float(valueArray[i]));
+ _valueList.clear();
+
+ for (int i = 0; i < vValueArray.length; i++) {
+ this._valueList.add(new java.lang.Float(vValueArray[i]));
}
- } //-- void setValue(float)
+ }
/**
- * Method unmarshal
+ * Sets the value of '_valueList' by copying the given Vector.
+ * All elements will be checked for type safety.
*
+ * @param vValueList the Vector to copy.
+ */
+ public void setValue(
+ final java.util.Vector vValueList) {
+ // copy vector
+ this._valueList.clear();
+
+ this._valueList.addAll(vValueList);
+ }
+
+ /**
+ * Sets the value of '_valueList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
*
+ * @param valueVector the Vector to set.
+ */
+ public void setValueAsReference(
+ final java.util.Vector valueVector) {
+ this._valueList = valueVector;
+ }
+
+ /**
+ * Method unmarshal.
*
* @param reader
- * @return AnnotationElement
- */
- public static uk.ac.vamsas.objects.core.AnnotationElement unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ * @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.AnnotationElement
+ */
+ public static uk.ac.vamsas.objects.core.AnnotationElement unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.AnnotationElement) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AnnotationElement.class, reader);
- } //-- uk.ac.vamsas.objects.core.AnnotationElement 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()
+ }
}
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Class AppData.\r
private java.lang.Object _choiceValue;\r
\r
/**\r
- * Field _data\r
+ * Field _data.\r
*/\r
private byte[] _data;\r
\r
/**\r
- * Field _dataReference\r
+ * Field _dataReference.\r
*/\r
private java.lang.String _dataReference;\r
\r
//- Constructors -/\r
//----------------/\r
\r
- public AppData() \r
- {\r
+ public AppData() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.AppData()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return false;\r
if (this._data != null) {\r
if (temp._data == null) return false;\r
- else if (!(this._data.equals(temp._data))) \r
+ else if (!(java.util.Arrays.equals(this._data, temp._data))) \r
return false;\r
}\r
else if (temp._data != null)\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'choiceValue'. The field\r
* 'choiceValue' has the following description: Internal choice\r
* value storage\r
* \r
- * @return Object\r
- * @return the value of field 'choiceValue'.\r
+ * @return the value of field 'ChoiceValue'.\r
*/\r
- public java.lang.Object getChoiceValue()\r
- {\r
+ public java.lang.Object getChoiceValue(\r
+ ) {\r
return this._choiceValue;\r
- } //-- java.lang.Object getChoiceValue() \r
+ }\r
\r
/**\r
* Returns the value of field 'data'.\r
* \r
- * @return byte\r
- * @return the value of field 'data'.\r
+ * @return the value of field 'Data'.\r
*/\r
- public byte[] getData()\r
- {\r
+ public byte[] getData(\r
+ ) {\r
return this._data;\r
- } //-- byte[] getData() \r
+ }\r
\r
/**\r
* Returns the value of field 'dataReference'.\r
* \r
- * @return String\r
- * @return the value of field 'dataReference'.\r
+ * @return the value of field 'DataReference'.\r
*/\r
- public java.lang.String getDataReference()\r
- {\r
+ public java.lang.String getDataReference(\r
+ ) {\r
return this._dataReference;\r
- } //-- java.lang.String getDataReference() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ if (_choiceValue != null) {\r
+ result = 37 * result + _choiceValue.hashCode();\r
+ }\r
+ if (_data != null) {\r
+ result = 37 * result + _data.hashCode();\r
+ }\r
+ if (_dataReference != null) {\r
+ result = 37 * result + _dataReference.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'data'.\r
* \r
* @param data the value of field 'data'.\r
*/\r
- public void setData(byte[] data)\r
- {\r
+ public void setData(\r
+ final byte[] data) {\r
this._data = data;\r
this._choiceValue = data;\r
- } //-- void setData(byte) \r
+ }\r
\r
/**\r
* Sets the value of field 'dataReference'.\r
* \r
* @param dataReference the value of field 'dataReference'.\r
*/\r
- public void setDataReference(java.lang.String dataReference)\r
- {\r
+ public void setDataReference(\r
+ final java.lang.String dataReference) {\r
this._dataReference = dataReference;\r
this._choiceValue = dataReference;\r
- } //-- void setDataReference(java.lang.String) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return AppData\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.AppData\r
*/\r
- public static uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
+ public static uk.ac.vamsas.objects.core.AppData unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
return (uk.ac.vamsas.objects.core.AppData) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AppData.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader) \r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*
* 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 ApplicationData.
private java.lang.String _name;
/**
- * Field _userList
+ * Field _userList.
*/
private java.util.Vector _userList;
/**
- * Field _common
+ * Field _common.
*/
private uk.ac.vamsas.objects.core.Common _common;
/**
- * Field _instanceList
+ * Field _instanceList.
*/
private java.util.Vector _instanceList;
//- Constructors -/
//----------------/
- public ApplicationData()
- {
+ public ApplicationData() {
super();
- _userList = new Vector();
- _instanceList = new Vector();
- } //-- uk.ac.vamsas.objects.core.ApplicationData()
+ this._userList = new java.util.Vector();
+ this._instanceList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addInstance
- *
*
*
* @param vInstance
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addInstance(uk.ac.vamsas.objects.core.Instance vInstance)
- throws java.lang.IndexOutOfBoundsException
- {
- _instanceList.addElement(vInstance);
- } //-- void addInstance(uk.ac.vamsas.objects.core.Instance)
+ public void addInstance(
+ final uk.ac.vamsas.objects.core.Instance vInstance)
+ throws java.lang.IndexOutOfBoundsException {
+ this._instanceList.addElement(vInstance);
+ }
/**
- * Method addInstance
- *
*
*
* @param index
* @param vInstance
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addInstance(int index, uk.ac.vamsas.objects.core.Instance vInstance)
- throws java.lang.IndexOutOfBoundsException
- {
- _instanceList.insertElementAt(vInstance, index);
- } //-- void addInstance(int, uk.ac.vamsas.objects.core.Instance)
+ public void addInstance(
+ final int index,
+ final uk.ac.vamsas.objects.core.Instance vInstance)
+ throws java.lang.IndexOutOfBoundsException {
+ this._instanceList.add(index, vInstance);
+ }
/**
- * Method addUser
- *
*
*
* @param vUser
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addUser(uk.ac.vamsas.objects.core.User vUser)
- throws java.lang.IndexOutOfBoundsException
- {
- _userList.addElement(vUser);
- } //-- void addUser(uk.ac.vamsas.objects.core.User)
+ public void addUser(
+ final uk.ac.vamsas.objects.core.User vUser)
+ throws java.lang.IndexOutOfBoundsException {
+ this._userList.addElement(vUser);
+ }
/**
- * Method addUser
- *
*
*
* @param index
* @param vUser
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addUser(int index, uk.ac.vamsas.objects.core.User vUser)
- throws java.lang.IndexOutOfBoundsException
- {
- _userList.insertElementAt(vUser, index);
- } //-- void addUser(int, uk.ac.vamsas.objects.core.User)
+ public void addUser(
+ final int index,
+ final uk.ac.vamsas.objects.core.User vUser)
+ throws java.lang.IndexOutOfBoundsException {
+ this._userList.add(index, vUser);
+ }
/**
- * Method enumerateInstance
- *
- *
+ * Method enumerateInstance.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Instance elements
*/
- public java.util.Enumeration enumerateInstance()
- {
- return _instanceList.elements();
- } //-- java.util.Enumeration enumerateInstance()
+ public java.util.Enumeration enumerateInstance(
+ ) {
+ return this._instanceList.elements();
+ }
/**
- * Method enumerateUser
+ * Method enumerateUser.
*
- *
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.User elements
*/
- public java.util.Enumeration enumerateUser()
- {
- return _userList.elements();
- } //-- java.util.Enumeration enumerateUser()
+ public java.util.Enumeration enumerateUser(
+ ) {
+ return this._userList.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)
+ }
/**
* Returns the value of field 'common'.
*
- * @return Common
- * @return the value of field 'common'.
+ * @return the value of field 'Common'.
*/
- public uk.ac.vamsas.objects.core.Common getCommon()
- {
+ public uk.ac.vamsas.objects.core.Common getCommon(
+ ) {
return this._common;
- } //-- uk.ac.vamsas.objects.core.Common getCommon()
+ }
/**
- * Method getInstance
- *
- *
+ * Method getInstance.
*
* @param index
- * @return Instance
- */
- public uk.ac.vamsas.objects.core.Instance getInstance(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _instanceList.size())) {
- throw new IndexOutOfBoundsException("getInstance: Index value '"+index+"' not in range [0.."+_instanceList.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.Instance
+ * at the given index
+ */
+ public uk.ac.vamsas.objects.core.Instance getInstance(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._instanceList.size()) {
+ throw new IndexOutOfBoundsException("getInstance: Index value '" + index + "' not in range [0.." + (this._instanceList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Instance) _instanceList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Instance getInstance(int)
+ return (uk.ac.vamsas.objects.core.Instance) _instanceList.get(index);
+ }
/**
- * Method getInstance
- *
+ * Method getInstance.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 Instance
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Instance[] getInstance()
- {
- int size = _instanceList.size();
- uk.ac.vamsas.objects.core.Instance[] mArray = new uk.ac.vamsas.objects.core.Instance[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Instance) _instanceList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Instance[] getInstance()
+ public uk.ac.vamsas.objects.core.Instance[] getInstance(
+ ) {
+ uk.ac.vamsas.objects.core.Instance[] array = new uk.ac.vamsas.objects.core.Instance[0];
+ return (uk.ac.vamsas.objects.core.Instance[]) this._instanceList.toArray(array);
+ }
/**
- * Method getInstanceCount
- *
+ * Method getInstanceAsReference.Returns a reference to
+ * '_instanceList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getInstanceAsReference(
+ ) {
+ return this._instanceList;
+ }
+
+ /**
+ * Method getInstanceCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getInstanceCount()
- {
- return _instanceList.size();
- } //-- int getInstanceCount()
+ public int getInstanceCount(
+ ) {
+ return this._instanceList.size();
+ }
/**
* Returns the value of field 'name'. The field 'name' has the
* following description: Canonical name of application
*
- * @return String
- * @return the value of field 'name'.
+ * @return the value of field 'Name'.
*/
- public java.lang.String getName()
- {
+ public java.lang.String getName(
+ ) {
return this._name;
- } //-- java.lang.String getName()
+ }
/**
- * Method getUser
- *
- *
+ * Method getUser.
*
* @param index
- * @return User
- */
- public uk.ac.vamsas.objects.core.User getUser(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _userList.size())) {
- throw new IndexOutOfBoundsException("getUser: Index value '"+index+"' not in range [0.."+_userList.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.User at
+ * the given index
+ */
+ public uk.ac.vamsas.objects.core.User getUser(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._userList.size()) {
+ throw new IndexOutOfBoundsException("getUser: Index value '" + index + "' not in range [0.." + (this._userList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.User) _userList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.User getUser(int)
+ return (uk.ac.vamsas.objects.core.User) _userList.get(index);
+ }
/**
- * Method getUser
- *
+ * Method getUser.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 User
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.User[] getUser()
- {
- int size = _userList.size();
- uk.ac.vamsas.objects.core.User[] mArray = new uk.ac.vamsas.objects.core.User[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.User) _userList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.User[] getUser()
+ public uk.ac.vamsas.objects.core.User[] getUser(
+ ) {
+ uk.ac.vamsas.objects.core.User[] array = new uk.ac.vamsas.objects.core.User[0];
+ return (uk.ac.vamsas.objects.core.User[]) this._userList.toArray(array);
+ }
/**
- * Method getUserCount
- *
+ * Method getUserAsReference.Returns a reference to
+ * '_userList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getUserAsReference(
+ ) {
+ return this._userList;
+ }
+
+ /**
+ * Method getUserCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getUserCount()
- {
- return _userList.size();
- } //-- int getUserCount()
+ public int getUserCount(
+ ) {
+ return this._userList.size();
+ }
/**
* Returns the value of field 'version'. The field 'version'
* application specific
* data storage version used
*
- * @return String
- * @return the value of field 'version'.
+ * @return the value of field 'Version'.
*/
- public java.lang.String getVersion()
- {
+ public java.lang.String getVersion(
+ ) {
return this._version;
- } //-- java.lang.String getVersion()
+ }
/**
- * Method isValid
- *
+ * 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 (_version != null) {
+ result = 37 * result + _version.hashCode();
+ }
+ if (_name != null) {
+ result = 37 * result + _name.hashCode();
+ }
+ if (_userList != null) {
+ result = 37 * result + _userList.hashCode();
+ }
+ if (_common != null) {
+ result = 37 * result + _common.hashCode();
+ }
+ if (_instanceList != null) {
+ result = 37 * result + _instanceList.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
- */
- public void marshal(java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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
- */
- public void marshal(org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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 removeAllInstance
- *
*/
- public void removeAllInstance()
- {
- _instanceList.removeAllElements();
- } //-- void removeAllInstance()
+ public void removeAllInstance(
+ ) {
+ this._instanceList.clear();
+ }
/**
- * Method removeAllUser
- *
*/
- public void removeAllUser()
- {
- _userList.removeAllElements();
- } //-- void removeAllUser()
+ public void removeAllUser(
+ ) {
+ this._userList.clear();
+ }
/**
- * Method removeInstance
- *
+ * Method removeInstance.
*
+ * @param vInstance
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeInstance(
+ final uk.ac.vamsas.objects.core.Instance vInstance) {
+ boolean removed = _instanceList.remove(vInstance);
+ return removed;
+ }
+
+ /**
+ * Method removeInstanceAt.
*
* @param index
- * @return Instance
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Instance removeInstance(int index)
- {
- java.lang.Object obj = _instanceList.elementAt(index);
- _instanceList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Instance removeInstanceAt(
+ final int index) {
+ java.lang.Object obj = this._instanceList.remove(index);
return (uk.ac.vamsas.objects.core.Instance) obj;
- } //-- uk.ac.vamsas.objects.core.Instance removeInstance(int)
+ }
/**
- * Method removeUser
- *
+ * Method removeUser.
*
+ * @param vUser
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeUser(
+ final uk.ac.vamsas.objects.core.User vUser) {
+ boolean removed = _userList.remove(vUser);
+ return removed;
+ }
+
+ /**
+ * Method removeUserAt.
*
* @param index
- * @return User
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.User removeUser(int index)
- {
- java.lang.Object obj = _userList.elementAt(index);
- _userList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.User removeUserAt(
+ final int index) {
+ java.lang.Object obj = this._userList.remove(index);
return (uk.ac.vamsas.objects.core.User) obj;
- } //-- uk.ac.vamsas.objects.core.User removeUser(int)
+ }
/**
* Sets the value of field 'common'.
*
* @param common the value of field 'common'.
*/
- public void setCommon(uk.ac.vamsas.objects.core.Common common)
- {
+ public void setCommon(
+ final uk.ac.vamsas.objects.core.Common common) {
this._common = common;
- } //-- void setCommon(uk.ac.vamsas.objects.core.Common)
+ }
/**
- * Method setInstance
- *
*
*
* @param index
* @param vInstance
- */
- public void setInstance(int index, uk.ac.vamsas.objects.core.Instance vInstance)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _instanceList.size())) {
- throw new IndexOutOfBoundsException("setInstance: Index value '"+index+"' not in range [0.."+_instanceList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setInstance(
+ final int index,
+ final uk.ac.vamsas.objects.core.Instance vInstance)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._instanceList.size()) {
+ throw new IndexOutOfBoundsException("setInstance: Index value '" + index + "' not in range [0.." + (this._instanceList.size() - 1) + "]");
}
- _instanceList.setElementAt(vInstance, index);
- } //-- void setInstance(int, uk.ac.vamsas.objects.core.Instance)
+
+ this._instanceList.set(index, vInstance);
+ }
/**
- * Method setInstance
- *
*
*
- * @param instanceArray
+ * @param vInstanceArray
*/
- public void setInstance(uk.ac.vamsas.objects.core.Instance[] instanceArray)
- {
+ public void setInstance(
+ final uk.ac.vamsas.objects.core.Instance[] vInstanceArray) {
//-- copy array
- _instanceList.removeAllElements();
- for (int i = 0; i < instanceArray.length; i++) {
- _instanceList.addElement(instanceArray[i]);
+ _instanceList.clear();
+
+ for (int i = 0; i < vInstanceArray.length; i++) {
+ this._instanceList.add(vInstanceArray[i]);
}
- } //-- void setInstance(uk.ac.vamsas.objects.core.Instance)
+ }
+
+ /**
+ * Sets the value of '_instanceList' by copying the given
+ * Vector. All elements will be checked for type safety.
+ *
+ * @param vInstanceList the Vector to copy.
+ */
+ public void setInstance(
+ final java.util.Vector vInstanceList) {
+ // copy vector
+ this._instanceList.clear();
+
+ this._instanceList.addAll(vInstanceList);
+ }
+
+ /**
+ * Sets the value of '_instanceList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param instanceVector the Vector to set.
+ */
+ public void setInstanceAsReference(
+ final java.util.Vector instanceVector) {
+ this._instanceList = instanceVector;
+ }
/**
* Sets the value of field 'name'. The field 'name' has the
*
* @param name the value of field 'name'.
*/
- public void setName(java.lang.String name)
- {
+ public void setName(
+ final java.lang.String name) {
this._name = name;
- } //-- void setName(java.lang.String)
+ }
/**
- * Method setUser
- *
*
*
* @param index
* @param vUser
- */
- public void setUser(int index, uk.ac.vamsas.objects.core.User vUser)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _userList.size())) {
- throw new IndexOutOfBoundsException("setUser: Index value '"+index+"' not in range [0.."+_userList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setUser(
+ final int index,
+ final uk.ac.vamsas.objects.core.User vUser)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._userList.size()) {
+ throw new IndexOutOfBoundsException("setUser: Index value '" + index + "' not in range [0.." + (this._userList.size() - 1) + "]");
}
- _userList.setElementAt(vUser, index);
- } //-- void setUser(int, uk.ac.vamsas.objects.core.User)
+
+ this._userList.set(index, vUser);
+ }
/**
- * Method setUser
- *
*
*
- * @param userArray
+ * @param vUserArray
*/
- public void setUser(uk.ac.vamsas.objects.core.User[] userArray)
- {
+ public void setUser(
+ final uk.ac.vamsas.objects.core.User[] vUserArray) {
//-- copy array
- _userList.removeAllElements();
- for (int i = 0; i < userArray.length; i++) {
- _userList.addElement(userArray[i]);
+ _userList.clear();
+
+ for (int i = 0; i < vUserArray.length; i++) {
+ this._userList.add(vUserArray[i]);
}
- } //-- void setUser(uk.ac.vamsas.objects.core.User)
+ }
+
+ /**
+ * Sets the value of '_userList' by copying the given Vector.
+ * All elements will be checked for type safety.
+ *
+ * @param vUserList the Vector to copy.
+ */
+ public void setUser(
+ final java.util.Vector vUserList) {
+ // copy vector
+ this._userList.clear();
+
+ this._userList.addAll(vUserList);
+ }
+
+ /**
+ * Sets the value of '_userList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param userVector the Vector to set.
+ */
+ public void setUserAsReference(
+ final java.util.Vector userVector) {
+ this._userList = userVector;
+ }
/**
* Sets the value of field 'version'. The field 'version' has
*
* @param version the value of field 'version'.
*/
- public void setVersion(java.lang.String version)
- {
+ public void setVersion(
+ final java.lang.String version) {
this._version = version;
- } //-- void setVersion(java.lang.String)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return AppData
+ * @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.AppData
*/
- public static uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
- return (uk.ac.vamsas.objects.core.ApplicationData) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.ApplicationData.class, reader);
- } //-- uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader)
+ public static uk.ac.vamsas.objects.core.AppData unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (uk.ac.vamsas.objects.core.AppData) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.ApplicationData.class, 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()
+ }
}
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Class Attachment.\r
//- Constructors -/\r
//----------------/\r
\r
- public Attachment() \r
- {\r
+ public Attachment() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.Attachment()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Method deleteCompressed\r
- * \r
*/\r
- public void deleteCompressed()\r
- {\r
+ public void deleteCompressed(\r
+ ) {\r
this._has_compressed= false;\r
- } //-- void deleteCompressed() \r
+ }\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'compressed'. The field\r
* data will be decompresses with Zip\r
* before presenting to application \r
* \r
- * @return boolean\r
- * @return the value of field 'compressed'.\r
+ * @return the value of field 'Compressed'.\r
*/\r
- public boolean getCompressed()\r
- {\r
+ public boolean getCompressed(\r
+ ) {\r
return this._compressed;\r
- } //-- boolean getCompressed() \r
+ }\r
\r
/**\r
* Returns the value of field 'id'. The field 'id' has the\r
* referencing\r
* \r
* \r
- * @return String\r
- * @return the value of field 'id'.\r
+ * @return the value of field 'Id'.\r
*/\r
- public java.lang.String getId()\r
- {\r
+ public java.lang.String getId(\r
+ ) {\r
return this._id;\r
- } //-- java.lang.String getId() \r
+ }\r
\r
/**\r
* Returns the value of field 'objectref'. The field\r
* arbitrary data is associated with\r
* \r
* \r
- * @return Object\r
- * @return the value of field 'objectref'.\r
+ * @return the value of field 'Objectref'.\r
*/\r
- public java.lang.Object getObjectref()\r
- {\r
+ public java.lang.Object getObjectref(\r
+ ) {\r
return this._objectref;\r
- } //-- java.lang.Object getObjectref() \r
+ }\r
\r
/**\r
* Returns the value of field 'type'. The field 'type' has the\r
* format - use\r
* (extended) MIME types ? \r
* \r
- * @return String\r
- * @return the value of field 'type'.\r
+ * @return the value of field 'Type'.\r
*/\r
- public java.lang.String getType()\r
- {\r
+ public java.lang.String getType(\r
+ ) {\r
return this._type;\r
- } //-- java.lang.String getType() \r
+ }\r
\r
/**\r
- * Method hasCompressed\r
- * \r
+ * Method hasCompressed.\r
* \r
- * \r
- * @return boolean\r
+ * @return true if at least one Compressed has been added\r
*/\r
- public boolean hasCompressed()\r
- {\r
+ public boolean hasCompressed(\r
+ ) {\r
return this._has_compressed;\r
- } //-- boolean hasCompressed() \r
+ }\r
\r
/**\r
- * Method isValid\r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ result = 37 * result + (_compressed?0:1);\r
+ if (_type != null) {\r
+ result = 37 * result + _type.hashCode();\r
+ }\r
+ if (_objectref != null) {\r
+ result = 37 * result + _objectref.hashCode();\r
+ }\r
+ if (_id != null) {\r
+ result = 37 * result + _id.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'compressed'. The field\r
+ * 'compressed' has the following description: true implies\r
+ * data will be decompresses with Zip\r
+ * before presenting to application \r
* \r
+ * @return the value of field 'Compressed'.\r
+ */\r
+ public boolean isCompressed(\r
+ ) {\r
+ return this._compressed;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'compressed'. The field 'compressed'\r
* \r
* @param compressed the value of field 'compressed'.\r
*/\r
- public void setCompressed(boolean compressed)\r
- {\r
+ public void setCompressed(\r
+ final boolean compressed) {\r
this._compressed = compressed;\r
this._has_compressed = true;\r
- } //-- void setCompressed(boolean) \r
+ }\r
\r
/**\r
* Sets the value of field 'id'. The field 'id' has the\r
* \r
* @param id the value of field 'id'.\r
*/\r
- public void setId(java.lang.String id)\r
- {\r
+ public void setId(\r
+ final java.lang.String id) {\r
this._id = id;\r
- } //-- void setId(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'objectref'. The field 'objectref'\r
* \r
* @param objectref the value of field 'objectref'.\r
*/\r
- public void setObjectref(java.lang.Object objectref)\r
- {\r
+ public void setObjectref(\r
+ final java.lang.Object objectref) {\r
this._objectref = objectref;\r
- } //-- void setObjectref(java.lang.Object) \r
+ }\r
\r
/**\r
* Sets the value of field 'type'. The field 'type' has the\r
* \r
* @param type the value of field 'type'.\r
*/\r
- public void setType(java.lang.String type)\r
- {\r
+ public void setType(\r
+ final java.lang.String type) {\r
this._type = type;\r
- } //-- void setType(java.lang.String) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return AppData\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.AppData\r
*/\r
- public static uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- return (uk.ac.vamsas.objects.core.Attachment) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Attachment.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader) \r
+ public static uk.ac.vamsas.objects.core.AppData unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+ return (uk.ac.vamsas.objects.core.AppData) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Attachment.class, reader);\r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Class Common.\r
//- Constructors -/\r
//----------------/\r
\r
- public Common() \r
- {\r
+ public Common() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.Common()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
\r
if (obj instanceof Common) {\r
\r
- Common temp = (Common)obj;\r
- return true;\r
- }\r
- return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return AppData\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.AppData\r
*/\r
- public static uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- return (uk.ac.vamsas.objects.core.Common) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Common.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader) \r
+ public static uk.ac.vamsas.objects.core.AppData unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+ return (uk.ac.vamsas.objects.core.AppData) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Common.class, reader);\r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*
* 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()
+ }
}
/*
* 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 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 DataSetAnnotations.
private java.lang.Object _seqRef;
/**
- * Field _provenance
+ * Field _provenance.
*/
private uk.ac.vamsas.objects.core.Provenance _provenance;
//- Constructors -/
//----------------/
- public DataSetAnnotations()
- {
+ public DataSetAnnotations() {
super();
- } //-- uk.ac.vamsas.objects.core.DataSetAnnotations()
+ }
//-----------/
//-----------/
/**
- * 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)
+ }
/**
* 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()
+ }
/**
* 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'.
+ * @return the value of field 'SeqRef'.
*/
- public java.lang.Object getSeqRef()
- {
+ public java.lang.Object getSeqRef(
+ ) {
return this._seqRef;
- } //-- java.lang.Object getSeqRef()
+ }
/**
- * Method isValid
- *
+ * 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 (_seqRef != null) {
+ result = 37 * result + _seqRef.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)
+ }
/**
* 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)
+ }
/**
* Sets the value of field 'seqRef'. The field 'seqRef' has the
*
* @param seqRef the value of field 'seqRef'.
*/
- public void setSeqRef(java.lang.Object seqRef)
- {
+ public void setSeqRef(
+ final java.lang.Object seqRef) {
this._seqRef = seqRef;
- } //-- void setSeqRef(java.lang.Object)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return RangeType
+ * @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.RangeType
*/
- public static uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
- return (uk.ac.vamsas.objects.core.DataSetAnnotations) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.DataSetAnnotations.class, reader);
- } //-- uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader)
+ public static uk.ac.vamsas.objects.core.RangeType unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.DataSetAnnotations.class, 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()
+ }
}
/*
* 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;
/**
* Store a list of database references
private java.util.Vector _mapList;
/**
- * Field _linkList
+ * Field _linkList.
*/
private java.util.Vector _linkList;
/**
- * Field _propertyList
+ * Field _propertyList.
*/
private java.util.Vector _propertyList;
//- Constructors -/
//----------------/
- public DbRef()
- {
+ public DbRef() {
super();
- _mapList = new Vector();
- _linkList = new Vector();
- _propertyList = new Vector();
- } //-- uk.ac.vamsas.objects.core.DbRef()
+ this._mapList = new java.util.Vector();
+ this._linkList = new java.util.Vector();
+ this._propertyList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addLink
- *
*
*
* @param vLink
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addLink(uk.ac.vamsas.objects.core.Link vLink)
- throws java.lang.IndexOutOfBoundsException
- {
- _linkList.addElement(vLink);
- } //-- void addLink(uk.ac.vamsas.objects.core.Link)
+ public void addLink(
+ final uk.ac.vamsas.objects.core.Link vLink)
+ throws java.lang.IndexOutOfBoundsException {
+ this._linkList.addElement(vLink);
+ }
/**
- * Method addLink
- *
*
*
* @param index
* @param vLink
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addLink(int index, uk.ac.vamsas.objects.core.Link vLink)
- throws java.lang.IndexOutOfBoundsException
- {
- _linkList.insertElementAt(vLink, index);
- } //-- void addLink(int, uk.ac.vamsas.objects.core.Link)
+ public void addLink(
+ final int index,
+ final uk.ac.vamsas.objects.core.Link vLink)
+ throws java.lang.IndexOutOfBoundsException {
+ this._linkList.add(index, vLink);
+ }
/**
- * Method addMap
- *
*
*
* @param vMap
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addMap(uk.ac.vamsas.objects.core.Map vMap)
- throws java.lang.IndexOutOfBoundsException
- {
- _mapList.addElement(vMap);
- } //-- void addMap(uk.ac.vamsas.objects.core.Map)
+ public void addMap(
+ final uk.ac.vamsas.objects.core.Map vMap)
+ throws java.lang.IndexOutOfBoundsException {
+ this._mapList.addElement(vMap);
+ }
/**
- * Method addMap
- *
*
*
* @param index
* @param vMap
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addMap(int index, uk.ac.vamsas.objects.core.Map vMap)
- throws java.lang.IndexOutOfBoundsException
- {
- _mapList.insertElementAt(vMap, index);
- } //-- void addMap(int, uk.ac.vamsas.objects.core.Map)
+ public void addMap(
+ final int index,
+ final uk.ac.vamsas.objects.core.Map vMap)
+ throws java.lang.IndexOutOfBoundsException {
+ this._mapList.add(index, vMap);
+ }
/**
- * Method addProperty
- *
*
*
* @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addProperty(uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- _propertyList.addElement(vProperty);
- } //-- void addProperty(uk.ac.vamsas.objects.core.Property)
+ public void addProperty(
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.addElement(vProperty);
+ }
/**
- * Method addProperty
- *
*
*
* @param index
* @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- _propertyList.insertElementAt(vProperty, index);
- } //-- void addProperty(int, uk.ac.vamsas.objects.core.Property)
+ public void addProperty(
+ final int index,
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.add(index, vProperty);
+ }
/**
- * Method enumerateLink
- *
- *
+ * Method enumerateLink.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Link elements
*/
- public java.util.Enumeration enumerateLink()
- {
- return _linkList.elements();
- } //-- java.util.Enumeration enumerateLink()
+ public java.util.Enumeration enumerateLink(
+ ) {
+ return this._linkList.elements();
+ }
/**
- * Method enumerateMap
+ * Method enumerateMap.
*
- *
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Map elements
*/
- public java.util.Enumeration enumerateMap()
- {
- return _mapList.elements();
- } //-- java.util.Enumeration enumerateMap()
+ public java.util.Enumeration enumerateMap(
+ ) {
+ return this._mapList.elements();
+ }
/**
- * Method enumerateProperty
- *
- *
+ * Method enumerateProperty.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Property elements
*/
- public java.util.Enumeration enumerateProperty()
- {
- return _propertyList.elements();
- } //-- java.util.Enumeration enumerateProperty()
+ public java.util.Enumeration enumerateProperty(
+ ) {
+ return this._propertyList.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)
+ }
/**
* Returns the value of field 'accessionId'. The field
* special property of the dbRef object ?
*
*
- * @return String
- * @return the value of field 'accessionId'.
+ * @return the value of field 'AccessionId'.
*/
- public java.lang.String getAccessionId()
- {
+ public java.lang.String getAccessionId(
+ ) {
return this._accessionId;
- } //-- java.lang.String getAccessionId()
+ }
/**
* 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()
+ }
/**
- * Method getLink
- *
- *
+ * Method getLink.
*
* @param index
- * @return Link
- */
- public uk.ac.vamsas.objects.core.Link getLink(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _linkList.size())) {
- throw new IndexOutOfBoundsException("getLink: Index value '"+index+"' not in range [0.."+_linkList.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.Link at
+ * the given index
+ */
+ public uk.ac.vamsas.objects.core.Link getLink(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._linkList.size()) {
+ throw new IndexOutOfBoundsException("getLink: Index value '" + index + "' not in range [0.." + (this._linkList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Link) _linkList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Link getLink(int)
+ return (uk.ac.vamsas.objects.core.Link) _linkList.get(index);
+ }
/**
- * Method getLink
- *
+ * Method getLink.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 Link
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Link[] getLink()
- {
- int size = _linkList.size();
- uk.ac.vamsas.objects.core.Link[] mArray = new uk.ac.vamsas.objects.core.Link[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Link) _linkList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Link[] getLink()
+ public uk.ac.vamsas.objects.core.Link[] getLink(
+ ) {
+ uk.ac.vamsas.objects.core.Link[] array = new uk.ac.vamsas.objects.core.Link[0];
+ return (uk.ac.vamsas.objects.core.Link[]) this._linkList.toArray(array);
+ }
/**
- * Method getLinkCount
- *
- *
+ * Method getLinkAsReference.Returns a reference to
+ * '_linkList'. No type checking is performed on any
+ * modifications to the Vector.
*
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getLinkCount()
- {
- return _linkList.size();
- } //-- int getLinkCount()
+ public java.util.Vector getLinkAsReference(
+ ) {
+ return this._linkList;
+ }
/**
- * Method getMap
- *
+ * Method getLinkCount.
*
+ * @return the size of this collection
+ */
+ public int getLinkCount(
+ ) {
+ return this._linkList.size();
+ }
+
+ /**
+ * Method getMap.
*
* @param index
- * @return Map
- */
- public uk.ac.vamsas.objects.core.Map getMap(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _mapList.size())) {
- throw new IndexOutOfBoundsException("getMap: Index value '"+index+"' not in range [0.."+_mapList.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.Map at
+ * the given index
+ */
+ public uk.ac.vamsas.objects.core.Map getMap(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._mapList.size()) {
+ throw new IndexOutOfBoundsException("getMap: Index value '" + index + "' not in range [0.." + (this._mapList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Map) _mapList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Map getMap(int)
+ return (uk.ac.vamsas.objects.core.Map) _mapList.get(index);
+ }
/**
- * Method getMap
+ * Method getMap.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 Map
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Map[] getMap()
- {
- int size = _mapList.size();
- uk.ac.vamsas.objects.core.Map[] mArray = new uk.ac.vamsas.objects.core.Map[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Map) _mapList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Map[] getMap()
+ public uk.ac.vamsas.objects.core.Map[] getMap(
+ ) {
+ uk.ac.vamsas.objects.core.Map[] array = new uk.ac.vamsas.objects.core.Map[0];
+ return (uk.ac.vamsas.objects.core.Map[]) this._mapList.toArray(array);
+ }
/**
- * Method getMapCount
- *
+ * Method getMapAsReference.Returns a reference to '_mapList'.
+ * No type checking is performed on any modifications to the
+ * Vector.
*
- *
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getMapCount()
- {
- return _mapList.size();
- } //-- int getMapCount()
+ public java.util.Vector getMapAsReference(
+ ) {
+ return this._mapList;
+ }
/**
- * Method getProperty
- *
+ * Method getMapCount.
*
+ * @return the size of this collection
+ */
+ public int getMapCount(
+ ) {
+ return this._mapList.size();
+ }
+
+ /**
+ * Method getProperty.
*
* @param index
- * @return Property
- */
- public uk.ac.vamsas.objects.core.Property getProperty(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _propertyList.size())) {
- throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.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.Property
+ * at the given index
+ */
+ public uk.ac.vamsas.objects.core.Property getProperty(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Property getProperty(int)
+ return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);
+ }
/**
- * Method getProperty
- *
- *
+ * Method getProperty.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 Property
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Property[] getProperty()
- {
- int size = _propertyList.size();
- uk.ac.vamsas.objects.core.Property[] mArray = new uk.ac.vamsas.objects.core.Property[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Property[] getProperty()
+ public uk.ac.vamsas.objects.core.Property[] getProperty(
+ ) {
+ uk.ac.vamsas.objects.core.Property[] array = new uk.ac.vamsas.objects.core.Property[0];
+ return (uk.ac.vamsas.objects.core.Property[]) this._propertyList.toArray(array);
+ }
/**
- * Method getPropertyCount
- *
+ * Method getPropertyAsReference.Returns a reference to
+ * '_propertyList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getPropertyAsReference(
+ ) {
+ return this._propertyList;
+ }
+
+ /**
+ * Method getPropertyCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getPropertyCount()
- {
- return _propertyList.size();
- } //-- int getPropertyCount()
+ public int getPropertyCount(
+ ) {
+ return this._propertyList.size();
+ }
/**
* Returns the value of field 'source'. The field 'source' has
* uncontrolled/unspecified string ID
*
*
- * @return String
- * @return the value of field 'source'.
+ * @return the value of field 'Source'.
*/
- public java.lang.String getSource()
- {
+ public java.lang.String getSource(
+ ) {
return this._source;
- } //-- java.lang.String getSource()
+ }
/**
* Returns the value of field 'version'. The field 'version'
* has the following description: Version must be specified -
*
*
- * @return String
- * @return the value of field 'version'.
+ * @return the value of field 'Version'.
*/
- public java.lang.String getVersion()
- {
+ public java.lang.String getVersion(
+ ) {
return this._version;
- } //-- java.lang.String getVersion()
+ }
/**
- * Method isValid
- *
+ * 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 (_source != null) {
+ result = 37 * result + _source.hashCode();
+ }
+ if (_version != null) {
+ result = 37 * result + _version.hashCode();
+ }
+ if (_accessionId != null) {
+ result = 37 * result + _accessionId.hashCode();
+ }
+ if (_id != null) {
+ result = 37 * result + _id.hashCode();
+ }
+ if (_mapList != null) {
+ result = 37 * result + _mapList.hashCode();
+ }
+ if (_linkList != null) {
+ result = 37 * result + _linkList.hashCode();
+ }
+ if (_propertyList != null) {
+ result = 37 * result + _propertyList.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
- */
- public void marshal(java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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
- */
- public void marshal(org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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 removeAllLink
- *
*/
- public void removeAllLink()
- {
- _linkList.removeAllElements();
- } //-- void removeAllLink()
+ public void removeAllLink(
+ ) {
+ this._linkList.clear();
+ }
/**
- * Method removeAllMap
- *
*/
- public void removeAllMap()
- {
- _mapList.removeAllElements();
- } //-- void removeAllMap()
+ public void removeAllMap(
+ ) {
+ this._mapList.clear();
+ }
/**
- * Method removeAllProperty
- *
*/
- public void removeAllProperty()
- {
- _propertyList.removeAllElements();
- } //-- void removeAllProperty()
+ public void removeAllProperty(
+ ) {
+ this._propertyList.clear();
+ }
/**
- * Method removeLink
- *
+ * Method removeLink.
*
+ * @param vLink
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeLink(
+ final uk.ac.vamsas.objects.core.Link vLink) {
+ boolean removed = _linkList.remove(vLink);
+ return removed;
+ }
+
+ /**
+ * Method removeLinkAt.
*
* @param index
- * @return Link
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Link removeLink(int index)
- {
- java.lang.Object obj = _linkList.elementAt(index);
- _linkList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Link removeLinkAt(
+ final int index) {
+ java.lang.Object obj = this._linkList.remove(index);
return (uk.ac.vamsas.objects.core.Link) obj;
- } //-- uk.ac.vamsas.objects.core.Link removeLink(int)
+ }
/**
- * Method removeMap
- *
+ * Method removeMap.
*
+ * @param vMap
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeMap(
+ final uk.ac.vamsas.objects.core.Map vMap) {
+ boolean removed = _mapList.remove(vMap);
+ return removed;
+ }
+
+ /**
+ * Method removeMapAt.
*
* @param index
- * @return Map
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Map removeMap(int index)
- {
- java.lang.Object obj = _mapList.elementAt(index);
- _mapList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Map removeMapAt(
+ final int index) {
+ java.lang.Object obj = this._mapList.remove(index);
return (uk.ac.vamsas.objects.core.Map) obj;
- } //-- uk.ac.vamsas.objects.core.Map removeMap(int)
+ }
/**
- * Method removeProperty
- *
+ * Method removeProperty.
*
+ * @param vProperty
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeProperty(
+ final uk.ac.vamsas.objects.core.Property vProperty) {
+ boolean removed = _propertyList.remove(vProperty);
+ return removed;
+ }
+
+ /**
+ * Method removePropertyAt.
*
* @param index
- * @return Property
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Property removeProperty(int index)
- {
- java.lang.Object obj = _propertyList.elementAt(index);
- _propertyList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Property removePropertyAt(
+ final int index) {
+ java.lang.Object obj = this._propertyList.remove(index);
return (uk.ac.vamsas.objects.core.Property) obj;
- } //-- uk.ac.vamsas.objects.core.Property removeProperty(int)
+ }
/**
* Sets the value of field 'accessionId'. The field
*
* @param accessionId the value of field 'accessionId'.
*/
- public void setAccessionId(java.lang.String accessionId)
- {
+ public void setAccessionId(
+ final java.lang.String accessionId) {
this._accessionId = accessionId;
- } //-- void setAccessionId(java.lang.String)
+ }
/**
* 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)
+ }
/**
- * Method setLink
- *
*
*
* @param index
* @param vLink
- */
- public void setLink(int index, uk.ac.vamsas.objects.core.Link vLink)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _linkList.size())) {
- throw new IndexOutOfBoundsException("setLink: Index value '"+index+"' not in range [0.."+_linkList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setLink(
+ final int index,
+ final uk.ac.vamsas.objects.core.Link vLink)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._linkList.size()) {
+ throw new IndexOutOfBoundsException("setLink: Index value '" + index + "' not in range [0.." + (this._linkList.size() - 1) + "]");
}
- _linkList.setElementAt(vLink, index);
- } //-- void setLink(int, uk.ac.vamsas.objects.core.Link)
+
+ this._linkList.set(index, vLink);
+ }
/**
- * Method setLink
- *
*
*
- * @param linkArray
+ * @param vLinkArray
*/
- public void setLink(uk.ac.vamsas.objects.core.Link[] linkArray)
- {
+ public void setLink(
+ final uk.ac.vamsas.objects.core.Link[] vLinkArray) {
//-- copy array
- _linkList.removeAllElements();
- for (int i = 0; i < linkArray.length; i++) {
- _linkList.addElement(linkArray[i]);
+ _linkList.clear();
+
+ for (int i = 0; i < vLinkArray.length; i++) {
+ this._linkList.add(vLinkArray[i]);
}
- } //-- void setLink(uk.ac.vamsas.objects.core.Link)
+ }
/**
- * Method setMap
+ * Sets the value of '_linkList' by copying the given Vector.
+ * All elements will be checked for type safety.
*
+ * @param vLinkList the Vector to copy.
+ */
+ public void setLink(
+ final java.util.Vector vLinkList) {
+ // copy vector
+ this._linkList.clear();
+
+ this._linkList.addAll(vLinkList);
+ }
+
+ /**
+ * Sets the value of '_linkList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param linkVector the Vector to set.
+ */
+ public void setLinkAsReference(
+ final java.util.Vector linkVector) {
+ this._linkList = linkVector;
+ }
+
+ /**
*
*
* @param index
* @param vMap
- */
- public void setMap(int index, uk.ac.vamsas.objects.core.Map vMap)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _mapList.size())) {
- throw new IndexOutOfBoundsException("setMap: Index value '"+index+"' not in range [0.."+_mapList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setMap(
+ final int index,
+ final uk.ac.vamsas.objects.core.Map vMap)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._mapList.size()) {
+ throw new IndexOutOfBoundsException("setMap: Index value '" + index + "' not in range [0.." + (this._mapList.size() - 1) + "]");
}
- _mapList.setElementAt(vMap, index);
- } //-- void setMap(int, uk.ac.vamsas.objects.core.Map)
+
+ this._mapList.set(index, vMap);
+ }
/**
- * Method setMap
*
*
- *
- * @param mapArray
+ * @param vMapArray
*/
- public void setMap(uk.ac.vamsas.objects.core.Map[] mapArray)
- {
+ public void setMap(
+ final uk.ac.vamsas.objects.core.Map[] vMapArray) {
//-- copy array
- _mapList.removeAllElements();
- for (int i = 0; i < mapArray.length; i++) {
- _mapList.addElement(mapArray[i]);
+ _mapList.clear();
+
+ for (int i = 0; i < vMapArray.length; i++) {
+ this._mapList.add(vMapArray[i]);
}
- } //-- void setMap(uk.ac.vamsas.objects.core.Map)
+ }
/**
- * Method setProperty
+ * Sets the value of '_mapList' by copying the given Vector.
+ * All elements will be checked for type safety.
*
+ * @param vMapList the Vector to copy.
+ */
+ public void setMap(
+ final java.util.Vector vMapList) {
+ // copy vector
+ this._mapList.clear();
+
+ this._mapList.addAll(vMapList);
+ }
+
+ /**
+ * Sets the value of '_mapList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param mapVector the Vector to set.
+ */
+ public void setMapAsReference(
+ final java.util.Vector mapVector) {
+ this._mapList = mapVector;
+ }
+
+ /**
*
*
* @param index
* @param vProperty
- */
- public void setProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _propertyList.size())) {
- throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setProperty(
+ final int index,
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
}
- _propertyList.setElementAt(vProperty, index);
- } //-- void setProperty(int, uk.ac.vamsas.objects.core.Property)
+
+ this._propertyList.set(index, vProperty);
+ }
/**
- * Method setProperty
- *
*
*
- * @param propertyArray
+ * @param vPropertyArray
*/
- public void setProperty(uk.ac.vamsas.objects.core.Property[] propertyArray)
- {
+ public void setProperty(
+ final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {
//-- copy array
- _propertyList.removeAllElements();
- for (int i = 0; i < propertyArray.length; i++) {
- _propertyList.addElement(propertyArray[i]);
+ _propertyList.clear();
+
+ for (int i = 0; i < vPropertyArray.length; i++) {
+ this._propertyList.add(vPropertyArray[i]);
}
- } //-- void setProperty(uk.ac.vamsas.objects.core.Property)
+ }
+
+ /**
+ * Sets the value of '_propertyList' by copying the given
+ * Vector. All elements will be checked for type safety.
+ *
+ * @param vPropertyList the Vector to copy.
+ */
+ public void setProperty(
+ final java.util.Vector vPropertyList) {
+ // copy vector
+ this._propertyList.clear();
+
+ this._propertyList.addAll(vPropertyList);
+ }
+
+ /**
+ * Sets the value of '_propertyList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param propertyVector the Vector to set.
+ */
+ public void setPropertyAsReference(
+ final java.util.Vector propertyVector) {
+ this._propertyList = propertyVector;
+ }
/**
* Sets the value of field 'source'. The field 'source' has the
*
* @param source the value of field 'source'.
*/
- public void setSource(java.lang.String source)
- {
+ public void setSource(
+ final java.lang.String source) {
this._source = source;
- } //-- void setSource(java.lang.String)
+ }
/**
* Sets the value of field 'version'. The field 'version' has
*
* @param version the value of field 'version'.
*/
- public void setVersion(java.lang.String version)
- {
+ public void setVersion(
+ final java.lang.String version) {
this._version = version;
- } //-- void setVersion(java.lang.String)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return DbRef
- */
- public static uk.ac.vamsas.objects.core.DbRef unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ * @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.DbRef
+ */
+ public static uk.ac.vamsas.objects.core.DbRef unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.DbRef) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.DbRef.class, reader);
- } //-- uk.ac.vamsas.objects.core.DbRef 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()
+ }
}
/*
* 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 Entry.
//- Constructors -/
//----------------/
- public Entry()
- {
+ public Entry() {
super();
- _propertyList = new Vector();
- _paramList = new Vector();
- _inputList = new Vector();
- } //-- uk.ac.vamsas.objects.core.Entry()
+ this._propertyList = new java.util.Vector();
+ this._paramList = new java.util.Vector();
+ this._inputList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addInput
- *
*
*
* @param vInput
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addInput(uk.ac.vamsas.objects.core.Input vInput)
- throws java.lang.IndexOutOfBoundsException
- {
- _inputList.addElement(vInput);
- } //-- void addInput(uk.ac.vamsas.objects.core.Input)
+ public void addInput(
+ final uk.ac.vamsas.objects.core.Input vInput)
+ throws java.lang.IndexOutOfBoundsException {
+ this._inputList.addElement(vInput);
+ }
/**
- * Method addInput
- *
*
*
* @param index
* @param vInput
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addInput(int index, uk.ac.vamsas.objects.core.Input vInput)
- throws java.lang.IndexOutOfBoundsException
- {
- _inputList.insertElementAt(vInput, index);
- } //-- void addInput(int, uk.ac.vamsas.objects.core.Input)
+ public void addInput(
+ final int index,
+ final uk.ac.vamsas.objects.core.Input vInput)
+ throws java.lang.IndexOutOfBoundsException {
+ this._inputList.add(index, vInput);
+ }
/**
- * Method addParam
- *
*
*
* @param vParam
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addParam(uk.ac.vamsas.objects.core.Param vParam)
- throws java.lang.IndexOutOfBoundsException
- {
- _paramList.addElement(vParam);
- } //-- void addParam(uk.ac.vamsas.objects.core.Param)
+ public void addParam(
+ final uk.ac.vamsas.objects.core.Param vParam)
+ throws java.lang.IndexOutOfBoundsException {
+ this._paramList.addElement(vParam);
+ }
/**
- * Method addParam
- *
*
*
* @param index
* @param vParam
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addParam(int index, uk.ac.vamsas.objects.core.Param vParam)
- throws java.lang.IndexOutOfBoundsException
- {
- _paramList.insertElementAt(vParam, index);
- } //-- void addParam(int, uk.ac.vamsas.objects.core.Param)
+ public void addParam(
+ final int index,
+ final uk.ac.vamsas.objects.core.Param vParam)
+ throws java.lang.IndexOutOfBoundsException {
+ this._paramList.add(index, vParam);
+ }
/**
- * Method addProperty
- *
*
*
* @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addProperty(uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- _propertyList.addElement(vProperty);
- } //-- void addProperty(uk.ac.vamsas.objects.core.Property)
+ public void addProperty(
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.addElement(vProperty);
+ }
/**
- * Method addProperty
- *
*
*
* @param index
* @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- _propertyList.insertElementAt(vProperty, index);
- } //-- void addProperty(int, uk.ac.vamsas.objects.core.Property)
+ public void addProperty(
+ final int index,
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.add(index, vProperty);
+ }
/**
- * Method enumerateInput
- *
- *
+ * Method enumerateInput.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Input elements
*/
- public java.util.Enumeration enumerateInput()
- {
- return _inputList.elements();
- } //-- java.util.Enumeration enumerateInput()
+ public java.util.Enumeration enumerateInput(
+ ) {
+ return this._inputList.elements();
+ }
/**
- * Method enumerateParam
+ * Method enumerateParam.
*
- *
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Param elements
*/
- public java.util.Enumeration enumerateParam()
- {
- return _paramList.elements();
- } //-- java.util.Enumeration enumerateParam()
+ public java.util.Enumeration enumerateParam(
+ ) {
+ return this._paramList.elements();
+ }
/**
- * Method enumerateProperty
- *
- *
+ * Method enumerateProperty.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Property elements
*/
- public java.util.Enumeration enumerateProperty()
- {
- return _propertyList.elements();
- } //-- java.util.Enumeration enumerateProperty()
+ public java.util.Enumeration enumerateProperty(
+ ) {
+ return this._propertyList.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)
+ }
/**
* Returns the value of field 'action'. The field 'action' has
* the following description: Did what
*
- * @return String
- * @return the value of field 'action'.
+ * @return the value of field 'Action'.
*/
- public java.lang.String getAction()
- {
+ public java.lang.String getAction(
+ ) {
return this._action;
- } //-- java.lang.String getAction()
+ }
/**
* Returns the value of field 'app'. The field 'app' has the
* following description: With which application
*
- * @return String
- * @return the value of field 'app'.
+ * @return the value of field 'App'.
*/
- public java.lang.String getApp()
- {
+ public java.lang.String getApp(
+ ) {
return this._app;
- } //-- java.lang.String getApp()
+ }
/**
* Returns the value of field 'date'. The field 'date' has the
* following description: When
*
- * @return Date
- * @return the value of field 'date'.
+ * @return the value of field 'Date'.
*/
- public org.exolab.castor.types.Date getDate()
- {
+ public org.exolab.castor.types.Date getDate(
+ ) {
return this._date;
- } //-- org.exolab.castor.types.Date getDate()
+ }
/**
* Returns the value of field 'id'. The field 'id' has the
* 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()
+ }
/**
- * Method getInput
- *
- *
+ * Method getInput.
*
* @param index
- * @return Input
- */
- public uk.ac.vamsas.objects.core.Input getInput(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _inputList.size())) {
- throw new IndexOutOfBoundsException("getInput: Index value '"+index+"' not in range [0.."+_inputList.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.Input at
+ * the given index
+ */
+ public uk.ac.vamsas.objects.core.Input getInput(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._inputList.size()) {
+ throw new IndexOutOfBoundsException("getInput: Index value '" + index + "' not in range [0.." + (this._inputList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Input) _inputList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Input getInput(int)
+ return (uk.ac.vamsas.objects.core.Input) _inputList.get(index);
+ }
/**
- * Method getInput
- *
+ * Method getInput.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 Input
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Input[] getInput()
- {
- int size = _inputList.size();
- uk.ac.vamsas.objects.core.Input[] mArray = new uk.ac.vamsas.objects.core.Input[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Input) _inputList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Input[] getInput()
+ public uk.ac.vamsas.objects.core.Input[] getInput(
+ ) {
+ uk.ac.vamsas.objects.core.Input[] array = new uk.ac.vamsas.objects.core.Input[0];
+ return (uk.ac.vamsas.objects.core.Input[]) this._inputList.toArray(array);
+ }
/**
- * Method getInputCount
- *
- *
+ * Method getInputAsReference.Returns a reference to
+ * '_inputList'. No type checking is performed on any
+ * modifications to the Vector.
*
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getInputCount()
- {
- return _inputList.size();
- } //-- int getInputCount()
+ public java.util.Vector getInputAsReference(
+ ) {
+ return this._inputList;
+ }
/**
- * Method getParam
- *
+ * Method getInputCount.
*
+ * @return the size of this collection
+ */
+ public int getInputCount(
+ ) {
+ return this._inputList.size();
+ }
+
+ /**
+ * Method getParam.
*
* @param index
- * @return Param
- */
- public uk.ac.vamsas.objects.core.Param getParam(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _paramList.size())) {
- throw new IndexOutOfBoundsException("getParam: Index value '"+index+"' not in range [0.."+_paramList.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.Param at
+ * the given index
+ */
+ public uk.ac.vamsas.objects.core.Param getParam(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._paramList.size()) {
+ throw new IndexOutOfBoundsException("getParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Param) _paramList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Param getParam(int)
+ return (uk.ac.vamsas.objects.core.Param) _paramList.get(index);
+ }
/**
- * Method getParam
+ * Method getParam.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 Param
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Param[] getParam()
- {
- int size = _paramList.size();
- uk.ac.vamsas.objects.core.Param[] mArray = new uk.ac.vamsas.objects.core.Param[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Param) _paramList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Param[] getParam()
+ public uk.ac.vamsas.objects.core.Param[] getParam(
+ ) {
+ uk.ac.vamsas.objects.core.Param[] array = new uk.ac.vamsas.objects.core.Param[0];
+ return (uk.ac.vamsas.objects.core.Param[]) this._paramList.toArray(array);
+ }
/**
- * Method getParamCount
- *
+ * Method getParamAsReference.Returns a reference to
+ * '_paramList'. No type checking is performed on any
+ * modifications to the Vector.
*
- *
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getParamCount()
- {
- return _paramList.size();
- } //-- int getParamCount()
+ public java.util.Vector getParamAsReference(
+ ) {
+ return this._paramList;
+ }
/**
- * Method getProperty
- *
+ * Method getParamCount.
*
+ * @return the size of this collection
+ */
+ public int getParamCount(
+ ) {
+ return this._paramList.size();
+ }
+
+ /**
+ * Method getProperty.
*
* @param index
- * @return Property
- */
- public uk.ac.vamsas.objects.core.Property getProperty(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _propertyList.size())) {
- throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.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.Property
+ * at the given index
+ */
+ public uk.ac.vamsas.objects.core.Property getProperty(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Property getProperty(int)
+ return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);
+ }
/**
- * Method getProperty
- *
- *
+ * Method getProperty.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 Property
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Property[] getProperty()
- {
- int size = _propertyList.size();
- uk.ac.vamsas.objects.core.Property[] mArray = new uk.ac.vamsas.objects.core.Property[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Property[] getProperty()
+ public uk.ac.vamsas.objects.core.Property[] getProperty(
+ ) {
+ uk.ac.vamsas.objects.core.Property[] array = new uk.ac.vamsas.objects.core.Property[0];
+ return (uk.ac.vamsas.objects.core.Property[]) this._propertyList.toArray(array);
+ }
/**
- * Method getPropertyCount
- *
+ * Method getPropertyAsReference.Returns a reference to
+ * '_propertyList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getPropertyAsReference(
+ ) {
+ return this._propertyList;
+ }
+
+ /**
+ * Method getPropertyCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getPropertyCount()
- {
- return _propertyList.size();
- } //-- int getPropertyCount()
+ public int getPropertyCount(
+ ) {
+ return this._propertyList.size();
+ }
/**
* Returns the value of field 'user'. The field 'user' has the
* following description: Who
*
- * @return String
- * @return the value of field 'user'.
+ * @return the value of field 'User'.
*/
- public java.lang.String getUser()
- {
+ public java.lang.String getUser(
+ ) {
return this._user;
- } //-- java.lang.String getUser()
+ }
/**
- * Method isValid
- *
+ * 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 (_user != null) {
+ result = 37 * result + _user.hashCode();
+ }
+ if (_app != null) {
+ result = 37 * result + _app.hashCode();
+ }
+ if (_action != null) {
+ result = 37 * result + _action.hashCode();
+ }
+ if (_date != null) {
+ result = 37 * result + _date.hashCode();
+ }
+ if (_propertyList != null) {
+ result = 37 * result + _propertyList.hashCode();
+ }
+ if (_paramList != null) {
+ result = 37 * result + _paramList.hashCode();
+ }
+ if (_inputList != null) {
+ result = 37 * result + _inputList.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
- */
- public void marshal(java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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
- */
- public void marshal(org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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 removeAllInput
- *
*/
- public void removeAllInput()
- {
- _inputList.removeAllElements();
- } //-- void removeAllInput()
+ public void removeAllInput(
+ ) {
+ this._inputList.clear();
+ }
/**
- * Method removeAllParam
- *
*/
- public void removeAllParam()
- {
- _paramList.removeAllElements();
- } //-- void removeAllParam()
+ public void removeAllParam(
+ ) {
+ this._paramList.clear();
+ }
/**
- * Method removeAllProperty
- *
*/
- public void removeAllProperty()
- {
- _propertyList.removeAllElements();
- } //-- void removeAllProperty()
+ public void removeAllProperty(
+ ) {
+ this._propertyList.clear();
+ }
/**
- * Method removeInput
- *
+ * Method removeInput.
*
+ * @param vInput
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeInput(
+ final uk.ac.vamsas.objects.core.Input vInput) {
+ boolean removed = _inputList.remove(vInput);
+ return removed;
+ }
+
+ /**
+ * Method removeInputAt.
*
* @param index
- * @return Input
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Input removeInput(int index)
- {
- java.lang.Object obj = _inputList.elementAt(index);
- _inputList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Input removeInputAt(
+ final int index) {
+ java.lang.Object obj = this._inputList.remove(index);
return (uk.ac.vamsas.objects.core.Input) obj;
- } //-- uk.ac.vamsas.objects.core.Input removeInput(int)
+ }
/**
- * Method removeParam
- *
+ * Method removeParam.
*
+ * @param vParam
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeParam(
+ final uk.ac.vamsas.objects.core.Param vParam) {
+ boolean removed = _paramList.remove(vParam);
+ return removed;
+ }
+
+ /**
+ * Method removeParamAt.
*
* @param index
- * @return Param
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Param removeParam(int index)
- {
- java.lang.Object obj = _paramList.elementAt(index);
- _paramList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Param removeParamAt(
+ final int index) {
+ java.lang.Object obj = this._paramList.remove(index);
return (uk.ac.vamsas.objects.core.Param) obj;
- } //-- uk.ac.vamsas.objects.core.Param removeParam(int)
+ }
/**
- * Method removeProperty
- *
+ * Method removeProperty.
*
+ * @param vProperty
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeProperty(
+ final uk.ac.vamsas.objects.core.Property vProperty) {
+ boolean removed = _propertyList.remove(vProperty);
+ return removed;
+ }
+
+ /**
+ * Method removePropertyAt.
*
* @param index
- * @return Property
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Property removeProperty(int index)
- {
- java.lang.Object obj = _propertyList.elementAt(index);
- _propertyList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Property removePropertyAt(
+ final int index) {
+ java.lang.Object obj = this._propertyList.remove(index);
return (uk.ac.vamsas.objects.core.Property) obj;
- } //-- uk.ac.vamsas.objects.core.Property removeProperty(int)
+ }
/**
* Sets the value of field 'action'. The field 'action' has the
*
* @param action the value of field 'action'.
*/
- public void setAction(java.lang.String action)
- {
+ public void setAction(
+ final java.lang.String action) {
this._action = action;
- } //-- void setAction(java.lang.String)
+ }
/**
* Sets the value of field 'app'. The field 'app' has the
*
* @param app the value of field 'app'.
*/
- public void setApp(java.lang.String app)
- {
+ public void setApp(
+ final java.lang.String app) {
this._app = app;
- } //-- void setApp(java.lang.String)
+ }
/**
* Sets the value of field 'date'. The field 'date' has the
*
* @param date the value of field 'date'.
*/
- public void setDate(org.exolab.castor.types.Date date)
- {
+ public void setDate(
+ final org.exolab.castor.types.Date date) {
this._date = date;
- } //-- void setDate(org.exolab.castor.types.Date)
+ }
/**
* 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)
+ }
/**
- * Method setInput
- *
*
*
* @param index
* @param vInput
- */
- public void setInput(int index, uk.ac.vamsas.objects.core.Input vInput)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _inputList.size())) {
- throw new IndexOutOfBoundsException("setInput: Index value '"+index+"' not in range [0.."+_inputList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setInput(
+ final int index,
+ final uk.ac.vamsas.objects.core.Input vInput)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._inputList.size()) {
+ throw new IndexOutOfBoundsException("setInput: Index value '" + index + "' not in range [0.." + (this._inputList.size() - 1) + "]");
}
- _inputList.setElementAt(vInput, index);
- } //-- void setInput(int, uk.ac.vamsas.objects.core.Input)
+
+ this._inputList.set(index, vInput);
+ }
/**
- * Method setInput
*
*
- *
- * @param inputArray
+ * @param vInputArray
*/
- public void setInput(uk.ac.vamsas.objects.core.Input[] inputArray)
- {
+ public void setInput(
+ final uk.ac.vamsas.objects.core.Input[] vInputArray) {
//-- copy array
- _inputList.removeAllElements();
- for (int i = 0; i < inputArray.length; i++) {
- _inputList.addElement(inputArray[i]);
+ _inputList.clear();
+
+ for (int i = 0; i < vInputArray.length; i++) {
+ this._inputList.add(vInputArray[i]);
}
- } //-- void setInput(uk.ac.vamsas.objects.core.Input)
+ }
/**
- * Method setParam
+ * Sets the value of '_inputList' by copying the given Vector.
+ * All elements will be checked for type safety.
*
+ * @param vInputList the Vector to copy.
+ */
+ public void setInput(
+ final java.util.Vector vInputList) {
+ // copy vector
+ this._inputList.clear();
+
+ this._inputList.addAll(vInputList);
+ }
+
+ /**
+ * Sets the value of '_inputList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param inputVector the Vector to set.
+ */
+ public void setInputAsReference(
+ final java.util.Vector inputVector) {
+ this._inputList = inputVector;
+ }
+
+ /**
*
*
* @param index
* @param vParam
- */
- public void setParam(int index, uk.ac.vamsas.objects.core.Param vParam)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _paramList.size())) {
- throw new IndexOutOfBoundsException("setParam: Index value '"+index+"' not in range [0.."+_paramList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setParam(
+ final int index,
+ final uk.ac.vamsas.objects.core.Param vParam)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._paramList.size()) {
+ throw new IndexOutOfBoundsException("setParam: Index value '" + index + "' not in range [0.." + (this._paramList.size() - 1) + "]");
}
- _paramList.setElementAt(vParam, index);
- } //-- void setParam(int, uk.ac.vamsas.objects.core.Param)
+
+ this._paramList.set(index, vParam);
+ }
/**
- * Method setParam
- *
*
*
- * @param paramArray
+ * @param vParamArray
*/
- public void setParam(uk.ac.vamsas.objects.core.Param[] paramArray)
- {
+ public void setParam(
+ final uk.ac.vamsas.objects.core.Param[] vParamArray) {
//-- copy array
- _paramList.removeAllElements();
- for (int i = 0; i < paramArray.length; i++) {
- _paramList.addElement(paramArray[i]);
+ _paramList.clear();
+
+ for (int i = 0; i < vParamArray.length; i++) {
+ this._paramList.add(vParamArray[i]);
}
- } //-- void setParam(uk.ac.vamsas.objects.core.Param)
+ }
/**
- * Method setProperty
+ * Sets the value of '_paramList' by copying the given Vector.
+ * All elements will be checked for type safety.
*
+ * @param vParamList the Vector to copy.
+ */
+ public void setParam(
+ final java.util.Vector vParamList) {
+ // copy vector
+ this._paramList.clear();
+
+ this._paramList.addAll(vParamList);
+ }
+
+ /**
+ * Sets the value of '_paramList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param paramVector the Vector to set.
+ */
+ public void setParamAsReference(
+ final java.util.Vector paramVector) {
+ this._paramList = paramVector;
+ }
+
+ /**
*
*
* @param index
* @param vProperty
- */
- public void setProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _propertyList.size())) {
- throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setProperty(
+ final int index,
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
}
- _propertyList.setElementAt(vProperty, index);
- } //-- void setProperty(int, uk.ac.vamsas.objects.core.Property)
+
+ this._propertyList.set(index, vProperty);
+ }
/**
- * Method setProperty
*
*
- *
- * @param propertyArray
+ * @param vPropertyArray
*/
- public void setProperty(uk.ac.vamsas.objects.core.Property[] propertyArray)
- {
+ public void setProperty(
+ final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {
//-- copy array
- _propertyList.removeAllElements();
- for (int i = 0; i < propertyArray.length; i++) {
- _propertyList.addElement(propertyArray[i]);
+ _propertyList.clear();
+
+ for (int i = 0; i < vPropertyArray.length; i++) {
+ this._propertyList.add(vPropertyArray[i]);
}
- } //-- void setProperty(uk.ac.vamsas.objects.core.Property)
+ }
+
+ /**
+ * Sets the value of '_propertyList' by copying the given
+ * Vector. All elements will be checked for type safety.
+ *
+ * @param vPropertyList the Vector to copy.
+ */
+ public void setProperty(
+ final java.util.Vector vPropertyList) {
+ // copy vector
+ this._propertyList.clear();
+
+ this._propertyList.addAll(vPropertyList);
+ }
+
+ /**
+ * Sets the value of '_propertyList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param propertyVector the Vector to set.
+ */
+ public void setPropertyAsReference(
+ final java.util.Vector propertyVector) {
+ this._propertyList = propertyVector;
+ }
/**
* Sets the value of field 'user'. The field 'user' has the
*
* @param user the value of field 'user'.
*/
- public void setUser(java.lang.String user)
- {
+ public void setUser(
+ final java.lang.String user) {
this._user = user;
- } //-- void setUser(java.lang.String)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return Entry
- */
- public static uk.ac.vamsas.objects.core.Entry unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ * @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.Entry
+ */
+ public static uk.ac.vamsas.objects.core.Entry unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.Entry) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Entry.class, reader);
- } //-- uk.ac.vamsas.objects.core.Entry 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()
+ }
}
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Discrete symbol - possibly graphically represented\r
//- Constructors -/\r
//----------------/\r
\r
- public Glyph() \r
- {\r
+ public Glyph() {\r
super();\r
setContent("");\r
setDict("utf8");\r
- } //-- uk.ac.vamsas.objects.core.Glyph()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'content'. The field 'content'\r
* has the following description: internal content storage\r
* \r
- * @return String\r
- * @return the value of field 'content'.\r
+ * @return the value of field 'Content'.\r
*/\r
- public java.lang.String getContent()\r
- {\r
+ public java.lang.String getContent(\r
+ ) {\r
return this._content;\r
- } //-- java.lang.String getContent() \r
+ }\r
\r
/**\r
* Returns the value of field 'dict'. The field 'dict' has the\r
* applications must ensure they gracefully deal with\r
* invalid entries here \r
* \r
- * @return String\r
- * @return the value of field 'dict'.\r
+ * @return the value of field 'Dict'.\r
*/\r
- public java.lang.String getDict()\r
- {\r
+ public java.lang.String getDict(\r
+ ) {\r
return this._dict;\r
- } //-- java.lang.String getDict() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ if (_content != null) {\r
+ result = 37 * result + _content.hashCode();\r
+ }\r
+ if (_dict != null) {\r
+ result = 37 * result + _dict.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'content'. The field 'content' has\r
* \r
* @param content the value of field 'content'.\r
*/\r
- public void setContent(java.lang.String content)\r
- {\r
+ public void setContent(\r
+ final java.lang.String content) {\r
this._content = content;\r
- } //-- void setContent(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'dict'. The field 'dict' has the\r
* \r
* @param dict the value of field 'dict'.\r
*/\r
- public void setDict(java.lang.String dict)\r
- {\r
+ public void setDict(\r
+ final java.lang.String dict) {\r
this._dict = dict;\r
- } //-- void setDict(java.lang.String) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return Glyph\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.Glyph\r
*/\r
- public static uk.ac.vamsas.objects.core.Glyph unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
+ public static uk.ac.vamsas.objects.core.Glyph unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
return (uk.ac.vamsas.objects.core.Glyph) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Glyph.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.Glyph unmarshal(java.io.Reader) \r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Class Input.\r
//--------------------------/\r
\r
/**\r
- * Field _name\r
+ * Field _name.\r
*/\r
private java.lang.String _name;\r
\r
//- Constructors -/\r
//----------------/\r
\r
- public Input() \r
- {\r
+ public Input() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.Input()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'name'.\r
* \r
- * @return String\r
- * @return the value of field 'name'.\r
+ * @return the value of field 'Name'.\r
*/\r
- public java.lang.String getName()\r
- {\r
+ public java.lang.String getName(\r
+ ) {\r
return this._name;\r
- } //-- java.lang.String getName() \r
+ }\r
\r
/**\r
* Returns the value of field 'objRef'. The field 'objRef' has\r
* specfication\r
* \r
* \r
- * @return Object\r
- * @return the value of field 'objRef'.\r
+ * @return the value of field 'ObjRef'.\r
*/\r
- public java.lang.Object getObjRef()\r
- {\r
+ public java.lang.Object getObjRef(\r
+ ) {\r
return this._objRef;\r
- } //-- java.lang.Object getObjRef() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ if (_name != null) {\r
+ result = 37 * result + _name.hashCode();\r
+ }\r
+ if (_objRef != null) {\r
+ result = 37 * result + _objRef.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'name'.\r
* \r
* @param name the value of field 'name'.\r
*/\r
- public void setName(java.lang.String name)\r
- {\r
+ public void setName(\r
+ final java.lang.String name) {\r
this._name = name;\r
- } //-- void setName(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'objRef'. The field 'objRef' has the\r
* \r
* @param objRef the value of field 'objRef'.\r
*/\r
- public void setObjRef(java.lang.Object objRef)\r
- {\r
+ public void setObjRef(\r
+ final java.lang.Object objRef) {\r
this._objRef = objRef;\r
- } //-- void setObjRef(java.lang.Object) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return RangeType\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType\r
*/\r
- public static uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- return (uk.ac.vamsas.objects.core.Input) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Input.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader) \r
+ public static uk.ac.vamsas.objects.core.RangeType unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+ return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Input.class, reader);\r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Class Instance.\r
//--------------------------/\r
\r
/**\r
- * Field _urn\r
+ * Field _urn.\r
*/\r
private java.lang.String _urn;\r
\r
//- Constructors -/\r
//----------------/\r
\r
- public Instance() \r
- {\r
+ public Instance() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.Instance()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'urn'.\r
* \r
- * @return String\r
- * @return the value of field 'urn'.\r
+ * @return the value of field 'Urn'.\r
*/\r
- public java.lang.String getUrn()\r
- {\r
+ public java.lang.String getUrn(\r
+ ) {\r
return this._urn;\r
- } //-- java.lang.String getUrn() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ if (_urn != null) {\r
+ result = 37 * result + _urn.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'urn'.\r
* \r
* @param urn the value of field 'urn'.\r
*/\r
- public void setUrn(java.lang.String urn)\r
- {\r
+ public void setUrn(\r
+ final java.lang.String urn) {\r
this._urn = urn;\r
- } //-- void setUrn(java.lang.String) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return AppData\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.AppData\r
*/\r
- public static uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- return (uk.ac.vamsas.objects.core.Instance) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Instance.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader) \r
+ public static uk.ac.vamsas.objects.core.AppData unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+ return (uk.ac.vamsas.objects.core.AppData) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Instance.class, reader);\r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Class Link.\r
//- Constructors -/\r
//----------------/\r
\r
- public Link() \r
- {\r
+ public Link() {\r
super();\r
setContent("");\r
- } //-- uk.ac.vamsas.objects.core.Link()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'content'. The field 'content'\r
* has the following description: internal content storage\r
* \r
- * @return String\r
- * @return the value of field 'content'.\r
+ * @return the value of field 'Content'.\r
*/\r
- public java.lang.String getContent()\r
- {\r
+ public java.lang.String getContent(\r
+ ) {\r
return this._content;\r
- } //-- java.lang.String getContent() \r
+ }\r
\r
/**\r
* Returns the value of field 'href'. The field 'href' has the\r
* following description: The URI\r
* \r
- * @return String\r
- * @return the value of field 'href'.\r
+ * @return the value of field 'Href'.\r
*/\r
- public java.lang.String getHref()\r
- {\r
+ public java.lang.String getHref(\r
+ ) {\r
return this._href;\r
- } //-- java.lang.String getHref() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ if (_content != null) {\r
+ result = 37 * result + _content.hashCode();\r
+ }\r
+ if (_href != null) {\r
+ result = 37 * result + _href.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'content'. The field 'content' has\r
* \r
* @param content the value of field 'content'.\r
*/\r
- public void setContent(java.lang.String content)\r
- {\r
+ public void setContent(\r
+ final java.lang.String content) {\r
this._content = content;\r
- } //-- void setContent(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'href'. The field 'href' has the\r
* \r
* @param href the value of field 'href'.\r
*/\r
- public void setHref(java.lang.String href)\r
- {\r
+ public void setHref(\r
+ final java.lang.String href) {\r
this._href = href;\r
- } //-- void setHref(java.lang.String) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return Link\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.Link\r
*/\r
- public static uk.ac.vamsas.objects.core.Link unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
+ public static uk.ac.vamsas.objects.core.Link unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
return (uk.ac.vamsas.objects.core.Link) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Link.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.Link unmarshal(java.io.Reader) \r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*
* 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 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 LockFile.
//- Constructors -/
//----------------/
- public LockFile()
- {
+ public LockFile() {
super();
setContent("");
- } //-- uk.ac.vamsas.objects.core.LockFile()
+ }
//-----------/
//-----------/
/**
- * 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)
+ }
/**
* Returns the value of field 'content'. The field 'content'
* has the following description: internal content storage
*
- * @return String
- * @return the value of field 'content'.
+ * @return the value of field 'Content'.
*/
- public java.lang.String getContent()
- {
+ public java.lang.String getContent(
+ ) {
return this._content;
- } //-- java.lang.String getContent()
+ }
/**
- * Method isValid
- *
+ * 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 (_content != null) {
+ result = 37 * result + _content.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)
+ }
/**
* Sets the value of field 'content'. The field 'content' has
*
* @param content the value of field 'content'.
*/
- public void setContent(java.lang.String content)
- {
+ public void setContent(
+ final java.lang.String content) {
this._content = content;
- } //-- void setContent(java.lang.String)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return LockFile
+ * @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.LockFile
*/
- public static uk.ac.vamsas.objects.core.LockFile unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ public static uk.ac.vamsas.objects.core.LockFile unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.LockFile) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.LockFile.class, reader);
- } //-- uk.ac.vamsas.objects.core.LockFile 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()
+ }
}
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* From: Offset to first\r
//- Constructors -/\r
//----------------/\r
\r
- public Map() \r
- {\r
+ public Map() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.Map()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
\r
if (obj instanceof Map) {\r
\r
- Map temp = (Map)obj;\r
- return true;\r
- }\r
- return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return MapList\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.MapList\r
*/\r
- public static uk.ac.vamsas.objects.core.MapList unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- return (uk.ac.vamsas.objects.core.Map) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Map.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.MapList unmarshal(java.io.Reader) \r
+ public static uk.ac.vamsas.objects.core.MapList unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+ return (uk.ac.vamsas.objects.core.MapList) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Map.class, reader);\r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Class MapList.\r
* start\r
* position on 'onto' maps to \r
*/\r
- private int _from = 0;\r
+ private long _from = 0;\r
\r
/**\r
* keeps track of state for field: _from\r
* Offset to last position in dataset sequence record that end\r
* position on 'onto' maps to \r
*/\r
- private int _to = 0;\r
+ private long _to = 0;\r
\r
/**\r
* keeps track of state for field: _to\r
* offset)\r
* position in sequence maps to \r
*/\r
- private int _start;\r
+ private long _start;\r
\r
/**\r
* keeps track of state for field: _start\r
* Offset to last position in database entry that last (offset)\r
* position in sequence maps to \r
*/\r
- private int _end;\r
+ private long _end;\r
\r
/**\r
* keeps track of state for field: _end\r
//- Constructors -/\r
//----------------/\r
\r
- public MapList() \r
- {\r
+ public MapList() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.MapList()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Method deleteEnd\r
- * \r
*/\r
- public void deleteEnd()\r
- {\r
+ public void deleteEnd(\r
+ ) {\r
this._has_end= false;\r
- } //-- void deleteEnd() \r
+ }\r
\r
/**\r
- * Method deleteFrom\r
- * \r
*/\r
- public void deleteFrom()\r
- {\r
+ public void deleteFrom(\r
+ ) {\r
this._has_from= false;\r
- } //-- void deleteFrom() \r
+ }\r
\r
/**\r
- * Method deleteStart\r
- * \r
*/\r
- public void deleteStart()\r
- {\r
+ public void deleteStart(\r
+ ) {\r
this._has_start= false;\r
- } //-- void deleteStart() \r
+ }\r
\r
/**\r
- * Method deleteTo\r
- * \r
*/\r
- public void deleteTo()\r
- {\r
+ public void deleteTo(\r
+ ) {\r
this._has_to= false;\r
- } //-- void deleteTo() \r
+ }\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'end'. The field 'end' has the\r
* entry that last (offset)\r
* position in sequence maps to \r
* \r
- * @return int\r
- * @return the value of field 'end'.\r
+ * @return the value of field 'End'.\r
*/\r
- public int getEnd()\r
- {\r
+ public long getEnd(\r
+ ) {\r
return this._end;\r
- } //-- int getEnd() \r
+ }\r
\r
/**\r
* Returns the value of field 'from'. The field 'from' has the\r
* sequence record that start\r
* position on 'onto' maps to \r
* \r
- * @return int\r
- * @return the value of field 'from'.\r
+ * @return the value of field 'From'.\r
*/\r
- public int getFrom()\r
- {\r
+ public long getFrom(\r
+ ) {\r
return this._from;\r
- } //-- int getFrom() \r
+ }\r
\r
/**\r
* Returns the value of field 'start'. The field 'start' has\r
* database entry that first (or offset)\r
* position in sequence maps to \r
* \r
- * @return int\r
- * @return the value of field 'start'.\r
+ * @return the value of field 'Start'.\r
*/\r
- public int getStart()\r
- {\r
+ public long getStart(\r
+ ) {\r
return this._start;\r
- } //-- int getStart() \r
+ }\r
\r
/**\r
* Returns the value of field 'to'. The field 'to' has the\r
* sequence record that end\r
* position on 'onto' maps to \r
* \r
- * @return int\r
- * @return the value of field 'to'.\r
+ * @return the value of field 'To'.\r
*/\r
- public int getTo()\r
- {\r
+ public long getTo(\r
+ ) {\r
return this._to;\r
- } //-- int getTo() \r
+ }\r
\r
/**\r
- * Method hasEnd\r
+ * Method hasEnd.\r
* \r
- * \r
- * \r
- * @return boolean\r
+ * @return true if at least one End has been added\r
*/\r
- public boolean hasEnd()\r
- {\r
+ public boolean hasEnd(\r
+ ) {\r
return this._has_end;\r
- } //-- boolean hasEnd() \r
+ }\r
\r
/**\r
- * Method hasFrom\r
- * \r
+ * Method hasFrom.\r
* \r
- * \r
- * @return boolean\r
+ * @return true if at least one From has been added\r
*/\r
- public boolean hasFrom()\r
- {\r
+ public boolean hasFrom(\r
+ ) {\r
return this._has_from;\r
- } //-- boolean hasFrom() \r
+ }\r
\r
/**\r
- * Method hasStart\r
- * \r
- * \r
+ * Method hasStart.\r
* \r
- * @return boolean\r
+ * @return true if at least one Start has been added\r
*/\r
- public boolean hasStart()\r
- {\r
+ public boolean hasStart(\r
+ ) {\r
return this._has_start;\r
- } //-- boolean hasStart() \r
+ }\r
\r
/**\r
- * Method hasTo\r
+ * Method hasTo.\r
* \r
- * \r
- * \r
- * @return boolean\r
+ * @return true if at least one To has been added\r
*/\r
- public boolean hasTo()\r
- {\r
+ public boolean hasTo(\r
+ ) {\r
return this._has_to;\r
- } //-- boolean hasTo() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ result = 37 * result + (int)(_from^(_from>>>32));\r
+ result = 37 * result + (int)(_to^(_to>>>32));\r
+ result = 37 * result + (int)(_start^(_start>>>32));\r
+ result = 37 * result + (int)(_end^(_end>>>32));\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'end'. The field 'end' has the\r
* \r
* @param end the value of field 'end'.\r
*/\r
- public void setEnd(int end)\r
- {\r
+ public void setEnd(\r
+ final long end) {\r
this._end = end;\r
this._has_end = true;\r
- } //-- void setEnd(int) \r
+ }\r
\r
/**\r
* Sets the value of field 'from'. The field 'from' has the\r
* \r
* @param from the value of field 'from'.\r
*/\r
- public void setFrom(int from)\r
- {\r
+ public void setFrom(\r
+ final long from) {\r
this._from = from;\r
this._has_from = true;\r
- } //-- void setFrom(int) \r
+ }\r
\r
/**\r
* Sets the value of field 'start'. The field 'start' has the\r
* \r
* @param start the value of field 'start'.\r
*/\r
- public void setStart(int start)\r
- {\r
+ public void setStart(\r
+ final long start) {\r
this._start = start;\r
this._has_start = true;\r
- } //-- void setStart(int) \r
+ }\r
\r
/**\r
* Sets the value of field 'to'. The field 'to' has the\r
* \r
* @param to the value of field 'to'.\r
*/\r
- public void setTo(int to)\r
- {\r
+ public void setTo(\r
+ final long to) {\r
this._to = to;\r
this._has_to = true;\r
- } //-- void setTo(int) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return MapList\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.MapList\r
*/\r
- public static uk.ac.vamsas.objects.core.MapList unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
+ public static uk.ac.vamsas.objects.core.MapList unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
return (uk.ac.vamsas.objects.core.MapList) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.MapList.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.MapList unmarshal(java.io.Reader) \r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Class Mapping.\r
//- Constructors -/\r
//----------------/\r
\r
- public Mapping() \r
- {\r
+ public Mapping() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.Mapping()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'onto'. The field 'onto' has the\r
* mapped\r
* \r
* \r
- * @return Object\r
- * @return the value of field 'onto'.\r
+ * @return the value of field 'Onto'.\r
*/\r
- public java.lang.Object getOnto()\r
- {\r
+ public java.lang.Object getOnto(\r
+ ) {\r
return this._onto;\r
- } //-- java.lang.Object getOnto() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ if (_onto != null) {\r
+ result = 37 * result + _onto.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'onto'. The field 'onto' has the\r
* \r
* @param onto the value of field 'onto'.\r
*/\r
- public void setOnto(java.lang.Object onto)\r
- {\r
+ public void setOnto(\r
+ final java.lang.Object onto) {\r
this._onto = onto;\r
- } //-- void setOnto(java.lang.Object) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return MapList\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.MapList\r
*/\r
- public static uk.ac.vamsas.objects.core.MapList unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- return (uk.ac.vamsas.objects.core.Mapping) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Mapping.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.MapList unmarshal(java.io.Reader) \r
+ public static uk.ac.vamsas.objects.core.MapList unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+ return (uk.ac.vamsas.objects.core.MapList) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Mapping.class, reader);\r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*
* 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 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 Newick.
private java.lang.String _content = "";
/**
- * Field _title
+ * Field _title.
*/
private java.lang.String _title;
private java.lang.String _id;
/**
- * Field _modifiable
+ * Field _modifiable.
*/
private java.lang.String _modifiable;
//- Constructors -/
//----------------/
- public Newick()
- {
+ public Newick() {
super();
setContent("");
- } //-- uk.ac.vamsas.objects.core.Newick()
+ }
//-----------/
//-----------/
/**
- * 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)
+ }
/**
* Returns the value of field 'content'. The field 'content'
* has the following description: internal content storage
*
- * @return String
- * @return the value of field 'content'.
+ * @return the value of field 'Content'.
*/
- public java.lang.String getContent()
- {
+ public java.lang.String getContent(
+ ) {
return this._content;
- } //-- java.lang.String getContent()
+ }
/**
* Returns the value of field 'id'. The field 'id' has the
* 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 'modifiable'.
*
- * @return String
- * @return the value of field 'modifiable'.
+ * @return the value of field 'Modifiable'.
*/
- public java.lang.String getModifiable()
- {
+ public java.lang.String getModifiable(
+ ) {
return this._modifiable;
- } //-- java.lang.String getModifiable()
+ }
/**
* Returns the value of field 'title'.
*
- * @return String
- * @return the value of field 'title'.
+ * @return the value of field 'Title'.
*/
- public java.lang.String getTitle()
- {
+ public java.lang.String getTitle(
+ ) {
return this._title;
- } //-- java.lang.String getTitle()
+ }
/**
- * Method isValid
- *
+ * 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 (_content != null) {
+ result = 37 * result + _content.hashCode();
+ }
+ if (_title != null) {
+ result = 37 * result + _title.hashCode();
+ }
+ if (_id != null) {
+ result = 37 * result + _id.hashCode();
+ }
+ if (_modifiable != null) {
+ result = 37 * result + _modifiable.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)
+ }
/**
* Sets the value of field 'content'. The field 'content' has
*
* @param content the value of field 'content'.
*/
- public void setContent(java.lang.String content)
- {
+ public void setContent(
+ final java.lang.String content) {
this._content = content;
- } //-- void setContent(java.lang.String)
+ }
/**
* 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 'modifiable'.
*
* @param modifiable the value of field 'modifiable'.
*/
- public void setModifiable(java.lang.String modifiable)
- {
+ public void setModifiable(
+ final java.lang.String modifiable) {
this._modifiable = modifiable;
- } //-- void setModifiable(java.lang.String)
+ }
/**
* Sets the value of field 'title'.
*
* @param title the value of field 'title'.
*/
- public void setTitle(java.lang.String title)
- {
+ public void setTitle(
+ final java.lang.String title) {
this._title = title;
- } //-- void setTitle(java.lang.String)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return Newick
+ * @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.Newick
*/
- public static uk.ac.vamsas.objects.core.Newick unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ public static uk.ac.vamsas.objects.core.Newick unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.Newick) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Newick.class, reader);
- } //-- uk.ac.vamsas.objects.core.Newick 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()
+ }
}
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Class Param.\r
private java.lang.String _content = "";\r
\r
/**\r
- * Field _name\r
+ * Field _name.\r
*/\r
private java.lang.String _name;\r
\r
//- Constructors -/\r
//----------------/\r
\r
- public Param() \r
- {\r
+ public Param() {\r
super();\r
setContent("");\r
- } //-- uk.ac.vamsas.objects.core.Param()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'content'. The field 'content'\r
* has the following description: internal content storage\r
* \r
- * @return String\r
- * @return the value of field 'content'.\r
+ * @return the value of field 'Content'.\r
*/\r
- public java.lang.String getContent()\r
- {\r
+ public java.lang.String getContent(\r
+ ) {\r
return this._content;\r
- } //-- java.lang.String getContent() \r
+ }\r
\r
/**\r
* Returns the value of field 'name'.\r
* \r
- * @return String\r
- * @return the value of field 'name'.\r
+ * @return the value of field 'Name'.\r
*/\r
- public java.lang.String getName()\r
- {\r
+ public java.lang.String getName(\r
+ ) {\r
return this._name;\r
- } //-- java.lang.String getName() \r
+ }\r
\r
/**\r
* Returns the value of field 'type'. The field 'type' has the\r
* prototype the\r
* input to a document. TODO: specify allowed types \r
* \r
- * @return String\r
- * @return the value of field 'type'.\r
+ * @return the value of field 'Type'.\r
*/\r
- public java.lang.String getType()\r
- {\r
+ public java.lang.String getType(\r
+ ) {\r
return this._type;\r
- } //-- java.lang.String getType() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ if (_content != null) {\r
+ result = 37 * result + _content.hashCode();\r
+ }\r
+ if (_name != null) {\r
+ result = 37 * result + _name.hashCode();\r
+ }\r
+ if (_type != null) {\r
+ result = 37 * result + _type.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'content'. The field 'content' has\r
* \r
* @param content the value of field 'content'.\r
*/\r
- public void setContent(java.lang.String content)\r
- {\r
+ public void setContent(\r
+ final java.lang.String content) {\r
this._content = content;\r
- } //-- void setContent(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'name'.\r
* \r
* @param name the value of field 'name'.\r
*/\r
- public void setName(java.lang.String name)\r
- {\r
+ public void setName(\r
+ final java.lang.String name) {\r
this._name = name;\r
- } //-- void setName(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'type'. The field 'type' has the\r
* \r
* @param type the value of field 'type'.\r
*/\r
- public void setType(java.lang.String type)\r
- {\r
+ public void setType(\r
+ final java.lang.String type) {\r
this._type = type;\r
- } //-- void setType(java.lang.String) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return Param\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.Param\r
*/\r
- public static uk.ac.vamsas.objects.core.Param unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
+ public static uk.ac.vamsas.objects.core.Param unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
return (uk.ac.vamsas.objects.core.Param) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Param.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.Param unmarshal(java.io.Reader) \r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* a position within the associated object's coordinate system\r
//--------------------------/\r
\r
/**\r
- * Field _i\r
+ * Field _i.\r
*/\r
private int _i;\r
\r
//- Constructors -/\r
//----------------/\r
\r
- public Pos() \r
- {\r
+ public Pos() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.Pos()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Method deleteI\r
- * \r
*/\r
- public void deleteI()\r
- {\r
+ public void deleteI(\r
+ ) {\r
this._has_i= false;\r
- } //-- void deleteI() \r
+ }\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'i'.\r
* \r
- * @return int\r
- * @return the value of field 'i'.\r
+ * @return the value of field 'I'.\r
*/\r
- public int getI()\r
- {\r
+ public int getI(\r
+ ) {\r
return this._i;\r
- } //-- int getI() \r
+ }\r
\r
/**\r
- * Method hasI\r
- * \r
- * \r
+ * Method hasI.\r
* \r
- * @return boolean\r
+ * @return true if at least one I has been added\r
*/\r
- public boolean hasI()\r
- {\r
+ public boolean hasI(\r
+ ) {\r
return this._has_i;\r
- } //-- boolean hasI() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ result = 37 * result + _i;\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'i'.\r
* \r
* @param i the value of field 'i'.\r
*/\r
- public void setI(int i)\r
- {\r
+ public void setI(\r
+ final int i) {\r
this._i = i;\r
this._has_i = true;\r
- } //-- void setI(int) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return Pos\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.Pos\r
*/\r
- public static uk.ac.vamsas.objects.core.Pos unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
+ public static uk.ac.vamsas.objects.core.Pos unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
return (uk.ac.vamsas.objects.core.Pos) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Pos.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.Pos unmarshal(java.io.Reader) \r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Class Property.\r
private java.lang.String _content = "";\r
\r
/**\r
- * Field _name\r
+ * Field _name.\r
*/\r
private java.lang.String _name;\r
\r
//- Constructors -/\r
//----------------/\r
\r
- public Property() \r
- {\r
+ public Property() {\r
super();\r
setContent("");\r
- } //-- uk.ac.vamsas.objects.core.Property()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'content'. The field 'content'\r
* has the following description: internal content storage\r
* \r
- * @return String\r
- * @return the value of field 'content'.\r
+ * @return the value of field 'Content'.\r
*/\r
- public java.lang.String getContent()\r
- {\r
+ public java.lang.String getContent(\r
+ ) {\r
return this._content;\r
- } //-- java.lang.String getContent() \r
+ }\r
\r
/**\r
* Returns the value of field 'name'.\r
* \r
- * @return String\r
- * @return the value of field 'name'.\r
+ * @return the value of field 'Name'.\r
*/\r
- public java.lang.String getName()\r
- {\r
+ public java.lang.String getName(\r
+ ) {\r
return this._name;\r
- } //-- java.lang.String getName() \r
+ }\r
\r
/**\r
* Returns the value of field 'type'. The field 'type' has the\r
* prototype the\r
* input to a document. TODO: specify allowed types \r
* \r
- * @return String\r
- * @return the value of field 'type'.\r
+ * @return the value of field 'Type'.\r
*/\r
- public java.lang.String getType()\r
- {\r
+ public java.lang.String getType(\r
+ ) {\r
return this._type;\r
- } //-- java.lang.String getType() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ if (_content != null) {\r
+ result = 37 * result + _content.hashCode();\r
+ }\r
+ if (_name != null) {\r
+ result = 37 * result + _name.hashCode();\r
+ }\r
+ if (_type != null) {\r
+ result = 37 * result + _type.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'content'. The field 'content' has\r
* \r
* @param content the value of field 'content'.\r
*/\r
- public void setContent(java.lang.String content)\r
- {\r
+ public void setContent(\r
+ final java.lang.String content) {\r
this._content = content;\r
- } //-- void setContent(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'name'.\r
* \r
* @param name the value of field 'name'.\r
*/\r
- public void setName(java.lang.String name)\r
- {\r
+ public void setName(\r
+ final java.lang.String name) {\r
this._name = name;\r
- } //-- void setName(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'type'. The field 'type' has the\r
* \r
* @param type the value of field 'type'.\r
*/\r
- public void setType(java.lang.String type)\r
- {\r
+ public void setType(\r
+ final java.lang.String type) {\r
this._type = type;\r
- } //-- void setType(java.lang.String) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return Property\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.Property\r
*/\r
- public static uk.ac.vamsas.objects.core.Property unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
+ public static uk.ac.vamsas.objects.core.Property unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
return (uk.ac.vamsas.objects.core.Property) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Property.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.Property unmarshal(java.io.Reader) \r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*
* 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 Provenance.
//--------------------------/
/**
- * Field _entryList
+ * Field _entryList.
*/
private java.util.Vector _entryList;
//- Constructors -/
//----------------/
- public Provenance()
- {
+ public Provenance() {
super();
- _entryList = new Vector();
- } //-- uk.ac.vamsas.objects.core.Provenance()
+ this._entryList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addEntry
- *
*
*
* @param vEntry
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addEntry(uk.ac.vamsas.objects.core.Entry vEntry)
- throws java.lang.IndexOutOfBoundsException
- {
- _entryList.addElement(vEntry);
- } //-- void addEntry(uk.ac.vamsas.objects.core.Entry)
+ public void addEntry(
+ final uk.ac.vamsas.objects.core.Entry vEntry)
+ throws java.lang.IndexOutOfBoundsException {
+ this._entryList.addElement(vEntry);
+ }
/**
- * Method addEntry
- *
*
*
* @param index
* @param vEntry
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addEntry(int index, uk.ac.vamsas.objects.core.Entry vEntry)
- throws java.lang.IndexOutOfBoundsException
- {
- _entryList.insertElementAt(vEntry, index);
- } //-- void addEntry(int, uk.ac.vamsas.objects.core.Entry)
+ public void addEntry(
+ final int index,
+ final uk.ac.vamsas.objects.core.Entry vEntry)
+ throws java.lang.IndexOutOfBoundsException {
+ this._entryList.add(index, vEntry);
+ }
/**
- * Method enumerateEntry
- *
+ * Method enumerateEntry.
*
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Entry elements
*/
- public java.util.Enumeration enumerateEntry()
- {
- return _entryList.elements();
- } //-- java.util.Enumeration enumerateEntry()
+ public java.util.Enumeration enumerateEntry(
+ ) {
+ return this._entryList.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 getEntry
- *
- *
+ * Method getEntry.
*
* @param index
- * @return Entry
+ * @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.Entry at
+ * the given index
*/
- public uk.ac.vamsas.objects.core.Entry getEntry(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _entryList.size())) {
- throw new IndexOutOfBoundsException("getEntry: Index value '"+index+"' not in range [0.."+_entryList.size()+ "]");
+ public uk.ac.vamsas.objects.core.Entry getEntry(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._entryList.size()) {
+ throw new IndexOutOfBoundsException("getEntry: Index value '" + index + "' not in range [0.." + (this._entryList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Entry) _entryList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Entry getEntry(int)
+ return (uk.ac.vamsas.objects.core.Entry) _entryList.get(index);
+ }
/**
- * Method getEntry
+ * Method getEntry.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 Entry
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Entry[] getEntry()
- {
- int size = _entryList.size();
- uk.ac.vamsas.objects.core.Entry[] mArray = new uk.ac.vamsas.objects.core.Entry[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Entry) _entryList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Entry[] getEntry()
+ public uk.ac.vamsas.objects.core.Entry[] getEntry(
+ ) {
+ uk.ac.vamsas.objects.core.Entry[] array = new uk.ac.vamsas.objects.core.Entry[0];
+ return (uk.ac.vamsas.objects.core.Entry[]) this._entryList.toArray(array);
+ }
/**
- * Method getEntryCount
- *
- *
+ * Method getEntryAsReference.Returns a reference to
+ * '_entryList'. No type checking is performed on any
+ * modifications to the Vector.
*
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getEntryCount()
- {
- return _entryList.size();
- } //-- int getEntryCount()
+ public java.util.Vector getEntryAsReference(
+ ) {
+ return this._entryList;
+ }
/**
- * Method isValid
+ * Method getEntryCount.
*
+ * @return the size of this collection
+ */
+ public int getEntryCount(
+ ) {
+ return this._entryList.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 (_entryList != null) {
+ result = 37 * result + _entryList.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 removeAllEntry
- *
*/
- public void removeAllEntry()
- {
- _entryList.removeAllElements();
- } //-- void removeAllEntry()
+ public void removeAllEntry(
+ ) {
+ this._entryList.clear();
+ }
/**
- * Method removeEntry
- *
+ * Method removeEntry.
*
+ * @param vEntry
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeEntry(
+ final uk.ac.vamsas.objects.core.Entry vEntry) {
+ boolean removed = _entryList.remove(vEntry);
+ return removed;
+ }
+
+ /**
+ * Method removeEntryAt.
*
* @param index
- * @return Entry
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Entry removeEntry(int index)
- {
- java.lang.Object obj = _entryList.elementAt(index);
- _entryList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Entry removeEntryAt(
+ final int index) {
+ java.lang.Object obj = this._entryList.remove(index);
return (uk.ac.vamsas.objects.core.Entry) obj;
- } //-- uk.ac.vamsas.objects.core.Entry removeEntry(int)
+ }
/**
- * Method setEntry
- *
*
*
* @param index
* @param vEntry
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void setEntry(int index, uk.ac.vamsas.objects.core.Entry vEntry)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _entryList.size())) {
- throw new IndexOutOfBoundsException("setEntry: Index value '"+index+"' not in range [0.."+_entryList.size()+ "]");
+ public void setEntry(
+ final int index,
+ final uk.ac.vamsas.objects.core.Entry vEntry)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._entryList.size()) {
+ throw new IndexOutOfBoundsException("setEntry: Index value '" + index + "' not in range [0.." + (this._entryList.size() - 1) + "]");
}
- _entryList.setElementAt(vEntry, index);
- } //-- void setEntry(int, uk.ac.vamsas.objects.core.Entry)
+
+ this._entryList.set(index, vEntry);
+ }
/**
- * Method setEntry
*
*
- *
- * @param entryArray
+ * @param vEntryArray
*/
- public void setEntry(uk.ac.vamsas.objects.core.Entry[] entryArray)
- {
+ public void setEntry(
+ final uk.ac.vamsas.objects.core.Entry[] vEntryArray) {
//-- copy array
- _entryList.removeAllElements();
- for (int i = 0; i < entryArray.length; i++) {
- _entryList.addElement(entryArray[i]);
+ _entryList.clear();
+
+ for (int i = 0; i < vEntryArray.length; i++) {
+ this._entryList.add(vEntryArray[i]);
}
- } //-- void setEntry(uk.ac.vamsas.objects.core.Entry)
+ }
/**
- * Method unmarshal
+ * Sets the value of '_entryList' by copying the given Vector.
+ * All elements will be checked for type safety.
*
+ * @param vEntryList the Vector to copy.
+ */
+ public void setEntry(
+ final java.util.Vector vEntryList) {
+ // copy vector
+ this._entryList.clear();
+
+ this._entryList.addAll(vEntryList);
+ }
+
+ /**
+ * Sets the value of '_entryList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
*
+ * @param entryVector the Vector to set.
+ */
+ public void setEntryAsReference(
+ final java.util.Vector entryVector) {
+ this._entryList = entryVector;
+ }
+
+ /**
+ * Method unmarshal.
*
* @param reader
- * @return Provenance
+ * @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.Provenance
*/
- public static uk.ac.vamsas.objects.core.Provenance unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ public static uk.ac.vamsas.objects.core.Provenance unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.Provenance) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Provenance.class, reader);
- } //-- uk.ac.vamsas.objects.core.Provenance 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()
+ }
}
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import java.util.Enumeration;\r
-import java.util.Vector;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Annotation for a rangeSpec - values can be attached for the\r
private java.lang.String _id;\r
\r
/**\r
- * Field _modifiable\r
+ * Field _modifiable.\r
*/\r
private java.lang.String _modifiable;\r
\r
private java.util.Vector _scoreList;\r
\r
/**\r
- * Field _linkList\r
+ * Field _linkList.\r
*/\r
private java.util.Vector _linkList;\r
\r
//- Constructors -/\r
//----------------/\r
\r
- public RangeAnnotation() \r
- {\r
+ public RangeAnnotation() {\r
super();\r
setGroup("");\r
- _annotationElementList = new Vector();\r
- _scoreList = new Vector();\r
- _linkList = new Vector();\r
- _propertyList = new Vector();\r
- } //-- uk.ac.vamsas.objects.core.RangeAnnotation()\r
+ this._annotationElementList = new java.util.Vector();\r
+ this._scoreList = new java.util.Vector();\r
+ this._linkList = new java.util.Vector();\r
+ this._propertyList = new java.util.Vector();\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Method addAnnotationElement\r
- * \r
* \r
* \r
* @param vAnnotationElement\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addAnnotationElement(uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _annotationElementList.addElement(vAnnotationElement);\r
- } //-- void addAnnotationElement(uk.ac.vamsas.objects.core.AnnotationElement) \r
+ public void addAnnotationElement(\r
+ final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._annotationElementList.addElement(vAnnotationElement);\r
+ }\r
\r
/**\r
- * Method addAnnotationElement\r
- * \r
* \r
* \r
* @param index\r
* @param vAnnotationElement\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addAnnotationElement(int index, uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _annotationElementList.insertElementAt(vAnnotationElement, index);\r
- } //-- void addAnnotationElement(int, uk.ac.vamsas.objects.core.AnnotationElement) \r
+ public void addAnnotationElement(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._annotationElementList.add(index, vAnnotationElement);\r
+ }\r
\r
/**\r
- * Method addLink\r
- * \r
* \r
* \r
* @param vLink\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addLink(uk.ac.vamsas.objects.core.Link vLink)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _linkList.addElement(vLink);\r
- } //-- void addLink(uk.ac.vamsas.objects.core.Link) \r
+ public void addLink(\r
+ final uk.ac.vamsas.objects.core.Link vLink)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._linkList.addElement(vLink);\r
+ }\r
\r
/**\r
- * Method addLink\r
- * \r
* \r
* \r
* @param index\r
* @param vLink\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addLink(int index, uk.ac.vamsas.objects.core.Link vLink)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _linkList.insertElementAt(vLink, index);\r
- } //-- void addLink(int, uk.ac.vamsas.objects.core.Link) \r
+ public void addLink(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Link vLink)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._linkList.add(index, vLink);\r
+ }\r
\r
/**\r
- * Method addProperty\r
- * \r
* \r
* \r
* @param vProperty\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addProperty(uk.ac.vamsas.objects.core.Property vProperty)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _propertyList.addElement(vProperty);\r
- } //-- void addProperty(uk.ac.vamsas.objects.core.Property) \r
+ public void addProperty(\r
+ final uk.ac.vamsas.objects.core.Property vProperty)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._propertyList.addElement(vProperty);\r
+ }\r
\r
/**\r
- * Method addProperty\r
- * \r
* \r
* \r
* @param index\r
* @param vProperty\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _propertyList.insertElementAt(vProperty, index);\r
- } //-- void addProperty(int, uk.ac.vamsas.objects.core.Property) \r
+ public void addProperty(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Property vProperty)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._propertyList.add(index, vProperty);\r
+ }\r
\r
/**\r
- * Method addScore\r
- * \r
* \r
* \r
* @param vScore\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addScore(uk.ac.vamsas.objects.core.Score vScore)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _scoreList.addElement(vScore);\r
- } //-- void addScore(uk.ac.vamsas.objects.core.Score) \r
+ public void addScore(\r
+ final uk.ac.vamsas.objects.core.Score vScore)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._scoreList.addElement(vScore);\r
+ }\r
\r
/**\r
- * Method addScore\r
- * \r
* \r
* \r
* @param index\r
* @param vScore\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addScore(int index, uk.ac.vamsas.objects.core.Score vScore)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _scoreList.insertElementAt(vScore, index);\r
- } //-- void addScore(int, uk.ac.vamsas.objects.core.Score) \r
+ public void addScore(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Score vScore)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._scoreList.add(index, vScore);\r
+ }\r
\r
/**\r
- * Method enumerateAnnotationElement\r
- * \r
- * \r
+ * Method enumerateAnnotationElement.\r
* \r
- * @return Enumeration\r
+ * @return an Enumeration over all\r
+ * uk.ac.vamsas.objects.core.AnnotationElement elements\r
*/\r
- public java.util.Enumeration enumerateAnnotationElement()\r
- {\r
- return _annotationElementList.elements();\r
- } //-- java.util.Enumeration enumerateAnnotationElement() \r
+ public java.util.Enumeration enumerateAnnotationElement(\r
+ ) {\r
+ return this._annotationElementList.elements();\r
+ }\r
\r
/**\r
- * Method enumerateLink\r
+ * Method enumerateLink.\r
* \r
- * \r
- * \r
- * @return Enumeration\r
+ * @return an Enumeration over all\r
+ * uk.ac.vamsas.objects.core.Link elements\r
*/\r
- public java.util.Enumeration enumerateLink()\r
- {\r
- return _linkList.elements();\r
- } //-- java.util.Enumeration enumerateLink() \r
+ public java.util.Enumeration enumerateLink(\r
+ ) {\r
+ return this._linkList.elements();\r
+ }\r
\r
/**\r
- * Method enumerateProperty\r
- * \r
+ * Method enumerateProperty.\r
* \r
- * \r
- * @return Enumeration\r
+ * @return an Enumeration over all\r
+ * uk.ac.vamsas.objects.core.Property elements\r
*/\r
- public java.util.Enumeration enumerateProperty()\r
- {\r
- return _propertyList.elements();\r
- } //-- java.util.Enumeration enumerateProperty() \r
+ public java.util.Enumeration enumerateProperty(\r
+ ) {\r
+ return this._propertyList.elements();\r
+ }\r
\r
/**\r
- * Method enumerateScore\r
- * \r
+ * Method enumerateScore.\r
* \r
- * \r
- * @return Enumeration\r
+ * @return an Enumeration over all\r
+ * uk.ac.vamsas.objects.core.Score elements\r
*/\r
- public java.util.Enumeration enumerateScore()\r
- {\r
- return _scoreList.elements();\r
- } //-- java.util.Enumeration enumerateScore() \r
+ public java.util.Enumeration enumerateScore(\r
+ ) {\r
+ return this._scoreList.elements();\r
+ }\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
- * Method getAnnotationElement\r
- * \r
- * \r
+ * Method getAnnotationElement.\r
* \r
* @param index\r
- * @return AnnotationElement\r
- */\r
- public uk.ac.vamsas.objects.core.AnnotationElement getAnnotationElement(int index)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _annotationElementList.size())) {\r
- throw new IndexOutOfBoundsException("getAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ * @return the value of the\r
+ * uk.ac.vamsas.objects.core.AnnotationElement at the given inde\r
+ */\r
+ public uk.ac.vamsas.objects.core.AnnotationElement getAnnotationElement(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._annotationElementList.size()) {\r
+ throw new IndexOutOfBoundsException("getAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");\r
}\r
\r
- return (uk.ac.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);\r
- } //-- uk.ac.vamsas.objects.core.AnnotationElement getAnnotationElement(int) \r
+ return (uk.ac.vamsas.objects.core.AnnotationElement) _annotationElementList.get(index);\r
+ }\r
\r
/**\r
- * Method getAnnotationElement\r
- * \r
- * \r
+ * Method getAnnotationElement.Returns the contents of the\r
+ * collection in an Array. <p>Note: Just in case the\r
+ * collection contents are changing in another thread, we pass\r
+ * a 0-length Array of the correct type into the API call. \r
+ * This way we <i>know</i> that the Array returned is of\r
+ * exactly the correct length.\r
* \r
- * @return AnnotationElement\r
+ * @return this collection as an Array\r
*/\r
- public uk.ac.vamsas.objects.core.AnnotationElement[] getAnnotationElement()\r
- {\r
- int size = _annotationElementList.size();\r
- uk.ac.vamsas.objects.core.AnnotationElement[] mArray = new uk.ac.vamsas.objects.core.AnnotationElement[size];\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (uk.ac.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);\r
- }\r
- return mArray;\r
- } //-- uk.ac.vamsas.objects.core.AnnotationElement[] getAnnotationElement() \r
+ public uk.ac.vamsas.objects.core.AnnotationElement[] getAnnotationElement(\r
+ ) {\r
+ uk.ac.vamsas.objects.core.AnnotationElement[] array = new uk.ac.vamsas.objects.core.AnnotationElement[0];\r
+ return (uk.ac.vamsas.objects.core.AnnotationElement[]) this._annotationElementList.toArray(array);\r
+ }\r
\r
/**\r
- * Method getAnnotationElementCount\r
- * \r
+ * Method getAnnotationElementAsReference.Returns a reference\r
+ * to '_annotationElementList'. No type checking is performed\r
+ * on any modifications to the Vector.\r
* \r
+ * @return a reference to the Vector backing this class\r
+ */\r
+ public java.util.Vector getAnnotationElementAsReference(\r
+ ) {\r
+ return this._annotationElementList;\r
+ }\r
+\r
+ /**\r
+ * Method getAnnotationElementCount.\r
* \r
- * @return int\r
+ * @return the size of this collection\r
*/\r
- public int getAnnotationElementCount()\r
- {\r
- return _annotationElementList.size();\r
- } //-- int getAnnotationElementCount() \r
+ public int getAnnotationElementCount(\r
+ ) {\r
+ return this._annotationElementList.size();\r
+ }\r
\r
/**\r
* Returns the value of field 'description'. The field\r
* description of the annotation\r
* \r
* \r
- * @return String\r
- * @return the value of field 'description'.\r
+ * @return the value of field 'Description'.\r
*/\r
- public java.lang.String getDescription()\r
- {\r
+ public java.lang.String getDescription(\r
+ ) {\r
return this._description;\r
- } //-- java.lang.String getDescription() \r
+ }\r
\r
/**\r
* Returns the value of field 'group'. The field 'group' has\r
* non-empty group name are grouped\r
* together \r
* \r
- * @return String\r
- * @return the value of field 'group'.\r
+ * @return the value of field 'Group'.\r
*/\r
- public java.lang.String getGroup()\r
- {\r
+ public java.lang.String getGroup(\r
+ ) {\r
return this._group;\r
- } //-- java.lang.String getGroup() \r
+ }\r
\r
/**\r
* Returns the value of field 'id'. The field 'id' has the\r
* referencing\r
* \r
* \r
- * @return String\r
- * @return the value of field 'id'.\r
+ * @return the value of field 'Id'.\r
*/\r
- public java.lang.String getId()\r
- {\r
+ public java.lang.String getId(\r
+ ) {\r
return this._id;\r
- } //-- java.lang.String getId() \r
+ }\r
\r
/**\r
* Returns the value of field 'label'. The field 'label' has\r
* place.\r
* \r
* \r
- * @return String\r
- * @return the value of field 'label'.\r
+ * @return the value of field 'Label'.\r
*/\r
- public java.lang.String getLabel()\r
- {\r
+ public java.lang.String getLabel(\r
+ ) {\r
return this._label;\r
- } //-- java.lang.String getLabel() \r
+ }\r
\r
/**\r
- * Method getLink\r
- * \r
- * \r
+ * Method getLink.\r
* \r
* @param index\r
- * @return Link\r
- */\r
- public uk.ac.vamsas.objects.core.Link getLink(int index)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _linkList.size())) {\r
- throw new IndexOutOfBoundsException("getLink: Index value '"+index+"' not in range [0.."+_linkList.size()+ "]");\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ * @return the value of the uk.ac.vamsas.objects.core.Link at\r
+ * the given index\r
+ */\r
+ public uk.ac.vamsas.objects.core.Link getLink(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._linkList.size()) {\r
+ throw new IndexOutOfBoundsException("getLink: Index value '" + index + "' not in range [0.." + (this._linkList.size() - 1) + "]");\r
}\r
\r
- return (uk.ac.vamsas.objects.core.Link) _linkList.elementAt(index);\r
- } //-- uk.ac.vamsas.objects.core.Link getLink(int) \r
+ return (uk.ac.vamsas.objects.core.Link) _linkList.get(index);\r
+ }\r
\r
/**\r
- * Method getLink\r
- * \r
+ * Method getLink.Returns the contents of the collection in an\r
+ * Array. <p>Note: Just in case the collection contents are\r
+ * changing in another thread, we pass a 0-length Array of the\r
+ * correct type into the API call. This way we <i>know</i>\r
+ * that the Array returned is of exactly the correct length.\r
* \r
- * \r
- * @return Link\r
+ * @return this collection as an Array\r
*/\r
- public uk.ac.vamsas.objects.core.Link[] getLink()\r
- {\r
- int size = _linkList.size();\r
- uk.ac.vamsas.objects.core.Link[] mArray = new uk.ac.vamsas.objects.core.Link[size];\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (uk.ac.vamsas.objects.core.Link) _linkList.elementAt(index);\r
- }\r
- return mArray;\r
- } //-- uk.ac.vamsas.objects.core.Link[] getLink() \r
+ public uk.ac.vamsas.objects.core.Link[] getLink(\r
+ ) {\r
+ uk.ac.vamsas.objects.core.Link[] array = new uk.ac.vamsas.objects.core.Link[0];\r
+ return (uk.ac.vamsas.objects.core.Link[]) this._linkList.toArray(array);\r
+ }\r
\r
/**\r
- * Method getLinkCount\r
- * \r
+ * Method getLinkAsReference.Returns a reference to\r
+ * '_linkList'. No type checking is performed on any\r
+ * modifications to the Vector.\r
* \r
+ * @return a reference to the Vector backing this class\r
+ */\r
+ public java.util.Vector getLinkAsReference(\r
+ ) {\r
+ return this._linkList;\r
+ }\r
+\r
+ /**\r
+ * Method getLinkCount.\r
* \r
- * @return int\r
+ * @return the size of this collection\r
*/\r
- public int getLinkCount()\r
- {\r
- return _linkList.size();\r
- } //-- int getLinkCount() \r
+ public int getLinkCount(\r
+ ) {\r
+ return this._linkList.size();\r
+ }\r
\r
/**\r
* Returns the value of field 'modifiable'.\r
* \r
- * @return String\r
- * @return the value of field 'modifiable'.\r
+ * @return the value of field 'Modifiable'.\r
*/\r
- public java.lang.String getModifiable()\r
- {\r
+ public java.lang.String getModifiable(\r
+ ) {\r
return this._modifiable;\r
- } //-- java.lang.String getModifiable() \r
+ }\r
\r
/**\r
- * Method getProperty\r
- * \r
- * \r
+ * Method getProperty.\r
* \r
* @param index\r
- * @return Property\r
- */\r
- public uk.ac.vamsas.objects.core.Property getProperty(int index)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _propertyList.size())) {\r
- throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ * @return the value of the uk.ac.vamsas.objects.core.Property\r
+ * at the given index\r
+ */\r
+ public uk.ac.vamsas.objects.core.Property getProperty(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._propertyList.size()) {\r
+ throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");\r
}\r
\r
- return (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);\r
- } //-- uk.ac.vamsas.objects.core.Property getProperty(int) \r
+ return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);\r
+ }\r
\r
/**\r
- * Method getProperty\r
- * \r
- * \r
+ * Method getProperty.Returns the contents of the collection in\r
+ * an Array. <p>Note: Just in case the collection contents\r
+ * are changing in another thread, we pass a 0-length Array of\r
+ * the correct type into the API call. This way we <i>know</i>\r
+ * that the Array returned is of exactly the correct length.\r
* \r
- * @return Property\r
+ * @return this collection as an Array\r
*/\r
- public uk.ac.vamsas.objects.core.Property[] getProperty()\r
- {\r
- int size = _propertyList.size();\r
- uk.ac.vamsas.objects.core.Property[] mArray = new uk.ac.vamsas.objects.core.Property[size];\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);\r
- }\r
- return mArray;\r
- } //-- uk.ac.vamsas.objects.core.Property[] getProperty() \r
+ public uk.ac.vamsas.objects.core.Property[] getProperty(\r
+ ) {\r
+ uk.ac.vamsas.objects.core.Property[] array = new uk.ac.vamsas.objects.core.Property[0];\r
+ return (uk.ac.vamsas.objects.core.Property[]) this._propertyList.toArray(array);\r
+ }\r
\r
/**\r
- * Method getPropertyCount\r
- * \r
+ * Method getPropertyAsReference.Returns a reference to\r
+ * '_propertyList'. No type checking is performed on any\r
+ * modifications to the Vector.\r
* \r
- * \r
- * @return int\r
+ * @return a reference to the Vector backing this class\r
*/\r
- public int getPropertyCount()\r
- {\r
- return _propertyList.size();\r
- } //-- int getPropertyCount() \r
+ public java.util.Vector getPropertyAsReference(\r
+ ) {\r
+ return this._propertyList;\r
+ }\r
\r
/**\r
- * Method getScore\r
- * \r
+ * Method getPropertyCount.\r
* \r
+ * @return the size of this collection\r
+ */\r
+ public int getPropertyCount(\r
+ ) {\r
+ return this._propertyList.size();\r
+ }\r
+\r
+ /**\r
+ * Method getScore.\r
* \r
* @param index\r
- * @return Score\r
- */\r
- public uk.ac.vamsas.objects.core.Score getScore(int index)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _scoreList.size())) {\r
- throw new IndexOutOfBoundsException("getScore: Index value '"+index+"' not in range [0.."+_scoreList.size()+ "]");\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ * @return the value of the uk.ac.vamsas.objects.core.Score at\r
+ * the given index\r
+ */\r
+ public uk.ac.vamsas.objects.core.Score getScore(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._scoreList.size()) {\r
+ throw new IndexOutOfBoundsException("getScore: Index value '" + index + "' not in range [0.." + (this._scoreList.size() - 1) + "]");\r
}\r
\r
- return (uk.ac.vamsas.objects.core.Score) _scoreList.elementAt(index);\r
- } //-- uk.ac.vamsas.objects.core.Score getScore(int) \r
+ return (uk.ac.vamsas.objects.core.Score) _scoreList.get(index);\r
+ }\r
\r
/**\r
- * Method getScore\r
+ * Method getScore.Returns the contents of the collection in an\r
+ * Array. <p>Note: Just in case the collection contents are\r
+ * changing in another thread, we pass a 0-length Array of the\r
+ * correct type into the API call. This way we <i>know</i>\r
+ * that the Array returned is of exactly the correct length.\r
* \r
- * \r
- * \r
- * @return Score\r
+ * @return this collection as an Array\r
*/\r
- public uk.ac.vamsas.objects.core.Score[] getScore()\r
- {\r
- int size = _scoreList.size();\r
- uk.ac.vamsas.objects.core.Score[] mArray = new uk.ac.vamsas.objects.core.Score[size];\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (uk.ac.vamsas.objects.core.Score) _scoreList.elementAt(index);\r
- }\r
- return mArray;\r
- } //-- uk.ac.vamsas.objects.core.Score[] getScore() \r
+ public uk.ac.vamsas.objects.core.Score[] getScore(\r
+ ) {\r
+ uk.ac.vamsas.objects.core.Score[] array = new uk.ac.vamsas.objects.core.Score[0];\r
+ return (uk.ac.vamsas.objects.core.Score[]) this._scoreList.toArray(array);\r
+ }\r
\r
/**\r
- * Method getScoreCount\r
- * \r
+ * Method getScoreAsReference.Returns a reference to\r
+ * '_scoreList'. No type checking is performed on any\r
+ * modifications to the Vector.\r
* \r
+ * @return a reference to the Vector backing this class\r
+ */\r
+ public java.util.Vector getScoreAsReference(\r
+ ) {\r
+ return this._scoreList;\r
+ }\r
+\r
+ /**\r
+ * Method getScoreCount.\r
* \r
- * @return int\r
+ * @return the size of this collection\r
*/\r
- public int getScoreCount()\r
- {\r
- return _scoreList.size();\r
- } //-- int getScoreCount() \r
+ public int getScoreCount(\r
+ ) {\r
+ return this._scoreList.size();\r
+ }\r
\r
/**\r
* Returns the value of field 'status'. The field 'status' has\r
* quality to an\r
* annotation. \r
* \r
- * @return String\r
- * @return the value of field 'status'.\r
+ * @return the value of field 'Status'.\r
*/\r
- public java.lang.String getStatus()\r
- {\r
+ public java.lang.String getStatus(\r
+ ) {\r
return this._status;\r
- } //-- java.lang.String getStatus() \r
+ }\r
\r
/**\r
* Returns the value of field 'type'. The field 'type' has the\r
* and\r
* considered distinct from someotherDB:CHAIN \r
* \r
- * @return String\r
- * @return the value of field 'type'.\r
+ * @return the value of field 'Type'.\r
*/\r
- public java.lang.String getType()\r
- {\r
+ public java.lang.String getType(\r
+ ) {\r
return this._type;\r
- } //-- java.lang.String getType() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ if (_id != null) {\r
+ result = 37 * result + _id.hashCode();\r
+ }\r
+ if (_modifiable != null) {\r
+ result = 37 * result + _modifiable.hashCode();\r
+ }\r
+ if (_group != null) {\r
+ result = 37 * result + _group.hashCode();\r
+ }\r
+ if (_type != null) {\r
+ result = 37 * result + _type.hashCode();\r
+ }\r
+ if (_label != null) {\r
+ result = 37 * result + _label.hashCode();\r
+ }\r
+ if (_description != null) {\r
+ result = 37 * result + _description.hashCode();\r
+ }\r
+ if (_status != null) {\r
+ result = 37 * result + _status.hashCode();\r
+ }\r
+ if (_annotationElementList != null) {\r
+ result = 37 * result + _annotationElementList.hashCode();\r
+ }\r
+ if (_scoreList != null) {\r
+ result = 37 * result + _scoreList.hashCode();\r
+ }\r
+ if (_linkList != null) {\r
+ result = 37 * result + _linkList.hashCode();\r
+ }\r
+ if (_propertyList != null) {\r
+ result = 37 * result + _propertyList.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
- */\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ */\r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
- */\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ */\r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
- * Method removeAllAnnotationElement\r
- * \r
*/\r
- public void removeAllAnnotationElement()\r
- {\r
- _annotationElementList.removeAllElements();\r
- } //-- void removeAllAnnotationElement() \r
+ public void removeAllAnnotationElement(\r
+ ) {\r
+ this._annotationElementList.clear();\r
+ }\r
\r
/**\r
- * Method removeAllLink\r
- * \r
*/\r
- public void removeAllLink()\r
- {\r
- _linkList.removeAllElements();\r
- } //-- void removeAllLink() \r
+ public void removeAllLink(\r
+ ) {\r
+ this._linkList.clear();\r
+ }\r
\r
/**\r
- * Method removeAllProperty\r
- * \r
*/\r
- public void removeAllProperty()\r
- {\r
- _propertyList.removeAllElements();\r
- } //-- void removeAllProperty() \r
+ public void removeAllProperty(\r
+ ) {\r
+ this._propertyList.clear();\r
+ }\r
\r
/**\r
- * Method removeAllScore\r
- * \r
*/\r
- public void removeAllScore()\r
- {\r
- _scoreList.removeAllElements();\r
- } //-- void removeAllScore() \r
+ public void removeAllScore(\r
+ ) {\r
+ this._scoreList.clear();\r
+ }\r
\r
/**\r
- * Method removeAnnotationElement\r
- * \r
+ * Method removeAnnotationElement.\r
* \r
+ * @param vAnnotationElement\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeAnnotationElement(\r
+ final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement) {\r
+ boolean removed = _annotationElementList.remove(vAnnotationElement);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removeAnnotationElementAt.\r
* \r
* @param index\r
- * @return AnnotationElement\r
+ * @return the element removed from the collection\r
*/\r
- public uk.ac.vamsas.objects.core.AnnotationElement removeAnnotationElement(int index)\r
- {\r
- java.lang.Object obj = _annotationElementList.elementAt(index);\r
- _annotationElementList.removeElementAt(index);\r
+ public uk.ac.vamsas.objects.core.AnnotationElement removeAnnotationElementAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._annotationElementList.remove(index);\r
return (uk.ac.vamsas.objects.core.AnnotationElement) obj;\r
- } //-- uk.ac.vamsas.objects.core.AnnotationElement removeAnnotationElement(int) \r
+ }\r
\r
/**\r
- * Method removeLink\r
- * \r
+ * Method removeLink.\r
* \r
+ * @param vLink\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeLink(\r
+ final uk.ac.vamsas.objects.core.Link vLink) {\r
+ boolean removed = _linkList.remove(vLink);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removeLinkAt.\r
* \r
* @param index\r
- * @return Link\r
+ * @return the element removed from the collection\r
*/\r
- public uk.ac.vamsas.objects.core.Link removeLink(int index)\r
- {\r
- java.lang.Object obj = _linkList.elementAt(index);\r
- _linkList.removeElementAt(index);\r
+ public uk.ac.vamsas.objects.core.Link removeLinkAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._linkList.remove(index);\r
return (uk.ac.vamsas.objects.core.Link) obj;\r
- } //-- uk.ac.vamsas.objects.core.Link removeLink(int) \r
+ }\r
\r
/**\r
- * Method removeProperty\r
- * \r
+ * Method removeProperty.\r
* \r
+ * @param vProperty\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeProperty(\r
+ final uk.ac.vamsas.objects.core.Property vProperty) {\r
+ boolean removed = _propertyList.remove(vProperty);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removePropertyAt.\r
* \r
* @param index\r
- * @return Property\r
+ * @return the element removed from the collection\r
*/\r
- public uk.ac.vamsas.objects.core.Property removeProperty(int index)\r
- {\r
- java.lang.Object obj = _propertyList.elementAt(index);\r
- _propertyList.removeElementAt(index);\r
+ public uk.ac.vamsas.objects.core.Property removePropertyAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._propertyList.remove(index);\r
return (uk.ac.vamsas.objects.core.Property) obj;\r
- } //-- uk.ac.vamsas.objects.core.Property removeProperty(int) \r
+ }\r
\r
/**\r
- * Method removeScore\r
- * \r
+ * Method removeScore.\r
* \r
+ * @param vScore\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeScore(\r
+ final uk.ac.vamsas.objects.core.Score vScore) {\r
+ boolean removed = _scoreList.remove(vScore);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removeScoreAt.\r
* \r
* @param index\r
- * @return Score\r
+ * @return the element removed from the collection\r
*/\r
- public uk.ac.vamsas.objects.core.Score removeScore(int index)\r
- {\r
- java.lang.Object obj = _scoreList.elementAt(index);\r
- _scoreList.removeElementAt(index);\r
+ public uk.ac.vamsas.objects.core.Score removeScoreAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._scoreList.remove(index);\r
return (uk.ac.vamsas.objects.core.Score) obj;\r
- } //-- uk.ac.vamsas.objects.core.Score removeScore(int) \r
+ }\r
\r
/**\r
- * Method setAnnotationElement\r
- * \r
* \r
* \r
* @param index\r
* @param vAnnotationElement\r
- */\r
- public void setAnnotationElement(int index, uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _annotationElementList.size())) {\r
- throw new IndexOutOfBoundsException("setAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void setAnnotationElement(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._annotationElementList.size()) {\r
+ throw new IndexOutOfBoundsException("setAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");\r
}\r
- _annotationElementList.setElementAt(vAnnotationElement, index);\r
- } //-- void setAnnotationElement(int, uk.ac.vamsas.objects.core.AnnotationElement) \r
+ \r
+ this._annotationElementList.set(index, vAnnotationElement);\r
+ }\r
\r
/**\r
- * Method setAnnotationElement\r
- * \r
* \r
* \r
- * @param annotationElementArray\r
+ * @param vAnnotationElementArray\r
*/\r
- public void setAnnotationElement(uk.ac.vamsas.objects.core.AnnotationElement[] annotationElementArray)\r
- {\r
+ public void setAnnotationElement(\r
+ final uk.ac.vamsas.objects.core.AnnotationElement[] vAnnotationElementArray) {\r
//-- copy array\r
- _annotationElementList.removeAllElements();\r
- for (int i = 0; i < annotationElementArray.length; i++) {\r
- _annotationElementList.addElement(annotationElementArray[i]);\r
+ _annotationElementList.clear();\r
+ \r
+ for (int i = 0; i < vAnnotationElementArray.length; i++) {\r
+ this._annotationElementList.add(vAnnotationElementArray[i]);\r
}\r
- } //-- void setAnnotationElement(uk.ac.vamsas.objects.core.AnnotationElement) \r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_annotationElementList' by copying the\r
+ * given Vector. All elements will be checked for type safety.\r
+ * \r
+ * @param vAnnotationElementList the Vector to copy.\r
+ */\r
+ public void setAnnotationElement(\r
+ final java.util.Vector vAnnotationElementList) {\r
+ // copy vector\r
+ this._annotationElementList.clear();\r
+ \r
+ this._annotationElementList.addAll(vAnnotationElementList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_annotationElementList' by setting it to\r
+ * the given Vector. No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param annotationElementVector the Vector to set.\r
+ */\r
+ public void setAnnotationElementAsReference(\r
+ final java.util.Vector annotationElementVector) {\r
+ this._annotationElementList = annotationElementVector;\r
+ }\r
\r
/**\r
* Sets the value of field 'description'. The field\r
* \r
* @param description the value of field 'description'.\r
*/\r
- public void setDescription(java.lang.String description)\r
- {\r
+ public void setDescription(\r
+ final java.lang.String description) {\r
this._description = description;\r
- } //-- void setDescription(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'group'. The field 'group' has the\r
* \r
* @param group the value of field 'group'.\r
*/\r
- public void setGroup(java.lang.String group)\r
- {\r
+ public void setGroup(\r
+ final java.lang.String group) {\r
this._group = group;\r
- } //-- void setGroup(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'id'. The field 'id' has the\r
* \r
* @param id the value of field 'id'.\r
*/\r
- public void setId(java.lang.String id)\r
- {\r
+ public void setId(\r
+ final java.lang.String id) {\r
this._id = id;\r
- } //-- void setId(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'label'. The field 'label' has the\r
* \r
* @param label the value of field 'label'.\r
*/\r
- public void setLabel(java.lang.String label)\r
- {\r
+ public void setLabel(\r
+ final java.lang.String label) {\r
this._label = label;\r
- } //-- void setLabel(java.lang.String) \r
+ }\r
\r
/**\r
- * Method setLink\r
- * \r
* \r
* \r
* @param index\r
* @param vLink\r
- */\r
- public void setLink(int index, uk.ac.vamsas.objects.core.Link vLink)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _linkList.size())) {\r
- throw new IndexOutOfBoundsException("setLink: Index value '"+index+"' not in range [0.."+_linkList.size()+ "]");\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void setLink(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Link vLink)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._linkList.size()) {\r
+ throw new IndexOutOfBoundsException("setLink: Index value '" + index + "' not in range [0.." + (this._linkList.size() - 1) + "]");\r
}\r
- _linkList.setElementAt(vLink, index);\r
- } //-- void setLink(int, uk.ac.vamsas.objects.core.Link) \r
+ \r
+ this._linkList.set(index, vLink);\r
+ }\r
\r
/**\r
- * Method setLink\r
- * \r
* \r
* \r
- * @param linkArray\r
+ * @param vLinkArray\r
*/\r
- public void setLink(uk.ac.vamsas.objects.core.Link[] linkArray)\r
- {\r
+ public void setLink(\r
+ final uk.ac.vamsas.objects.core.Link[] vLinkArray) {\r
//-- copy array\r
- _linkList.removeAllElements();\r
- for (int i = 0; i < linkArray.length; i++) {\r
- _linkList.addElement(linkArray[i]);\r
+ _linkList.clear();\r
+ \r
+ for (int i = 0; i < vLinkArray.length; i++) {\r
+ this._linkList.add(vLinkArray[i]);\r
}\r
- } //-- void setLink(uk.ac.vamsas.objects.core.Link) \r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_linkList' by copying the given Vector.\r
+ * All elements will be checked for type safety.\r
+ * \r
+ * @param vLinkList the Vector to copy.\r
+ */\r
+ public void setLink(\r
+ final java.util.Vector vLinkList) {\r
+ // copy vector\r
+ this._linkList.clear();\r
+ \r
+ this._linkList.addAll(vLinkList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_linkList' by setting it to the given\r
+ * Vector. No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param linkVector the Vector to set.\r
+ */\r
+ public void setLinkAsReference(\r
+ final java.util.Vector linkVector) {\r
+ this._linkList = linkVector;\r
+ }\r
\r
/**\r
* Sets the value of field 'modifiable'.\r
* \r
* @param modifiable the value of field 'modifiable'.\r
*/\r
- public void setModifiable(java.lang.String modifiable)\r
- {\r
+ public void setModifiable(\r
+ final java.lang.String modifiable) {\r
this._modifiable = modifiable;\r
- } //-- void setModifiable(java.lang.String) \r
+ }\r
\r
/**\r
- * Method setProperty\r
- * \r
* \r
* \r
* @param index\r
* @param vProperty\r
- */\r
- public void setProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _propertyList.size())) {\r
- throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void setProperty(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Property vProperty)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._propertyList.size()) {\r
+ throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");\r
}\r
- _propertyList.setElementAt(vProperty, index);\r
- } //-- void setProperty(int, uk.ac.vamsas.objects.core.Property) \r
+ \r
+ this._propertyList.set(index, vProperty);\r
+ }\r
\r
/**\r
- * Method setProperty\r
* \r
* \r
- * \r
- * @param propertyArray\r
+ * @param vPropertyArray\r
*/\r
- public void setProperty(uk.ac.vamsas.objects.core.Property[] propertyArray)\r
- {\r
+ public void setProperty(\r
+ final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {\r
//-- copy array\r
- _propertyList.removeAllElements();\r
- for (int i = 0; i < propertyArray.length; i++) {\r
- _propertyList.addElement(propertyArray[i]);\r
+ _propertyList.clear();\r
+ \r
+ for (int i = 0; i < vPropertyArray.length; i++) {\r
+ this._propertyList.add(vPropertyArray[i]);\r
}\r
- } //-- void setProperty(uk.ac.vamsas.objects.core.Property) \r
+ }\r
\r
/**\r
- * Method setScore\r
+ * Sets the value of '_propertyList' by copying the given\r
+ * Vector. All elements will be checked for type safety.\r
* \r
+ * @param vPropertyList the Vector to copy.\r
+ */\r
+ public void setProperty(\r
+ final java.util.Vector vPropertyList) {\r
+ // copy vector\r
+ this._propertyList.clear();\r
+ \r
+ this._propertyList.addAll(vPropertyList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_propertyList' by setting it to the given\r
+ * Vector. No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param propertyVector the Vector to set.\r
+ */\r
+ public void setPropertyAsReference(\r
+ final java.util.Vector propertyVector) {\r
+ this._propertyList = propertyVector;\r
+ }\r
+\r
+ /**\r
* \r
* \r
* @param index\r
* @param vScore\r
- */\r
- public void setScore(int index, uk.ac.vamsas.objects.core.Score vScore)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _scoreList.size())) {\r
- throw new IndexOutOfBoundsException("setScore: Index value '"+index+"' not in range [0.."+_scoreList.size()+ "]");\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void setScore(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Score vScore)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._scoreList.size()) {\r
+ throw new IndexOutOfBoundsException("setScore: Index value '" + index + "' not in range [0.." + (this._scoreList.size() - 1) + "]");\r
}\r
- _scoreList.setElementAt(vScore, index);\r
- } //-- void setScore(int, uk.ac.vamsas.objects.core.Score) \r
+ \r
+ this._scoreList.set(index, vScore);\r
+ }\r
\r
/**\r
- * Method setScore\r
* \r
* \r
- * \r
- * @param scoreArray\r
+ * @param vScoreArray\r
*/\r
- public void setScore(uk.ac.vamsas.objects.core.Score[] scoreArray)\r
- {\r
+ public void setScore(\r
+ final uk.ac.vamsas.objects.core.Score[] vScoreArray) {\r
//-- copy array\r
- _scoreList.removeAllElements();\r
- for (int i = 0; i < scoreArray.length; i++) {\r
- _scoreList.addElement(scoreArray[i]);\r
+ _scoreList.clear();\r
+ \r
+ for (int i = 0; i < vScoreArray.length; i++) {\r
+ this._scoreList.add(vScoreArray[i]);\r
}\r
- } //-- void setScore(uk.ac.vamsas.objects.core.Score) \r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_scoreList' by copying the given Vector.\r
+ * All elements will be checked for type safety.\r
+ * \r
+ * @param vScoreList the Vector to copy.\r
+ */\r
+ public void setScore(\r
+ final java.util.Vector vScoreList) {\r
+ // copy vector\r
+ this._scoreList.clear();\r
+ \r
+ this._scoreList.addAll(vScoreList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_scoreList' by setting it to the given\r
+ * Vector. No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param scoreVector the Vector to set.\r
+ */\r
+ public void setScoreAsReference(\r
+ final java.util.Vector scoreVector) {\r
+ this._scoreList = scoreVector;\r
+ }\r
\r
/**\r
* Sets the value of field 'status'. The field 'status' has the\r
* \r
* @param status the value of field 'status'.\r
*/\r
- public void setStatus(java.lang.String status)\r
- {\r
+ public void setStatus(\r
+ final java.lang.String status) {\r
this._status = status;\r
- } //-- void setStatus(java.lang.String) \r
+ }\r
\r
/**\r
* Sets the value of field 'type'. The field 'type' has the\r
* \r
* @param type the value of field 'type'.\r
*/\r
- public void setType(java.lang.String type)\r
- {\r
+ public void setType(\r
+ final java.lang.String type) {\r
this._type = type;\r
- } //-- void setType(java.lang.String) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return RangeType\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType\r
*/\r
- public static uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- return (uk.ac.vamsas.objects.core.RangeAnnotation) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.RangeAnnotation.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.RangeType unmarshal(java.io.Reader) \r
+ public static uk.ac.vamsas.objects.core.RangeType unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+ return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.RangeAnnotation.class, reader);\r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
\r
package uk.ac.vamsas.objects.core;\r
\r
- //---------------------------------/\r
- //- Imported classes and packages -/\r
-//---------------------------------/\r
-\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import java.util.Enumeration;\r
-import java.util.Vector;\r
-import org.exolab.castor.xml.Marshaller;\r
-import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-\r
/**\r
* Specify an ordered set of positions and/or regions on the\r
* principle\r
//- Constructors -/\r
//----------------/\r
\r
- public RangeType() \r
- {\r
+ public RangeType() {\r
super();\r
- _posList = new Vector();\r
- _segList = new Vector();\r
- } //-- uk.ac.vamsas.objects.core.RangeType()\r
+ this._posList = new java.util.Vector();\r
+ this._segList = new java.util.Vector();\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Method addPos\r
- * \r
* \r
* \r
* @param vPos\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addPos(uk.ac.vamsas.objects.core.Pos vPos)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _posList.addElement(vPos);\r
- } //-- void addPos(uk.ac.vamsas.objects.core.Pos) \r
+ public void addPos(\r
+ final uk.ac.vamsas.objects.core.Pos vPos)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._posList.addElement(vPos);\r
+ }\r
\r
/**\r
- * Method addPos\r
- * \r
* \r
* \r
* @param index\r
* @param vPos\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addPos(int index, uk.ac.vamsas.objects.core.Pos vPos)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _posList.insertElementAt(vPos, index);\r
- } //-- void addPos(int, uk.ac.vamsas.objects.core.Pos) \r
+ public void addPos(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Pos vPos)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._posList.add(index, vPos);\r
+ }\r
\r
/**\r
- * Method addSeg\r
- * \r
* \r
* \r
* @param vSeg\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addSeg(uk.ac.vamsas.objects.core.Seg vSeg)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _segList.addElement(vSeg);\r
- } //-- void addSeg(uk.ac.vamsas.objects.core.Seg) \r
+ public void addSeg(\r
+ final uk.ac.vamsas.objects.core.Seg vSeg)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._segList.addElement(vSeg);\r
+ }\r
\r
/**\r
- * Method addSeg\r
- * \r
* \r
* \r
* @param index\r
* @param vSeg\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void addSeg(int index, uk.ac.vamsas.objects.core.Seg vSeg)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- _segList.insertElementAt(vSeg, index);\r
- } //-- void addSeg(int, uk.ac.vamsas.objects.core.Seg) \r
+ public void addSeg(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Seg vSeg)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._segList.add(index, vSeg);\r
+ }\r
\r
/**\r
- * Method enumeratePos\r
- * \r
- * \r
+ * Method enumeratePos.\r
* \r
- * @return Enumeration\r
+ * @return an Enumeration over all\r
+ * uk.ac.vamsas.objects.core.Pos elements\r
*/\r
- public java.util.Enumeration enumeratePos()\r
- {\r
- return _posList.elements();\r
- } //-- java.util.Enumeration enumeratePos() \r
+ public java.util.Enumeration enumeratePos(\r
+ ) {\r
+ return this._posList.elements();\r
+ }\r
\r
/**\r
- * Method enumerateSeg\r
- * \r
- * \r
+ * Method enumerateSeg.\r
* \r
- * @return Enumeration\r
+ * @return an Enumeration over all\r
+ * uk.ac.vamsas.objects.core.Seg elements\r
*/\r
- public java.util.Enumeration enumerateSeg()\r
- {\r
- return _segList.elements();\r
- } //-- java.util.Enumeration enumerateSeg() \r
+ public java.util.Enumeration enumerateSeg(\r
+ ) {\r
+ return this._segList.elements();\r
+ }\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'choiceValue'. The field\r
* 'choiceValue' has the following description: Internal choice\r
* value storage\r
* \r
- * @return Object\r
- * @return the value of field 'choiceValue'.\r
+ * @return the value of field 'ChoiceValue'.\r
*/\r
- public java.lang.Object getChoiceValue()\r
- {\r
+ public java.lang.Object getChoiceValue(\r
+ ) {\r
return this._choiceValue;\r
- } //-- java.lang.Object getChoiceValue() \r
+ }\r
\r
/**\r
- * Method getPos\r
- * \r
- * \r
+ * Method getPos.\r
* \r
* @param index\r
- * @return Pos\r
- */\r
- public uk.ac.vamsas.objects.core.Pos getPos(int index)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _posList.size())) {\r
- throw new IndexOutOfBoundsException("getPos: Index value '"+index+"' not in range [0.."+_posList.size()+ "]");\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ * @return the value of the uk.ac.vamsas.objects.core.Pos at\r
+ * the given index\r
+ */\r
+ public uk.ac.vamsas.objects.core.Pos getPos(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._posList.size()) {\r
+ throw new IndexOutOfBoundsException("getPos: Index value '" + index + "' not in range [0.." + (this._posList.size() - 1) + "]");\r
}\r
\r
- return (uk.ac.vamsas.objects.core.Pos) _posList.elementAt(index);\r
- } //-- uk.ac.vamsas.objects.core.Pos getPos(int) \r
+ return (uk.ac.vamsas.objects.core.Pos) _posList.get(index);\r
+ }\r
\r
/**\r
- * Method getPos\r
- * \r
- * \r
+ * Method getPos.Returns the contents of the collection in an\r
+ * Array. <p>Note: Just in case the collection contents are\r
+ * changing in another thread, we pass a 0-length Array of the\r
+ * correct type into the API call. This way we <i>know</i>\r
+ * that the Array returned is of exactly the correct length.\r
* \r
- * @return Pos\r
+ * @return this collection as an Array\r
*/\r
- public uk.ac.vamsas.objects.core.Pos[] getPos()\r
- {\r
- int size = _posList.size();\r
- uk.ac.vamsas.objects.core.Pos[] mArray = new uk.ac.vamsas.objects.core.Pos[size];\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (uk.ac.vamsas.objects.core.Pos) _posList.elementAt(index);\r
- }\r
- return mArray;\r
- } //-- uk.ac.vamsas.objects.core.Pos[] getPos() \r
+ public uk.ac.vamsas.objects.core.Pos[] getPos(\r
+ ) {\r
+ uk.ac.vamsas.objects.core.Pos[] array = new uk.ac.vamsas.objects.core.Pos[0];\r
+ return (uk.ac.vamsas.objects.core.Pos[]) this._posList.toArray(array);\r
+ }\r
\r
/**\r
- * Method getPosCount\r
- * \r
- * \r
+ * Method getPosAsReference.Returns a reference to '_posList'.\r
+ * No type checking is performed on any modifications to the\r
+ * Vector.\r
* \r
- * @return int\r
+ * @return a reference to the Vector backing this class\r
*/\r
- public int getPosCount()\r
- {\r
- return _posList.size();\r
- } //-- int getPosCount() \r
+ public java.util.Vector getPosAsReference(\r
+ ) {\r
+ return this._posList;\r
+ }\r
\r
/**\r
- * Method getSeg\r
- * \r
+ * Method getPosCount.\r
* \r
+ * @return the size of this collection\r
+ */\r
+ public int getPosCount(\r
+ ) {\r
+ return this._posList.size();\r
+ }\r
+\r
+ /**\r
+ * Method getSeg.\r
* \r
* @param index\r
- * @return Seg\r
- */\r
- public uk.ac.vamsas.objects.core.Seg getSeg(int index)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _segList.size())) {\r
- throw new IndexOutOfBoundsException("getSeg: Index value '"+index+"' not in range [0.."+_segList.size()+ "]");\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ * @return the value of the uk.ac.vamsas.objects.core.Seg at\r
+ * the given index\r
+ */\r
+ public uk.ac.vamsas.objects.core.Seg getSeg(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._segList.size()) {\r
+ throw new IndexOutOfBoundsException("getSeg: Index value '" + index + "' not in range [0.." + (this._segList.size() - 1) + "]");\r
}\r
\r
- return (uk.ac.vamsas.objects.core.Seg) _segList.elementAt(index);\r
- } //-- uk.ac.vamsas.objects.core.Seg getSeg(int) \r
+ return (uk.ac.vamsas.objects.core.Seg) _segList.get(index);\r
+ }\r
\r
/**\r
- * Method getSeg\r
- * \r
- * \r
+ * Method getSeg.Returns the contents of the collection in an\r
+ * Array. <p>Note: Just in case the collection contents are\r
+ * changing in another thread, we pass a 0-length Array of the\r
+ * correct type into the API call. This way we <i>know</i>\r
+ * that the Array returned is of exactly the correct length.\r
* \r
- * @return Seg\r
+ * @return this collection as an Array\r
*/\r
- public uk.ac.vamsas.objects.core.Seg[] getSeg()\r
- {\r
- int size = _segList.size();\r
- uk.ac.vamsas.objects.core.Seg[] mArray = new uk.ac.vamsas.objects.core.Seg[size];\r
- for (int index = 0; index < size; index++) {\r
- mArray[index] = (uk.ac.vamsas.objects.core.Seg) _segList.elementAt(index);\r
- }\r
- return mArray;\r
- } //-- uk.ac.vamsas.objects.core.Seg[] getSeg() \r
+ public uk.ac.vamsas.objects.core.Seg[] getSeg(\r
+ ) {\r
+ uk.ac.vamsas.objects.core.Seg[] array = new uk.ac.vamsas.objects.core.Seg[0];\r
+ return (uk.ac.vamsas.objects.core.Seg[]) this._segList.toArray(array);\r
+ }\r
\r
/**\r
- * Method getSegCount\r
- * \r
- * \r
+ * Method getSegAsReference.Returns a reference to '_segList'.\r
+ * No type checking is performed on any modifications to the\r
+ * Vector.\r
* \r
- * @return int\r
+ * @return a reference to the Vector backing this class\r
*/\r
- public int getSegCount()\r
- {\r
- return _segList.size();\r
- } //-- int getSegCount() \r
+ public java.util.Vector getSegAsReference(\r
+ ) {\r
+ return this._segList;\r
+ }\r
\r
/**\r
- * Method isValid\r
+ * Method getSegCount.\r
* \r
+ * @return the size of this collection\r
+ */\r
+ public int getSegCount(\r
+ ) {\r
+ return this._segList.size();\r
+ }\r
+\r
+ /**\r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ if (_choiceValue != null) {\r
+ result = 37 * result + _choiceValue.hashCode();\r
+ }\r
+ if (_posList != null) {\r
+ result = 37 * result + _posList.hashCode();\r
+ }\r
+ if (_segList != null) {\r
+ result = 37 * result + _segList.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method removeAllPos\r
- * \r
*/\r
- public void removeAllPos()\r
- {\r
- _posList.removeAllElements();\r
- } //-- void removeAllPos() \r
+ public void removeAllPos(\r
+ ) {\r
+ this._posList.clear();\r
+ }\r
\r
/**\r
- * Method removeAllSeg\r
- * \r
*/\r
- public void removeAllSeg()\r
- {\r
- _segList.removeAllElements();\r
- } //-- void removeAllSeg() \r
+ public void removeAllSeg(\r
+ ) {\r
+ this._segList.clear();\r
+ }\r
\r
/**\r
- * Method removePos\r
- * \r
+ * Method removePos.\r
* \r
+ * @param vPos\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removePos(\r
+ final uk.ac.vamsas.objects.core.Pos vPos) {\r
+ boolean removed = _posList.remove(vPos);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removePosAt.\r
* \r
* @param index\r
- * @return Pos\r
+ * @return the element removed from the collection\r
*/\r
- public uk.ac.vamsas.objects.core.Pos removePos(int index)\r
- {\r
- java.lang.Object obj = _posList.elementAt(index);\r
- _posList.removeElementAt(index);\r
+ public uk.ac.vamsas.objects.core.Pos removePosAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._posList.remove(index);\r
return (uk.ac.vamsas.objects.core.Pos) obj;\r
- } //-- uk.ac.vamsas.objects.core.Pos removePos(int) \r
+ }\r
\r
/**\r
- * Method removeSeg\r
- * \r
+ * Method removeSeg.\r
* \r
+ * @param vSeg\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeSeg(\r
+ final uk.ac.vamsas.objects.core.Seg vSeg) {\r
+ boolean removed = _segList.remove(vSeg);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removeSegAt.\r
* \r
* @param index\r
- * @return Seg\r
+ * @return the element removed from the collection\r
*/\r
- public uk.ac.vamsas.objects.core.Seg removeSeg(int index)\r
- {\r
- java.lang.Object obj = _segList.elementAt(index);\r
- _segList.removeElementAt(index);\r
+ public uk.ac.vamsas.objects.core.Seg removeSegAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._segList.remove(index);\r
return (uk.ac.vamsas.objects.core.Seg) obj;\r
- } //-- uk.ac.vamsas.objects.core.Seg removeSeg(int) \r
+ }\r
\r
/**\r
- * Method setPos\r
- * \r
* \r
* \r
* @param index\r
* @param vPos\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void setPos(int index, uk.ac.vamsas.objects.core.Pos vPos)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _posList.size())) {\r
- throw new IndexOutOfBoundsException("setPos: Index value '"+index+"' not in range [0.."+_posList.size()+ "]");\r
+ public void setPos(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Pos vPos)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._posList.size()) {\r
+ throw new IndexOutOfBoundsException("setPos: Index value '" + index + "' not in range [0.." + (this._posList.size() - 1) + "]");\r
}\r
- _posList.setElementAt(vPos, index);\r
- } //-- void setPos(int, uk.ac.vamsas.objects.core.Pos) \r
+ \r
+ this._posList.set(index, vPos);\r
+ }\r
\r
/**\r
- * Method setPos\r
* \r
* \r
- * \r
- * @param posArray\r
+ * @param vPosArray\r
*/\r
- public void setPos(uk.ac.vamsas.objects.core.Pos[] posArray)\r
- {\r
+ public void setPos(\r
+ final uk.ac.vamsas.objects.core.Pos[] vPosArray) {\r
//-- copy array\r
- _posList.removeAllElements();\r
- for (int i = 0; i < posArray.length; i++) {\r
- _posList.addElement(posArray[i]);\r
+ _posList.clear();\r
+ \r
+ for (int i = 0; i < vPosArray.length; i++) {\r
+ this._posList.add(vPosArray[i]);\r
}\r
- } //-- void setPos(uk.ac.vamsas.objects.core.Pos) \r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_posList' by copying the given Vector.\r
+ * All elements will be checked for type safety.\r
+ * \r
+ * @param vPosList the Vector to copy.\r
+ */\r
+ public void setPos(\r
+ final java.util.Vector vPosList) {\r
+ // copy vector\r
+ this._posList.clear();\r
+ \r
+ this._posList.addAll(vPosList);\r
+ }\r
\r
/**\r
- * Method setSeg\r
+ * Sets the value of '_posList' by setting it to the given\r
+ * Vector. No type checking is performed.\r
+ * @deprecated\r
* \r
+ * @param posVector the Vector to set.\r
+ */\r
+ public void setPosAsReference(\r
+ final java.util.Vector posVector) {\r
+ this._posList = posVector;\r
+ }\r
+\r
+ /**\r
* \r
* \r
* @param index\r
* @param vSeg\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
- public void setSeg(int index, uk.ac.vamsas.objects.core.Seg vSeg)\r
- throws java.lang.IndexOutOfBoundsException\r
- {\r
- //-- check bounds for index\r
- if ((index < 0) || (index > _segList.size())) {\r
- throw new IndexOutOfBoundsException("setSeg: Index value '"+index+"' not in range [0.."+_segList.size()+ "]");\r
+ public void setSeg(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Seg vSeg)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._segList.size()) {\r
+ throw new IndexOutOfBoundsException("setSeg: Index value '" + index + "' not in range [0.." + (this._segList.size() - 1) + "]");\r
}\r
- _segList.setElementAt(vSeg, index);\r
- } //-- void setSeg(int, uk.ac.vamsas.objects.core.Seg) \r
+ \r
+ this._segList.set(index, vSeg);\r
+ }\r
\r
/**\r
- * Method setSeg\r
- * \r
* \r
* \r
- * @param segArray\r
+ * @param vSegArray\r
*/\r
- public void setSeg(uk.ac.vamsas.objects.core.Seg[] segArray)\r
- {\r
+ public void setSeg(\r
+ final uk.ac.vamsas.objects.core.Seg[] vSegArray) {\r
//-- copy array\r
- _segList.removeAllElements();\r
- for (int i = 0; i < segArray.length; i++) {\r
- _segList.addElement(segArray[i]);\r
+ _segList.clear();\r
+ \r
+ for (int i = 0; i < vSegArray.length; i++) {\r
+ this._segList.add(vSegArray[i]);\r
}\r
- } //-- void setSeg(uk.ac.vamsas.objects.core.Seg) \r
+ }\r
\r
/**\r
- * Method validate\r
+ * Sets the value of '_segList' by copying the given Vector.\r
+ * All elements will be checked for type safety.\r
+ * \r
+ * @param vSegList the Vector to copy.\r
+ */\r
+ public void setSeg(\r
+ final java.util.Vector vSegList) {\r
+ // copy vector\r
+ this._segList.clear();\r
+ \r
+ this._segList.addAll(vSegList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_segList' by setting it to the given\r
+ * Vector. No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param segVector the Vector to set.\r
+ */\r
+ public void setSegAsReference(\r
+ final java.util.Vector segVector) {\r
+ this._segList = segVector;\r
+ }\r
+\r
+ /**\r
+ * \r
* \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* Ordered set of optionally named float values for the\r
private boolean _has_content;\r
\r
/**\r
- * Field _name\r
+ * Field _name.\r
*/\r
private java.lang.String _name = "score";\r
\r
//- Constructors -/\r
//----------------/\r
\r
- public Score() \r
- {\r
+ public Score() {\r
super();\r
setName("score");\r
- } //-- uk.ac.vamsas.objects.core.Score()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Method deleteContent\r
- * \r
*/\r
- public void deleteContent()\r
- {\r
+ public void deleteContent(\r
+ ) {\r
this._has_content= false;\r
- } //-- void deleteContent() \r
+ }\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'content'. The field 'content'\r
* has the following description: internal content storage\r
* \r
- * @return float\r
- * @return the value of field 'content'.\r
+ * @return the value of field 'Content'.\r
*/\r
- public float getContent()\r
- {\r
+ public float getContent(\r
+ ) {\r
return this._content;\r
- } //-- float getContent() \r
+ }\r
\r
/**\r
* Returns the value of field 'name'.\r
* \r
- * @return String\r
- * @return the value of field 'name'.\r
+ * @return the value of field 'Name'.\r
*/\r
- public java.lang.String getName()\r
- {\r
+ public java.lang.String getName(\r
+ ) {\r
return this._name;\r
- } //-- java.lang.String getName() \r
+ }\r
\r
/**\r
- * Method hasContent\r
- * \r
- * \r
+ * Method hasContent.\r
* \r
- * @return boolean\r
+ * @return true if at least one Content has been added\r
*/\r
- public boolean hasContent()\r
- {\r
+ public boolean hasContent(\r
+ ) {\r
return this._has_content;\r
- } //-- boolean hasContent() \r
+ }\r
\r
/**\r
- * Method isValid\r
- * \r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ result = 37 * result + java.lang.Float.floatToIntBits(_content);\r
+ if (_name != null) {\r
+ result = 37 * result + _name.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'content'. The field 'content' has\r
* \r
* @param content the value of field 'content'.\r
*/\r
- public void setContent(float content)\r
- {\r
+ public void setContent(\r
+ final float content) {\r
this._content = content;\r
this._has_content = true;\r
- } //-- void setContent(float) \r
+ }\r
\r
/**\r
* Sets the value of field 'name'.\r
* \r
* @param name the value of field 'name'.\r
*/\r
- public void setName(java.lang.String name)\r
- {\r
+ public void setName(\r
+ final java.lang.String name) {\r
this._name = name;\r
- } //-- void setName(java.lang.String) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return Score\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.Score\r
*/\r
- public static uk.ac.vamsas.objects.core.Score unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
+ public static uk.ac.vamsas.objects.core.Score unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
return (uk.ac.vamsas.objects.core.Score) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Score.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.Score unmarshal(java.io.Reader) \r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*\r
* This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
* Schema.\r
* $Id$\r
*/\r
//- Imported classes and packages -/\r
//---------------------------------/\r
\r
-import java.io.IOException;\r
-import java.io.Reader;\r
-import java.io.Serializable;\r
-import java.io.Writer;\r
-import org.exolab.castor.xml.MarshalException;\r
import org.exolab.castor.xml.Marshaller;\r
import org.exolab.castor.xml.Unmarshaller;\r
-import org.exolab.castor.xml.ValidationException;\r
-import org.xml.sax.ContentHandler;\r
\r
/**\r
* a region from start to end, with flag for inclusivity of\r
//--------------------------/\r
\r
/**\r
- * Field _start\r
+ * Field _start.\r
*/\r
private int _start;\r
\r
private boolean _has_start;\r
\r
/**\r
- * Field _end\r
+ * Field _end.\r
*/\r
private int _end;\r
\r
//- Constructors -/\r
//----------------/\r
\r
- public Seg() \r
- {\r
+ public Seg() {\r
super();\r
- } //-- uk.ac.vamsas.objects.core.Seg()\r
+ }\r
\r
\r
//-----------/\r
//-----------/\r
\r
/**\r
- * Method deleteEnd\r
- * \r
*/\r
- public void deleteEnd()\r
- {\r
+ public void deleteEnd(\r
+ ) {\r
this._has_end= false;\r
- } //-- void deleteEnd() \r
+ }\r
\r
/**\r
- * Method deleteInclusive\r
- * \r
*/\r
- public void deleteInclusive()\r
- {\r
+ public void deleteInclusive(\r
+ ) {\r
this._has_inclusive= false;\r
- } //-- void deleteInclusive() \r
+ }\r
\r
/**\r
- * Method deleteStart\r
- * \r
*/\r
- public void deleteStart()\r
- {\r
+ public void deleteStart(\r
+ ) {\r
this._has_start= false;\r
- } //-- void deleteStart() \r
+ }\r
\r
/**\r
- * Note: hashCode() has not been overriden\r
+ * Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
- * @return boolean\r
+ * @return true if the objects are equal.\r
*/\r
- public boolean equals(java.lang.Object obj)\r
- {\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
if ( this == obj )\r
return true;\r
\r
return true;\r
}\r
return false;\r
- } //-- boolean equals(java.lang.Object) \r
+ }\r
\r
/**\r
* Returns the value of field 'end'.\r
* \r
- * @return int\r
- * @return the value of field 'end'.\r
+ * @return the value of field 'End'.\r
*/\r
- public int getEnd()\r
- {\r
+ public int getEnd(\r
+ ) {\r
return this._end;\r
- } //-- int getEnd() \r
+ }\r
\r
/**\r
* Returns the value of field 'inclusive'. The field\r
* 2\r
* \r
* \r
- * @return boolean\r
- * @return the value of field 'inclusive'.\r
+ * @return the value of field 'Inclusive'.\r
*/\r
- public boolean getInclusive()\r
- {\r
+ public boolean getInclusive(\r
+ ) {\r
return this._inclusive;\r
- } //-- boolean getInclusive() \r
+ }\r
\r
/**\r
* Returns the value of field 'start'.\r
* \r
- * @return int\r
- * @return the value of field 'start'.\r
+ * @return the value of field 'Start'.\r
*/\r
- public int getStart()\r
- {\r
+ public int getStart(\r
+ ) {\r
return this._start;\r
- } //-- int getStart() \r
+ }\r
\r
/**\r
- * Method hasEnd\r
- * \r
+ * Method hasEnd.\r
* \r
- * \r
- * @return boolean\r
+ * @return true if at least one End has been added\r
*/\r
- public boolean hasEnd()\r
- {\r
+ public boolean hasEnd(\r
+ ) {\r
return this._has_end;\r
- } //-- boolean hasEnd() \r
+ }\r
\r
/**\r
- * Method hasInclusive\r
- * \r
+ * Method hasInclusive.\r
* \r
- * \r
- * @return boolean\r
+ * @return true if at least one Inclusive has been added\r
*/\r
- public boolean hasInclusive()\r
- {\r
+ public boolean hasInclusive(\r
+ ) {\r
return this._has_inclusive;\r
- } //-- boolean hasInclusive() \r
+ }\r
\r
/**\r
- * Method hasStart\r
- * \r
+ * Method hasStart.\r
* \r
- * \r
- * @return boolean\r
+ * @return true if at least one Start has been added\r
*/\r
- public boolean hasStart()\r
- {\r
+ public boolean hasStart(\r
+ ) {\r
return this._has_start;\r
- } //-- boolean hasStart() \r
+ }\r
\r
/**\r
- * Method isValid\r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming\r
+ * Language Guide</b> by Joshua Bloch, Chapter 3\r
* \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode(\r
+ ) {\r
+ int result = super.hashCode();\r
+ \r
+ long tmp;\r
+ result = 37 * result + _start;\r
+ result = 37 * result + _end;\r
+ result = 37 * result + (_inclusive?0:1);\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'inclusive'. The field\r
+ * 'inclusive' has the following description: when false, a\r
+ * consecutive range like 'start=1, end=2'\r
+ * means the region lying after position 1 and before position\r
+ * 2\r
+ * \r
* \r
+ * @return the value of field 'Inclusive'.\r
+ */\r
+ public boolean isInclusive(\r
+ ) {\r
+ return this._inclusive;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
* \r
- * @return boolean\r
+ * @return true if this object is valid according to the schema\r
*/\r
- public boolean isValid()\r
- {\r
+ public boolean isValid(\r
+ ) {\r
try {\r
validate();\r
- }\r
- catch (org.exolab.castor.xml.ValidationException vex) {\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
return false;\r
}\r
return true;\r
- } //-- boolean isValid() \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param out\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void marshal(java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, out);\r
- } //-- void marshal(java.io.Writer) \r
+ }\r
\r
/**\r
- * Method marshal\r
- * \r
* \r
* \r
* @param handler\r
+ * @throws java.io.IOException if an IOException occurs during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
*/\r
- public void marshal(org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
- \r
+ public void marshal(\r
+ final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
Marshaller.marshal(this, handler);\r
- } //-- void marshal(org.xml.sax.ContentHandler) \r
+ }\r
\r
/**\r
* Sets the value of field 'end'.\r
* \r
* @param end the value of field 'end'.\r
*/\r
- public void setEnd(int end)\r
- {\r
+ public void setEnd(\r
+ final int end) {\r
this._end = end;\r
this._has_end = true;\r
- } //-- void setEnd(int) \r
+ }\r
\r
/**\r
* Sets the value of field 'inclusive'. The field 'inclusive'\r
* \r
* @param inclusive the value of field 'inclusive'.\r
*/\r
- public void setInclusive(boolean inclusive)\r
- {\r
+ public void setInclusive(\r
+ final boolean inclusive) {\r
this._inclusive = inclusive;\r
this._has_inclusive = true;\r
- } //-- void setInclusive(boolean) \r
+ }\r
\r
/**\r
* Sets the value of field 'start'.\r
* \r
* @param start the value of field 'start'.\r
*/\r
- public void setStart(int start)\r
- {\r
+ public void setStart(\r
+ final int start) {\r
this._start = start;\r
this._has_start = true;\r
- } //-- void setStart(int) \r
+ }\r
\r
/**\r
- * Method unmarshal\r
- * \r
- * \r
+ * Method unmarshal.\r
* \r
* @param reader\r
- * @return Seg\r
+ * @throws org.exolab.castor.xml.MarshalException if object is\r
+ * null or if any SAXException is thrown during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.Seg\r
*/\r
- public static uk.ac.vamsas.objects.core.Seg unmarshal(java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
- {\r
+ public static uk.ac.vamsas.objects.core.Seg unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
return (uk.ac.vamsas.objects.core.Seg) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Seg.class, reader);\r
- } //-- uk.ac.vamsas.objects.core.Seg unmarshal(java.io.Reader) \r
+ }\r
\r
/**\r
- * Method validate\r
* \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException if this\r
+ * object is an invalid instance according to the schema\r
*/\r
- public void validate()\r
- throws org.exolab.castor.xml.ValidationException\r
- {\r
+ public void validate(\r
+ )\r
+ throws org.exolab.castor.xml.ValidationException {\r
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
validator.validate(this);\r
- } //-- void validate() \r
+ }\r
\r
}\r
/*
* 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 Sequence.
//- Constructors -/
//----------------/
- public Sequence()
- {
+ public Sequence() {
super();
- _dbRefList = new Vector();
- } //-- uk.ac.vamsas.objects.core.Sequence()
+ this._dbRefList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addDbRef
- *
*
*
* @param vDbRef
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addDbRef(uk.ac.vamsas.objects.core.DbRef vDbRef)
- throws java.lang.IndexOutOfBoundsException
- {
- _dbRefList.addElement(vDbRef);
- } //-- void addDbRef(uk.ac.vamsas.objects.core.DbRef)
+ public void addDbRef(
+ final uk.ac.vamsas.objects.core.DbRef vDbRef)
+ throws java.lang.IndexOutOfBoundsException {
+ this._dbRefList.addElement(vDbRef);
+ }
/**
- * Method addDbRef
- *
*
*
* @param index
* @param vDbRef
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addDbRef(int index, uk.ac.vamsas.objects.core.DbRef vDbRef)
- throws java.lang.IndexOutOfBoundsException
- {
- _dbRefList.insertElementAt(vDbRef, index);
- } //-- void addDbRef(int, uk.ac.vamsas.objects.core.DbRef)
+ public void addDbRef(
+ final int index,
+ final uk.ac.vamsas.objects.core.DbRef vDbRef)
+ throws java.lang.IndexOutOfBoundsException {
+ this._dbRefList.add(index, vDbRef);
+ }
/**
- * Method enumerateDbRef
- *
- *
+ * Method enumerateDbRef.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.DbRef elements
*/
- public java.util.Enumeration enumerateDbRef()
- {
- return _dbRefList.elements();
- } //-- java.util.Enumeration enumerateDbRef()
+ public java.util.Enumeration enumerateDbRef(
+ ) {
+ return this._dbRefList.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 getDbRef
- *
- *
+ * Method getDbRef.
*
* @param index
- * @return DbRef
+ * @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.DbRef at
+ * the given index
*/
- public uk.ac.vamsas.objects.core.DbRef getDbRef(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _dbRefList.size())) {
- throw new IndexOutOfBoundsException("getDbRef: Index value '"+index+"' not in range [0.."+_dbRefList.size()+ "]");
+ public uk.ac.vamsas.objects.core.DbRef getDbRef(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._dbRefList.size()) {
+ throw new IndexOutOfBoundsException("getDbRef: Index value '" + index + "' not in range [0.." + (this._dbRefList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.DbRef) _dbRefList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.DbRef getDbRef(int)
+ return (uk.ac.vamsas.objects.core.DbRef) _dbRefList.get(index);
+ }
/**
- * Method getDbRef
- *
+ * Method getDbRef.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 DbRef
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.DbRef[] getDbRef()
- {
- int size = _dbRefList.size();
- uk.ac.vamsas.objects.core.DbRef[] mArray = new uk.ac.vamsas.objects.core.DbRef[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.DbRef) _dbRefList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.DbRef[] getDbRef()
+ public uk.ac.vamsas.objects.core.DbRef[] getDbRef(
+ ) {
+ uk.ac.vamsas.objects.core.DbRef[] array = new uk.ac.vamsas.objects.core.DbRef[0];
+ return (uk.ac.vamsas.objects.core.DbRef[]) this._dbRefList.toArray(array);
+ }
/**
- * Method getDbRefCount
- *
+ * Method getDbRefAsReference.Returns a reference to
+ * '_dbRefList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getDbRefAsReference(
+ ) {
+ return this._dbRefList;
+ }
+
+ /**
+ * Method getDbRefCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getDbRefCount()
- {
- return _dbRefList.size();
- } //-- int getDbRefCount()
+ public int getDbRefCount(
+ ) {
+ return this._dbRefList.size();
+ }
/**
* Returns the value of field 'dictionary'. The field
* sequence
*
*
- * @return String
- * @return the value of field 'dictionary'.
+ * @return the value of field 'Dictionary'.
*/
- public java.lang.String getDictionary()
- {
+ public java.lang.String getDictionary(
+ ) {
return this._dictionary;
- } //-- java.lang.String getDictionary()
+ }
/**
* Returns the value of field 'id'. The field 'id' has the
* 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()
+ }
/**
- * Method isValid
- *
+ * 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 (_dictionary != null) {
+ result = 37 * result + _dictionary.hashCode();
+ }
+ if (_dbRefList != null) {
+ result = 37 * result + _dbRefList.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 removeAllDbRef
- *
*/
- public void removeAllDbRef()
- {
- _dbRefList.removeAllElements();
- } //-- void removeAllDbRef()
+ public void removeAllDbRef(
+ ) {
+ this._dbRefList.clear();
+ }
/**
- * Method removeDbRef
- *
+ * Method removeDbRef.
*
+ * @param vDbRef
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeDbRef(
+ final uk.ac.vamsas.objects.core.DbRef vDbRef) {
+ boolean removed = _dbRefList.remove(vDbRef);
+ return removed;
+ }
+
+ /**
+ * Method removeDbRefAt.
*
* @param index
- * @return DbRef
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.DbRef removeDbRef(int index)
- {
- java.lang.Object obj = _dbRefList.elementAt(index);
- _dbRefList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.DbRef removeDbRefAt(
+ final int index) {
+ java.lang.Object obj = this._dbRefList.remove(index);
return (uk.ac.vamsas.objects.core.DbRef) obj;
- } //-- uk.ac.vamsas.objects.core.DbRef removeDbRef(int)
+ }
/**
- * Method setDbRef
- *
*
*
* @param index
* @param vDbRef
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void setDbRef(int index, uk.ac.vamsas.objects.core.DbRef vDbRef)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _dbRefList.size())) {
- throw new IndexOutOfBoundsException("setDbRef: Index value '"+index+"' not in range [0.."+_dbRefList.size()+ "]");
+ public void setDbRef(
+ final int index,
+ final uk.ac.vamsas.objects.core.DbRef vDbRef)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._dbRefList.size()) {
+ throw new IndexOutOfBoundsException("setDbRef: Index value '" + index + "' not in range [0.." + (this._dbRefList.size() - 1) + "]");
}
- _dbRefList.setElementAt(vDbRef, index);
- } //-- void setDbRef(int, uk.ac.vamsas.objects.core.DbRef)
+
+ this._dbRefList.set(index, vDbRef);
+ }
/**
- * Method setDbRef
- *
*
*
- * @param dbRefArray
+ * @param vDbRefArray
*/
- public void setDbRef(uk.ac.vamsas.objects.core.DbRef[] dbRefArray)
- {
+ public void setDbRef(
+ final uk.ac.vamsas.objects.core.DbRef[] vDbRefArray) {
//-- copy array
- _dbRefList.removeAllElements();
- for (int i = 0; i < dbRefArray.length; i++) {
- _dbRefList.addElement(dbRefArray[i]);
+ _dbRefList.clear();
+
+ for (int i = 0; i < vDbRefArray.length; i++) {
+ this._dbRefList.add(vDbRefArray[i]);
}
- } //-- void setDbRef(uk.ac.vamsas.objects.core.DbRef)
+ }
+
+ /**
+ * Sets the value of '_dbRefList' by copying the given Vector.
+ * All elements will be checked for type safety.
+ *
+ * @param vDbRefList the Vector to copy.
+ */
+ public void setDbRef(
+ final java.util.Vector vDbRefList) {
+ // copy vector
+ this._dbRefList.clear();
+
+ this._dbRefList.addAll(vDbRefList);
+ }
+
+ /**
+ * Sets the value of '_dbRefList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param dbRefVector the Vector to set.
+ */
+ public void setDbRefAsReference(
+ final java.util.Vector dbRefVector) {
+ this._dbRefList = dbRefVector;
+ }
/**
* Sets the value of field 'dictionary'. The field 'dictionary'
*
* @param dictionary the value of field 'dictionary'.
*/
- public void setDictionary(java.lang.String dictionary)
- {
+ public void setDictionary(
+ final java.lang.String dictionary) {
this._dictionary = dictionary;
- } //-- void setDictionary(java.lang.String)
+ }
/**
* 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)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return SequenceType
+ * @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.SequenceTyp
*/
- public static uk.ac.vamsas.objects.core.SequenceType unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
- return (uk.ac.vamsas.objects.core.Sequence) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Sequence.class, reader);
- } //-- uk.ac.vamsas.objects.core.SequenceType unmarshal(java.io.Reader)
+ public static uk.ac.vamsas.objects.core.SequenceType unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (uk.ac.vamsas.objects.core.SequenceType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Sequence.class, 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()
+ }
}
/*
* 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 SequenceType.
//--------------------------/
/**
- * Field _start
+ * Field _start.
*/
- private int _start;
+ private long _start;
/**
* keeps track of state for field: _start
private boolean _has_start;
/**
- * Field _end
+ * Field _end.
*/
- private int _end;
+ private long _end;
/**
* keeps track of state for field: _end
private boolean _has_end;
/**
- * Field _sequence
+ * Field _sequence.
*/
private java.lang.String _sequence;
/**
- * Field _name
+ * Field _name.
*/
private java.lang.String _name;
/**
- * Field _description
+ * Field _description.
*/
private java.lang.String _description;
private java.util.Vector _propertyList;
/**
- * Field _mappingList
+ * Field _mappingList.
*/
private java.util.Vector _mappingList;
//- Constructors -/
//----------------/
- public SequenceType()
- {
+ public SequenceType() {
super();
- _propertyList = new Vector();
- _mappingList = new Vector();
- } //-- uk.ac.vamsas.objects.core.SequenceType()
+ this._propertyList = new java.util.Vector();
+ this._mappingList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addMapping
- *
*
*
* @param vMapping
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addMapping(uk.ac.vamsas.objects.core.Mapping vMapping)
- throws java.lang.IndexOutOfBoundsException
- {
- _mappingList.addElement(vMapping);
- } //-- void addMapping(uk.ac.vamsas.objects.core.Mapping)
+ public void addMapping(
+ final uk.ac.vamsas.objects.core.Mapping vMapping)
+ throws java.lang.IndexOutOfBoundsException {
+ this._mappingList.addElement(vMapping);
+ }
/**
- * Method addMapping
- *
*
*
* @param index
* @param vMapping
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addMapping(int index, uk.ac.vamsas.objects.core.Mapping vMapping)
- throws java.lang.IndexOutOfBoundsException
- {
- _mappingList.insertElementAt(vMapping, index);
- } //-- void addMapping(int, uk.ac.vamsas.objects.core.Mapping)
+ public void addMapping(
+ final int index,
+ final uk.ac.vamsas.objects.core.Mapping vMapping)
+ throws java.lang.IndexOutOfBoundsException {
+ this._mappingList.add(index, vMapping);
+ }
/**
- * Method addProperty
- *
*
*
* @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addProperty(uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- _propertyList.addElement(vProperty);
- } //-- void addProperty(uk.ac.vamsas.objects.core.Property)
+ public void addProperty(
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.addElement(vProperty);
+ }
/**
- * Method addProperty
- *
*
*
* @param index
* @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- _propertyList.insertElementAt(vProperty, index);
- } //-- void addProperty(int, uk.ac.vamsas.objects.core.Property)
+ public void addProperty(
+ final int index,
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.add(index, vProperty);
+ }
/**
- * Method deleteEnd
- *
*/
- public void deleteEnd()
- {
+ public void deleteEnd(
+ ) {
this._has_end= false;
- } //-- void deleteEnd()
+ }
/**
- * Method deleteStart
- *
*/
- public void deleteStart()
- {
+ public void deleteStart(
+ ) {
this._has_start= false;
- } //-- void deleteStart()
+ }
/**
- * Method enumerateMapping
+ * Method enumerateMapping.
*
- *
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Mapping elements
*/
- public java.util.Enumeration enumerateMapping()
- {
- return _mappingList.elements();
- } //-- java.util.Enumeration enumerateMapping()
+ public java.util.Enumeration enumerateMapping(
+ ) {
+ return this._mappingList.elements();
+ }
/**
- * Method enumerateProperty
- *
+ * Method enumerateProperty.
*
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Property elements
*/
- public java.util.Enumeration enumerateProperty()
- {
- return _propertyList.elements();
- } //-- java.util.Enumeration enumerateProperty()
+ public java.util.Enumeration enumerateProperty(
+ ) {
+ return this._propertyList.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)
+ }
/**
* Returns the value of field 'description'.
*
- * @return String
- * @return the value of field 'description'.
+ * @return the value of field 'Description'.
*/
- public java.lang.String getDescription()
- {
+ 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'.
+ * @return the value of field 'End'.
*/
- public int getEnd()
- {
+ public long getEnd(
+ ) {
return this._end;
- } //-- int getEnd()
+ }
/**
- * Method getMapping
- *
- *
+ * Method getMapping.
*
* @param index
- * @return Mapping
- */
- public uk.ac.vamsas.objects.core.Mapping getMapping(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _mappingList.size())) {
- throw new IndexOutOfBoundsException("getMapping: Index value '"+index+"' not in range [0.."+_mappingList.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.Mapping
+ * at the given index
+ */
+ public uk.ac.vamsas.objects.core.Mapping getMapping(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._mappingList.size()) {
+ throw new IndexOutOfBoundsException("getMapping: Index value '" + index + "' not in range [0.." + (this._mappingList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Mapping) _mappingList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Mapping getMapping(int)
+ return (uk.ac.vamsas.objects.core.Mapping) _mappingList.get(index);
+ }
/**
- * Method getMapping
+ * Method getMapping.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 Mapping
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Mapping[] getMapping()
- {
- int size = _mappingList.size();
- uk.ac.vamsas.objects.core.Mapping[] mArray = new uk.ac.vamsas.objects.core.Mapping[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Mapping) _mappingList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Mapping[] getMapping()
+ public uk.ac.vamsas.objects.core.Mapping[] getMapping(
+ ) {
+ uk.ac.vamsas.objects.core.Mapping[] array = new uk.ac.vamsas.objects.core.Mapping[0];
+ return (uk.ac.vamsas.objects.core.Mapping[]) this._mappingList.toArray(array);
+ }
/**
- * Method getMappingCount
- *
+ * Method getMappingAsReference.Returns a reference to
+ * '_mappingList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getMappingAsReference(
+ ) {
+ return this._mappingList;
+ }
+
+ /**
+ * Method getMappingCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getMappingCount()
- {
- return _mappingList.size();
- } //-- int getMappingCount()
+ public int getMappingCount(
+ ) {
+ return this._mappingList.size();
+ }
/**
* Returns the value of field 'name'.
*
- * @return String
- * @return the value of field 'name'.
+ * @return the value of field 'Name'.
*/
- public java.lang.String getName()
- {
+ public java.lang.String getName(
+ ) {
return this._name;
- } //-- java.lang.String getName()
+ }
/**
- * Method getProperty
- *
- *
+ * Method getProperty.
*
* @param index
- * @return Property
- */
- public uk.ac.vamsas.objects.core.Property getProperty(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _propertyList.size())) {
- throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.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.Property
+ * at the given index
+ */
+ public uk.ac.vamsas.objects.core.Property getProperty(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Property getProperty(int)
+ return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);
+ }
/**
- * Method getProperty
+ * Method getProperty.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 Property
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Property[] getProperty()
- {
- int size = _propertyList.size();
- uk.ac.vamsas.objects.core.Property[] mArray = new uk.ac.vamsas.objects.core.Property[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Property[] getProperty()
+ public uk.ac.vamsas.objects.core.Property[] getProperty(
+ ) {
+ uk.ac.vamsas.objects.core.Property[] array = new uk.ac.vamsas.objects.core.Property[0];
+ return (uk.ac.vamsas.objects.core.Property[]) this._propertyList.toArray(array);
+ }
/**
- * Method getPropertyCount
- *
+ * Method getPropertyAsReference.Returns a reference to
+ * '_propertyList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getPropertyAsReference(
+ ) {
+ return this._propertyList;
+ }
+
+ /**
+ * Method getPropertyCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getPropertyCount()
- {
- return _propertyList.size();
- } //-- int getPropertyCount()
+ public int getPropertyCount(
+ ) {
+ return this._propertyList.size();
+ }
/**
* Returns the value of field 'sequence'.
*
- * @return String
- * @return the value of field 'sequence'.
+ * @return the value of field 'Sequence'.
*/
- public java.lang.String getSequence()
- {
+ public java.lang.String getSequence(
+ ) {
return this._sequence;
- } //-- java.lang.String getSequence()
+ }
/**
* Returns the value of field 'start'.
*
- * @return int
- * @return the value of field 'start'.
+ * @return the value of field 'Start'.
*/
- public int getStart()
- {
+ public long getStart(
+ ) {
return this._start;
- } //-- int getStart()
+ }
/**
- * Method hasEnd
- *
- *
+ * Method hasEnd.
*
- * @return boolean
+ * @return true if at least one End has been added
*/
- public boolean hasEnd()
- {
+ public boolean hasEnd(
+ ) {
return this._has_end;
- } //-- boolean hasEnd()
+ }
/**
- * Method hasStart
+ * Method hasStart.
*
- *
- *
- * @return boolean
+ * @return true if at least one Start has been added
*/
- public boolean hasStart()
- {
+ public boolean hasStart(
+ ) {
return this._has_start;
- } //-- boolean hasStart()
+ }
/**
- * Method isValid
- *
+ * 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;
+ result = 37 * result + (int)(_start^(_start>>>32));
+ result = 37 * result + (int)(_end^(_end>>>32));
+ if (_sequence != null) {
+ result = 37 * result + _sequence.hashCode();
+ }
+ if (_name != null) {
+ result = 37 * result + _name.hashCode();
+ }
+ if (_description != null) {
+ result = 37 * result + _description.hashCode();
+ }
+ if (_propertyList != null) {
+ result = 37 * result + _propertyList.hashCode();
+ }
+ if (_mappingList != null) {
+ result = 37 * result + _mappingList.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
- */
- public void marshal(java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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
- */
- public void marshal(org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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 removeAllMapping
- *
*/
- public void removeAllMapping()
- {
- _mappingList.removeAllElements();
- } //-- void removeAllMapping()
+ public void removeAllMapping(
+ ) {
+ this._mappingList.clear();
+ }
/**
- * Method removeAllProperty
- *
*/
- public void removeAllProperty()
- {
- _propertyList.removeAllElements();
- } //-- void removeAllProperty()
+ public void removeAllProperty(
+ ) {
+ this._propertyList.clear();
+ }
/**
- * Method removeMapping
- *
+ * Method removeMapping.
*
+ * @param vMapping
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeMapping(
+ final uk.ac.vamsas.objects.core.Mapping vMapping) {
+ boolean removed = _mappingList.remove(vMapping);
+ return removed;
+ }
+
+ /**
+ * Method removeMappingAt.
*
* @param index
- * @return Mapping
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Mapping removeMapping(int index)
- {
- java.lang.Object obj = _mappingList.elementAt(index);
- _mappingList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Mapping removeMappingAt(
+ final int index) {
+ java.lang.Object obj = this._mappingList.remove(index);
return (uk.ac.vamsas.objects.core.Mapping) obj;
- } //-- uk.ac.vamsas.objects.core.Mapping removeMapping(int)
+ }
/**
- * Method removeProperty
- *
+ * Method removeProperty.
*
+ * @param vProperty
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeProperty(
+ final uk.ac.vamsas.objects.core.Property vProperty) {
+ boolean removed = _propertyList.remove(vProperty);
+ return removed;
+ }
+
+ /**
+ * Method removePropertyAt.
*
* @param index
- * @return Property
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Property removeProperty(int index)
- {
- java.lang.Object obj = _propertyList.elementAt(index);
- _propertyList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Property removePropertyAt(
+ final int index) {
+ java.lang.Object obj = this._propertyList.remove(index);
return (uk.ac.vamsas.objects.core.Property) obj;
- } //-- uk.ac.vamsas.objects.core.Property removeProperty(int)
+ }
/**
* Sets the value of field 'description'.
*
* @param description the value of field 'description'.
*/
- public void setDescription(java.lang.String description)
- {
+ public void setDescription(
+ final 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)
- {
+ public void setEnd(
+ final long end) {
this._end = end;
this._has_end = true;
- } //-- void setEnd(int)
+ }
/**
- * Method setMapping
- *
*
*
* @param index
* @param vMapping
- */
- public void setMapping(int index, uk.ac.vamsas.objects.core.Mapping vMapping)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _mappingList.size())) {
- throw new IndexOutOfBoundsException("setMapping: Index value '"+index+"' not in range [0.."+_mappingList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setMapping(
+ final int index,
+ final uk.ac.vamsas.objects.core.Mapping vMapping)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._mappingList.size()) {
+ throw new IndexOutOfBoundsException("setMapping: Index value '" + index + "' not in range [0.." + (this._mappingList.size() - 1) + "]");
}
- _mappingList.setElementAt(vMapping, index);
- } //-- void setMapping(int, uk.ac.vamsas.objects.core.Mapping)
+
+ this._mappingList.set(index, vMapping);
+ }
/**
- * Method setMapping
*
*
- *
- * @param mappingArray
+ * @param vMappingArray
*/
- public void setMapping(uk.ac.vamsas.objects.core.Mapping[] mappingArray)
- {
+ public void setMapping(
+ final uk.ac.vamsas.objects.core.Mapping[] vMappingArray) {
//-- copy array
- _mappingList.removeAllElements();
- for (int i = 0; i < mappingArray.length; i++) {
- _mappingList.addElement(mappingArray[i]);
+ _mappingList.clear();
+
+ for (int i = 0; i < vMappingArray.length; i++) {
+ this._mappingList.add(vMappingArray[i]);
}
- } //-- void setMapping(uk.ac.vamsas.objects.core.Mapping)
+ }
+
+ /**
+ * Sets the value of '_mappingList' by copying the given
+ * Vector. All elements will be checked for type safety.
+ *
+ * @param vMappingList the Vector to copy.
+ */
+ public void setMapping(
+ final java.util.Vector vMappingList) {
+ // copy vector
+ this._mappingList.clear();
+
+ this._mappingList.addAll(vMappingList);
+ }
+
+ /**
+ * Sets the value of '_mappingList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param mappingVector the Vector to set.
+ */
+ public void setMappingAsReference(
+ final java.util.Vector mappingVector) {
+ this._mappingList = mappingVector;
+ }
/**
* Sets the value of field 'name'.
*
* @param name the value of field 'name'.
*/
- public void setName(java.lang.String name)
- {
+ public void setName(
+ final java.lang.String name) {
this._name = name;
- } //-- void setName(java.lang.String)
+ }
/**
- * Method setProperty
- *
*
*
* @param index
* @param vProperty
- */
- public void setProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _propertyList.size())) {
- throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setProperty(
+ final int index,
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
}
- _propertyList.setElementAt(vProperty, index);
- } //-- void setProperty(int, uk.ac.vamsas.objects.core.Property)
+
+ this._propertyList.set(index, vProperty);
+ }
/**
- * Method setProperty
- *
*
*
- * @param propertyArray
+ * @param vPropertyArray
*/
- public void setProperty(uk.ac.vamsas.objects.core.Property[] propertyArray)
- {
+ public void setProperty(
+ final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {
//-- copy array
- _propertyList.removeAllElements();
- for (int i = 0; i < propertyArray.length; i++) {
- _propertyList.addElement(propertyArray[i]);
+ _propertyList.clear();
+
+ for (int i = 0; i < vPropertyArray.length; i++) {
+ this._propertyList.add(vPropertyArray[i]);
}
- } //-- void setProperty(uk.ac.vamsas.objects.core.Property)
+ }
+
+ /**
+ * Sets the value of '_propertyList' by copying the given
+ * Vector. All elements will be checked for type safety.
+ *
+ * @param vPropertyList the Vector to copy.
+ */
+ public void setProperty(
+ final java.util.Vector vPropertyList) {
+ // copy vector
+ this._propertyList.clear();
+
+ this._propertyList.addAll(vPropertyList);
+ }
+
+ /**
+ * Sets the value of '_propertyList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param propertyVector the Vector to set.
+ */
+ public void setPropertyAsReference(
+ final java.util.Vector propertyVector) {
+ this._propertyList = propertyVector;
+ }
/**
* Sets the value of field 'sequence'.
*
* @param sequence the value of field 'sequence'.
*/
- public void setSequence(java.lang.String sequence)
- {
+ public void setSequence(
+ final java.lang.String sequence) {
this._sequence = sequence;
- } //-- void setSequence(java.lang.String)
+ }
/**
* Sets the value of field 'start'.
*
* @param start the value of field 'start'.
*/
- public void setStart(int start)
- {
+ public void setStart(
+ final long start) {
this._start = start;
this._has_start = true;
- } //-- void setStart(int)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return SequenceType
- */
- public static uk.ac.vamsas.objects.core.SequenceType unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ * @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.SequenceTyp
+ */
+ public static uk.ac.vamsas.objects.core.SequenceType unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.SequenceType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.SequenceType.class, reader);
- } //-- uk.ac.vamsas.objects.core.SequenceType 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()
+ }
}
/*
* 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 Tree.
private java.lang.String _id;
/**
- * Field _modifiable
+ * Field _modifiable.
*/
private java.lang.String _modifiable;
/**
- * Field _title
+ * Field _title.
*/
private java.lang.String _title;
/**
- * Field _newickList
+ * Field _newickList.
*/
private java.util.Vector _newickList;
/**
- * Field _propertyList
+ * Field _propertyList.
*/
private java.util.Vector _propertyList;
/**
- * Field _provenance
+ * Field _provenance.
*/
private uk.ac.vamsas.objects.core.Provenance _provenance;
//- Constructors -/
//----------------/
- public Tree()
- {
+ public Tree() {
super();
- _newickList = new Vector();
- _propertyList = new Vector();
- } //-- uk.ac.vamsas.objects.core.Tree()
+ this._newickList = new java.util.Vector();
+ this._propertyList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addNewick
- *
*
*
* @param vNewick
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addNewick(uk.ac.vamsas.objects.core.Newick vNewick)
- throws java.lang.IndexOutOfBoundsException
- {
- _newickList.addElement(vNewick);
- } //-- void addNewick(uk.ac.vamsas.objects.core.Newick)
+ public void addNewick(
+ final uk.ac.vamsas.objects.core.Newick vNewick)
+ throws java.lang.IndexOutOfBoundsException {
+ this._newickList.addElement(vNewick);
+ }
/**
- * Method addNewick
- *
*
*
* @param index
* @param vNewick
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addNewick(int index, uk.ac.vamsas.objects.core.Newick vNewick)
- throws java.lang.IndexOutOfBoundsException
- {
- _newickList.insertElementAt(vNewick, index);
- } //-- void addNewick(int, uk.ac.vamsas.objects.core.Newick)
+ public void addNewick(
+ final int index,
+ final uk.ac.vamsas.objects.core.Newick vNewick)
+ throws java.lang.IndexOutOfBoundsException {
+ this._newickList.add(index, vNewick);
+ }
/**
- * Method addProperty
- *
*
*
* @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addProperty(uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- _propertyList.addElement(vProperty);
- } //-- void addProperty(uk.ac.vamsas.objects.core.Property)
+ public void addProperty(
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.addElement(vProperty);
+ }
/**
- * Method addProperty
- *
*
*
* @param index
* @param vProperty
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- _propertyList.insertElementAt(vProperty, index);
- } //-- void addProperty(int, uk.ac.vamsas.objects.core.Property)
+ public void addProperty(
+ final int index,
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ this._propertyList.add(index, vProperty);
+ }
/**
- * Method enumerateNewick
- *
- *
+ * Method enumerateNewick.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Newick elements
*/
- public java.util.Enumeration enumerateNewick()
- {
- return _newickList.elements();
- } //-- java.util.Enumeration enumerateNewick()
+ public java.util.Enumeration enumerateNewick(
+ ) {
+ return this._newickList.elements();
+ }
/**
- * Method enumerateProperty
+ * Method enumerateProperty.
*
- *
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Property elements
*/
- public java.util.Enumeration enumerateProperty()
- {
- return _propertyList.elements();
- } //-- java.util.Enumeration enumerateProperty()
+ public java.util.Enumeration enumerateProperty(
+ ) {
+ return this._propertyList.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)
+ }
/**
* 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 'modifiable'.
*
- * @return String
- * @return the value of field 'modifiable'.
+ * @return the value of field 'Modifiable'.
*/
- public java.lang.String getModifiable()
- {
+ public java.lang.String getModifiable(
+ ) {
return this._modifiable;
- } //-- java.lang.String getModifiable()
+ }
/**
- * Method getNewick
- *
- *
+ * Method getNewick.
*
* @param index
- * @return Newick
- */
- public uk.ac.vamsas.objects.core.Newick getNewick(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _newickList.size())) {
- throw new IndexOutOfBoundsException("getNewick: Index value '"+index+"' not in range [0.."+_newickList.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.Newick at
+ * the given index
+ */
+ public uk.ac.vamsas.objects.core.Newick getNewick(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._newickList.size()) {
+ throw new IndexOutOfBoundsException("getNewick: Index value '" + index + "' not in range [0.." + (this._newickList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Newick) _newickList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Newick getNewick(int)
+ return (uk.ac.vamsas.objects.core.Newick) _newickList.get(index);
+ }
/**
- * Method getNewick
- *
+ * Method getNewick.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 Newick
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Newick[] getNewick()
- {
- int size = _newickList.size();
- uk.ac.vamsas.objects.core.Newick[] mArray = new uk.ac.vamsas.objects.core.Newick[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Newick) _newickList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Newick[] getNewick()
+ public uk.ac.vamsas.objects.core.Newick[] getNewick(
+ ) {
+ uk.ac.vamsas.objects.core.Newick[] array = new uk.ac.vamsas.objects.core.Newick[0];
+ return (uk.ac.vamsas.objects.core.Newick[]) this._newickList.toArray(array);
+ }
/**
- * Method getNewickCount
- *
+ * Method getNewickAsReference.Returns a reference to
+ * '_newickList'. No type checking is performed on any
+ * modifications to the Vector.
*
- *
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getNewickCount()
- {
- return _newickList.size();
- } //-- int getNewickCount()
+ public java.util.Vector getNewickAsReference(
+ ) {
+ return this._newickList;
+ }
/**
- * Method getProperty
- *
+ * Method getNewickCount.
*
+ * @return the size of this collection
+ */
+ public int getNewickCount(
+ ) {
+ return this._newickList.size();
+ }
+
+ /**
+ * Method getProperty.
*
* @param index
- * @return Property
- */
- public uk.ac.vamsas.objects.core.Property getProperty(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _propertyList.size())) {
- throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.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.Property
+ * at the given index
+ */
+ public uk.ac.vamsas.objects.core.Property getProperty(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.Property getProperty(int)
+ return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);
+ }
/**
- * Method getProperty
- *
+ * Method getProperty.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 Property
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.Property[] getProperty()
- {
- int size = _propertyList.size();
- uk.ac.vamsas.objects.core.Property[] mArray = new uk.ac.vamsas.objects.core.Property[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.Property) _propertyList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.Property[] getProperty()
+ public uk.ac.vamsas.objects.core.Property[] getProperty(
+ ) {
+ uk.ac.vamsas.objects.core.Property[] array = new uk.ac.vamsas.objects.core.Property[0];
+ return (uk.ac.vamsas.objects.core.Property[]) this._propertyList.toArray(array);
+ }
/**
- * Method getPropertyCount
- *
+ * Method getPropertyAsReference.Returns a reference to
+ * '_propertyList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getPropertyAsReference(
+ ) {
+ return this._propertyList;
+ }
+
+ /**
+ * Method getPropertyCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getPropertyCount()
- {
- return _propertyList.size();
- } //-- int getPropertyCount()
+ public int getPropertyCount(
+ ) {
+ return this._propertyList.size();
+ }
/**
* 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()
+ }
/**
* Returns the value of field 'title'.
*
- * @return String
- * @return the value of field 'title'.
+ * @return the value of field 'Title'.
*/
- public java.lang.String getTitle()
- {
+ public java.lang.String getTitle(
+ ) {
return this._title;
- } //-- java.lang.String getTitle()
+ }
/**
- * Method isValid
- *
+ * 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 (_modifiable != null) {
+ result = 37 * result + _modifiable.hashCode();
+ }
+ if (_title != null) {
+ result = 37 * result + _title.hashCode();
+ }
+ if (_newickList != null) {
+ result = 37 * result + _newickList.hashCode();
+ }
+ if (_propertyList != null) {
+ result = 37 * result + _propertyList.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
- */
- public void marshal(java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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
- */
- public void marshal(org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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 removeAllNewick
- *
*/
- public void removeAllNewick()
- {
- _newickList.removeAllElements();
- } //-- void removeAllNewick()
+ public void removeAllNewick(
+ ) {
+ this._newickList.clear();
+ }
/**
- * Method removeAllProperty
- *
*/
- public void removeAllProperty()
- {
- _propertyList.removeAllElements();
- } //-- void removeAllProperty()
+ public void removeAllProperty(
+ ) {
+ this._propertyList.clear();
+ }
/**
- * Method removeNewick
- *
+ * Method removeNewick.
*
+ * @param vNewick
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeNewick(
+ final uk.ac.vamsas.objects.core.Newick vNewick) {
+ boolean removed = _newickList.remove(vNewick);
+ return removed;
+ }
+
+ /**
+ * Method removeNewickAt.
*
* @param index
- * @return Newick
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Newick removeNewick(int index)
- {
- java.lang.Object obj = _newickList.elementAt(index);
- _newickList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Newick removeNewickAt(
+ final int index) {
+ java.lang.Object obj = this._newickList.remove(index);
return (uk.ac.vamsas.objects.core.Newick) obj;
- } //-- uk.ac.vamsas.objects.core.Newick removeNewick(int)
+ }
/**
- * Method removeProperty
- *
+ * Method removeProperty.
*
+ * @param vProperty
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeProperty(
+ final uk.ac.vamsas.objects.core.Property vProperty) {
+ boolean removed = _propertyList.remove(vProperty);
+ return removed;
+ }
+
+ /**
+ * Method removePropertyAt.
*
* @param index
- * @return Property
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.Property removeProperty(int index)
- {
- java.lang.Object obj = _propertyList.elementAt(index);
- _propertyList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.Property removePropertyAt(
+ final int index) {
+ java.lang.Object obj = this._propertyList.remove(index);
return (uk.ac.vamsas.objects.core.Property) obj;
- } //-- uk.ac.vamsas.objects.core.Property removeProperty(int)
+ }
/**
* 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 'modifiable'.
*
* @param modifiable the value of field 'modifiable'.
*/
- public void setModifiable(java.lang.String modifiable)
- {
+ public void setModifiable(
+ final java.lang.String modifiable) {
this._modifiable = modifiable;
- } //-- void setModifiable(java.lang.String)
+ }
/**
- * Method setNewick
- *
*
*
* @param index
* @param vNewick
- */
- public void setNewick(int index, uk.ac.vamsas.objects.core.Newick vNewick)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _newickList.size())) {
- throw new IndexOutOfBoundsException("setNewick: Index value '"+index+"' not in range [0.."+_newickList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setNewick(
+ final int index,
+ final uk.ac.vamsas.objects.core.Newick vNewick)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._newickList.size()) {
+ throw new IndexOutOfBoundsException("setNewick: Index value '" + index + "' not in range [0.." + (this._newickList.size() - 1) + "]");
}
- _newickList.setElementAt(vNewick, index);
- } //-- void setNewick(int, uk.ac.vamsas.objects.core.Newick)
+
+ this._newickList.set(index, vNewick);
+ }
/**
- * Method setNewick
- *
*
*
- * @param newickArray
+ * @param vNewickArray
*/
- public void setNewick(uk.ac.vamsas.objects.core.Newick[] newickArray)
- {
+ public void setNewick(
+ final uk.ac.vamsas.objects.core.Newick[] vNewickArray) {
//-- copy array
- _newickList.removeAllElements();
- for (int i = 0; i < newickArray.length; i++) {
- _newickList.addElement(newickArray[i]);
+ _newickList.clear();
+
+ for (int i = 0; i < vNewickArray.length; i++) {
+ this._newickList.add(vNewickArray[i]);
}
- } //-- void setNewick(uk.ac.vamsas.objects.core.Newick)
+ }
/**
- * Method setProperty
+ * Sets the value of '_newickList' by copying the given Vector.
+ * All elements will be checked for type safety.
*
+ * @param vNewickList the Vector to copy.
+ */
+ public void setNewick(
+ final java.util.Vector vNewickList) {
+ // copy vector
+ this._newickList.clear();
+
+ this._newickList.addAll(vNewickList);
+ }
+
+ /**
+ * Sets the value of '_newickList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param newickVector the Vector to set.
+ */
+ public void setNewickAsReference(
+ final java.util.Vector newickVector) {
+ this._newickList = newickVector;
+ }
+
+ /**
*
*
* @param index
* @param vProperty
- */
- public void setProperty(int index, uk.ac.vamsas.objects.core.Property vProperty)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _propertyList.size())) {
- throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setProperty(
+ final int index,
+ final uk.ac.vamsas.objects.core.Property vProperty)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._propertyList.size()) {
+ throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
}
- _propertyList.setElementAt(vProperty, index);
- } //-- void setProperty(int, uk.ac.vamsas.objects.core.Property)
+
+ this._propertyList.set(index, vProperty);
+ }
/**
- * Method setProperty
*
*
- *
- * @param propertyArray
+ * @param vPropertyArray
*/
- public void setProperty(uk.ac.vamsas.objects.core.Property[] propertyArray)
- {
+ public void setProperty(
+ final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {
//-- copy array
- _propertyList.removeAllElements();
- for (int i = 0; i < propertyArray.length; i++) {
- _propertyList.addElement(propertyArray[i]);
+ _propertyList.clear();
+
+ for (int i = 0; i < vPropertyArray.length; i++) {
+ this._propertyList.add(vPropertyArray[i]);
}
- } //-- void setProperty(uk.ac.vamsas.objects.core.Property)
+ }
+
+ /**
+ * Sets the value of '_propertyList' by copying the given
+ * Vector. All elements will be checked for type safety.
+ *
+ * @param vPropertyList the Vector to copy.
+ */
+ public void setProperty(
+ final java.util.Vector vPropertyList) {
+ // copy vector
+ this._propertyList.clear();
+
+ this._propertyList.addAll(vPropertyList);
+ }
+
+ /**
+ * Sets the value of '_propertyList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param propertyVector the Vector to set.
+ */
+ public void setPropertyAsReference(
+ final java.util.Vector propertyVector) {
+ this._propertyList = propertyVector;
+ }
/**
* 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)
+ }
/**
* Sets the value of field 'title'.
*
* @param title the value of field 'title'.
*/
- public void setTitle(java.lang.String title)
- {
+ public void setTitle(
+ final java.lang.String title) {
this._title = title;
- } //-- void setTitle(java.lang.String)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return Tree
- */
- public static uk.ac.vamsas.objects.core.Tree unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ * @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.Tree
+ */
+ public static uk.ac.vamsas.objects.core.Tree unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.Tree) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Tree.class, reader);
- } //-- uk.ac.vamsas.objects.core.Tree 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()
+ }
}
/*
* 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 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 User.
//--------------------------/
/**
- * Field _fullname
+ * Field _fullname.
*/
private java.lang.String _fullname;
/**
- * Field _organization
+ * Field _organization.
*/
private java.lang.String _organization;
//- Constructors -/
//----------------/
- public User()
- {
+ public User() {
super();
- } //-- uk.ac.vamsas.objects.core.User()
+ }
//-----------/
//-----------/
/**
- * 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)
+ }
/**
* Returns the value of field 'fullname'.
*
- * @return String
- * @return the value of field 'fullname'.
+ * @return the value of field 'Fullname'.
*/
- public java.lang.String getFullname()
- {
+ public java.lang.String getFullname(
+ ) {
return this._fullname;
- } //-- java.lang.String getFullname()
+ }
/**
* Returns the value of field 'organization'.
*
- * @return String
- * @return the value of field 'organization'.
+ * @return the value of field 'Organization'.
*/
- public java.lang.String getOrganization()
- {
+ public java.lang.String getOrganization(
+ ) {
return this._organization;
- } //-- java.lang.String getOrganization()
+ }
/**
- * Method isValid
- *
+ * 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 (_fullname != null) {
+ result = 37 * result + _fullname.hashCode();
+ }
+ if (_organization != null) {
+ result = 37 * result + _organization.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)
+ }
/**
* Sets the value of field 'fullname'.
*
* @param fullname the value of field 'fullname'.
*/
- public void setFullname(java.lang.String fullname)
- {
+ public void setFullname(
+ final java.lang.String fullname) {
this._fullname = fullname;
- } //-- void setFullname(java.lang.String)
+ }
/**
* Sets the value of field 'organization'.
*
* @param organization the value of field 'organization'.
*/
- public void setOrganization(java.lang.String organization)
- {
+ public void setOrganization(
+ final java.lang.String organization) {
this._organization = organization;
- } //-- void setOrganization(java.lang.String)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return AppData
+ * @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.AppData
*/
- public static uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
- return (uk.ac.vamsas.objects.core.User) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.User.class, reader);
- } //-- uk.ac.vamsas.objects.core.AppData unmarshal(java.io.Reader)
+ public static uk.ac.vamsas.objects.core.AppData unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
+ return (uk.ac.vamsas.objects.core.AppData) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.User.class, 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()
+ }
}
/*
* 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;
/**
* contains unassociated trees and a number of analysis sets
private java.lang.String _id;
/**
- * Field _modifiable
+ * Field _modifiable.
*/
private java.lang.String _modifiable;
/**
- * Field _treeList
+ * Field _treeList.
*/
private java.util.Vector _treeList;
/**
- * Field _dataSetList
+ * Field _dataSetList.
*/
private java.util.Vector _dataSetList;
//- Constructors -/
//----------------/
- public VAMSAS()
- {
+ public VAMSAS() {
super();
- _treeList = new Vector();
- _dataSetList = new Vector();
- } //-- uk.ac.vamsas.objects.core.VAMSAS()
+ this._treeList = new java.util.Vector();
+ this._dataSetList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addDataSet
- *
*
*
* @param vDataSet
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addDataSet(uk.ac.vamsas.objects.core.DataSet vDataSet)
- throws java.lang.IndexOutOfBoundsException
- {
- _dataSetList.addElement(vDataSet);
- } //-- void addDataSet(uk.ac.vamsas.objects.core.DataSet)
+ public void addDataSet(
+ final uk.ac.vamsas.objects.core.DataSet vDataSet)
+ throws java.lang.IndexOutOfBoundsException {
+ this._dataSetList.addElement(vDataSet);
+ }
/**
- * Method addDataSet
- *
*
*
* @param index
* @param vDataSet
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addDataSet(int index, uk.ac.vamsas.objects.core.DataSet vDataSet)
- throws java.lang.IndexOutOfBoundsException
- {
- _dataSetList.insertElementAt(vDataSet, index);
- } //-- void addDataSet(int, uk.ac.vamsas.objects.core.DataSet)
+ public void addDataSet(
+ final int index,
+ final uk.ac.vamsas.objects.core.DataSet vDataSet)
+ throws java.lang.IndexOutOfBoundsException {
+ this._dataSetList.add(index, vDataSet);
+ }
/**
- * 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 enumerateDataSet
- *
- *
+ * Method enumerateDataSet.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.DataSet elements
*/
- public java.util.Enumeration enumerateDataSet()
- {
- return _dataSetList.elements();
- } //-- java.util.Enumeration enumerateDataSet()
+ public java.util.Enumeration enumerateDataSet(
+ ) {
+ return this._dataSetList.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 getDataSet
- *
- *
+ * Method getDataSet.
*
* @param index
- * @return DataSet
- */
- public uk.ac.vamsas.objects.core.DataSet getDataSet(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _dataSetList.size())) {
- throw new IndexOutOfBoundsException("getDataSet: Index value '"+index+"' not in range [0.."+_dataSetList.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.DataSet
+ * at the given index
+ */
+ public uk.ac.vamsas.objects.core.DataSet getDataSet(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._dataSetList.size()) {
+ throw new IndexOutOfBoundsException("getDataSet: Index value '" + index + "' not in range [0.." + (this._dataSetList.size() - 1) + "]");
}
- return (uk.ac.vamsas.objects.core.DataSet) _dataSetList.elementAt(index);
- } //-- uk.ac.vamsas.objects.core.DataSet getDataSet(int)
+ return (uk.ac.vamsas.objects.core.DataSet) _dataSetList.get(index);
+ }
/**
- * Method getDataSet
- *
+ * Method getDataSet.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 DataSet
+ * @return this collection as an Array
*/
- public uk.ac.vamsas.objects.core.DataSet[] getDataSet()
- {
- int size = _dataSetList.size();
- uk.ac.vamsas.objects.core.DataSet[] mArray = new uk.ac.vamsas.objects.core.DataSet[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (uk.ac.vamsas.objects.core.DataSet) _dataSetList.elementAt(index);
- }
- return mArray;
- } //-- uk.ac.vamsas.objects.core.DataSet[] getDataSet()
+ public uk.ac.vamsas.objects.core.DataSet[] getDataSet(
+ ) {
+ uk.ac.vamsas.objects.core.DataSet[] array = new uk.ac.vamsas.objects.core.DataSet[0];
+ return (uk.ac.vamsas.objects.core.DataSet[]) this._dataSetList.toArray(array);
+ }
/**
- * Method getDataSetCount
- *
+ * Method getDataSetAsReference.Returns a reference to
+ * '_dataSetList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getDataSetAsReference(
+ ) {
+ return this._dataSetList;
+ }
+
+ /**
+ * Method getDataSetCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getDataSetCount()
- {
- return _dataSetList.size();
- } //-- int getDataSetCount()
+ public int getDataSetCount(
+ ) {
+ return this._dataSetList.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 'modifiable'.
*
- * @return String
- * @return the value of field 'modifiable'.
+ * @return the value of field 'Modifiable'.
*/
- public java.lang.String getModifiable()
- {
+ public java.lang.String getModifiable(
+ ) {
return this._modifiable;
- } //-- java.lang.String getModifiable()
+ }
/**
- * Method getTree
- *
- *
+ * 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 (_modifiable != null) {
+ result = 37 * result + _modifiable.hashCode();
+ }
+ if (_treeList != null) {
+ result = 37 * result + _treeList.hashCode();
+ }
+ if (_dataSetList != null) {
+ result = 37 * result + _dataSetList.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
- */
- public void marshal(java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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
- */
- public void marshal(org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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 removeAllDataSet
- *
*/
- public void removeAllDataSet()
- {
- _dataSetList.removeAllElements();
- } //-- void removeAllDataSet()
+ public void removeAllDataSet(
+ ) {
+ this._dataSetList.clear();
+ }
/**
- * Method removeAllTree
- *
*/
- public void removeAllTree()
- {
- _treeList.removeAllElements();
- } //-- void removeAllTree()
+ public void removeAllTree(
+ ) {
+ this._treeList.clear();
+ }
/**
- * Method removeDataSet
- *
+ * Method removeDataSet.
*
+ * @param vDataSet
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeDataSet(
+ final uk.ac.vamsas.objects.core.DataSet vDataSet) {
+ boolean removed = _dataSetList.remove(vDataSet);
+ return removed;
+ }
+
+ /**
+ * Method removeDataSetAt.
*
* @param index
- * @return DataSet
+ * @return the element removed from the collection
*/
- public uk.ac.vamsas.objects.core.DataSet removeDataSet(int index)
- {
- java.lang.Object obj = _dataSetList.elementAt(index);
- _dataSetList.removeElementAt(index);
+ public uk.ac.vamsas.objects.core.DataSet removeDataSetAt(
+ final int index) {
+ java.lang.Object obj = this._dataSetList.remove(index);
return (uk.ac.vamsas.objects.core.DataSet) obj;
- } //-- uk.ac.vamsas.objects.core.DataSet removeDataSet(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 setDataSet
- *
*
*
* @param index
* @param vDataSet
- */
- public void setDataSet(int index, uk.ac.vamsas.objects.core.DataSet vDataSet)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _dataSetList.size())) {
- throw new IndexOutOfBoundsException("setDataSet: Index value '"+index+"' not in range [0.."+_dataSetList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setDataSet(
+ final int index,
+ final uk.ac.vamsas.objects.core.DataSet vDataSet)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._dataSetList.size()) {
+ throw new IndexOutOfBoundsException("setDataSet: Index value '" + index + "' not in range [0.." + (this._dataSetList.size() - 1) + "]");
}
- _dataSetList.setElementAt(vDataSet, index);
- } //-- void setDataSet(int, uk.ac.vamsas.objects.core.DataSet)
+
+ this._dataSetList.set(index, vDataSet);
+ }
/**
- * Method setDataSet
*
*
- *
- * @param dataSetArray
+ * @param vDataSetArray
*/
- public void setDataSet(uk.ac.vamsas.objects.core.DataSet[] dataSetArray)
- {
+ public void setDataSet(
+ final uk.ac.vamsas.objects.core.DataSet[] vDataSetArray) {
//-- copy array
- _dataSetList.removeAllElements();
- for (int i = 0; i < dataSetArray.length; i++) {
- _dataSetList.addElement(dataSetArray[i]);
+ _dataSetList.clear();
+
+ for (int i = 0; i < vDataSetArray.length; i++) {
+ this._dataSetList.add(vDataSetArray[i]);
}
- } //-- void setDataSet(uk.ac.vamsas.objects.core.DataSet)
+ }
+
+ /**
+ * Sets the value of '_dataSetList' by copying the given
+ * Vector. All elements will be checked for type safety.
+ *
+ * @param vDataSetList the Vector to copy.
+ */
+ public void setDataSet(
+ final java.util.Vector vDataSetList) {
+ // copy vector
+ this._dataSetList.clear();
+
+ this._dataSetList.addAll(vDataSetList);
+ }
+
+ /**
+ * Sets the value of '_dataSetList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param dataSetVector the Vector to set.
+ */
+ public void setDataSetAsReference(
+ final java.util.Vector dataSetVector) {
+ this._dataSetList = dataSetVector;
+ }
/**
* 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 'modifiable'.
*
* @param modifiable the value of field 'modifiable'.
*/
- public void setModifiable(java.lang.String modifiable)
- {
+ public void setModifiable(
+ final java.lang.String modifiable) {
this._modifiable = modifiable;
- } //-- void setModifiable(java.lang.String)
+ }
/**
- * Method setTree
- *
*
*
* @param index
* @param vTree
- */
- 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()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ 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 VAMSAS
- */
- public static uk.ac.vamsas.objects.core.VAMSAS unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ * @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.VAMSAS
+ */
+ public static uk.ac.vamsas.objects.core.VAMSAS unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.VAMSAS) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.VAMSAS.class, reader);
- } //-- uk.ac.vamsas.objects.core.VAMSAS 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()
+ }
}
/*
* 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 VamsasDocument.
private java.lang.String _version;
/**
- * Field _lockFile
+ * Field _lockFile.
*/
private uk.ac.vamsas.objects.core.LockFile _lockFile;
/**
- * Field _provenance
+ * Field _provenance.
*/
- private Provenance _provenance;
+ private uk.ac.vamsas.objects.core.Provenance _provenance;
/**
* contains unassociated trees and a number of analysis sets
private java.util.Vector _VAMSASList;
/**
- * Field _applicationDataList
+ * Field _applicationDataList.
*/
private java.util.Vector _applicationDataList;
/**
- * Field _attachmentList
+ * Field _attachmentList.
*/
private java.util.Vector _attachmentList;
//- Constructors -/
//----------------/
- public VamsasDocument()
- {
+ public VamsasDocument() {
super();
- _VAMSASList = new Vector();
- _applicationDataList = new Vector();
- _attachmentList = new Vector();
- } //-- uk.ac.vamsas.objects.core.VamsasDocument()
+ this._VAMSASList = new java.util.Vector();
+ this._applicationDataList = new java.util.Vector();
+ this._attachmentList = new java.util.Vector();
+ }
//-----------/
//-----------/
/**
- * Method addApplicationData
- *
*
*
* @param vApplicationData
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addApplicationData(ApplicationData vApplicationData)
- throws java.lang.IndexOutOfBoundsException
- {
- _applicationDataList.addElement(vApplicationData);
- } //-- void addApplicationData(ApplicationData)
+ public void addApplicationData(
+ final uk.ac.vamsas.objects.core.ApplicationData vApplicationData)
+ throws java.lang.IndexOutOfBoundsException {
+ this._applicationDataList.addElement(vApplicationData);
+ }
/**
- * Method addApplicationData
- *
*
*
* @param index
* @param vApplicationData
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addApplicationData(int index, ApplicationData vApplicationData)
- throws java.lang.IndexOutOfBoundsException
- {
- _applicationDataList.insertElementAt(vApplicationData, index);
- } //-- void addApplicationData(int, ApplicationData)
+ public void addApplicationData(
+ final int index,
+ final uk.ac.vamsas.objects.core.ApplicationData vApplicationData)
+ throws java.lang.IndexOutOfBoundsException {
+ this._applicationDataList.add(index, vApplicationData);
+ }
/**
- * Method addAttachment
- *
*
*
* @param vAttachment
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addAttachment(Attachment vAttachment)
- throws java.lang.IndexOutOfBoundsException
- {
- _attachmentList.addElement(vAttachment);
- } //-- void addAttachment(Attachment)
+ public void addAttachment(
+ final uk.ac.vamsas.objects.core.Attachment vAttachment)
+ throws java.lang.IndexOutOfBoundsException {
+ this._attachmentList.addElement(vAttachment);
+ }
/**
- * Method addAttachment
- *
*
*
* @param index
* @param vAttachment
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addAttachment(int index, Attachment vAttachment)
- throws java.lang.IndexOutOfBoundsException
- {
- _attachmentList.insertElementAt(vAttachment, index);
- } //-- void addAttachment(int, Attachment)
+ public void addAttachment(
+ final int index,
+ final uk.ac.vamsas.objects.core.Attachment vAttachment)
+ throws java.lang.IndexOutOfBoundsException {
+ this._attachmentList.add(index, vAttachment);
+ }
/**
- * Method addVAMSAS
- *
*
*
* @param vVAMSAS
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addVAMSAS(VAMSAS vVAMSAS)
- throws java.lang.IndexOutOfBoundsException
- {
- _VAMSASList.addElement(vVAMSAS);
- } //-- void addVAMSAS(VAMSAS)
+ public void addVAMSAS(
+ final uk.ac.vamsas.objects.core.VAMSAS vVAMSAS)
+ throws java.lang.IndexOutOfBoundsException {
+ this._VAMSASList.addElement(vVAMSAS);
+ }
/**
- * Method addVAMSAS
- *
*
*
* @param index
* @param vVAMSAS
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
- public void addVAMSAS(int index, VAMSAS vVAMSAS)
- throws java.lang.IndexOutOfBoundsException
- {
- _VAMSASList.insertElementAt(vVAMSAS, index);
- } //-- void addVAMSAS(int, VAMSAS)
+ public void addVAMSAS(
+ final int index,
+ final uk.ac.vamsas.objects.core.VAMSAS vVAMSAS)
+ throws java.lang.IndexOutOfBoundsException {
+ this._VAMSASList.add(index, vVAMSAS);
+ }
/**
- * Method enumerateApplicationData
- *
- *
+ * Method enumerateApplicationData.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.ApplicationData elements
*/
- public java.util.Enumeration enumerateApplicationData()
- {
- return _applicationDataList.elements();
- } //-- java.util.Enumeration enumerateApplicationData()
+ public java.util.Enumeration enumerateApplicationData(
+ ) {
+ return this._applicationDataList.elements();
+ }
/**
- * Method enumerateAttachment
+ * Method enumerateAttachment.
*
- *
- *
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Attachment elements
*/
- public java.util.Enumeration enumerateAttachment()
- {
- return _attachmentList.elements();
- } //-- java.util.Enumeration enumerateAttachment()
+ public java.util.Enumeration enumerateAttachment(
+ ) {
+ return this._attachmentList.elements();
+ }
/**
- * Method enumerateVAMSAS
- *
- *
+ * Method enumerateVAMSAS.
*
- * @return Enumeration
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.VAMSAS elements
*/
- public java.util.Enumeration enumerateVAMSAS()
- {
- return _VAMSASList.elements();
- } //-- java.util.Enumeration enumerateVAMSAS()
+ public java.util.Enumeration enumerateVAMSAS(
+ ) {
+ return this._VAMSASList.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 getApplicationData
- *
- *
+ * Method getApplicationData.
*
* @param index
- * @return ApplicationData
- */
- public ApplicationData getApplicationData(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _applicationDataList.size())) {
- throw new IndexOutOfBoundsException("getApplicationData: Index value '"+index+"' not in range [0.."+_applicationDataList.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.ApplicationData at the given index
+ */
+ public uk.ac.vamsas.objects.core.ApplicationData getApplicationData(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._applicationDataList.size()) {
+ throw new IndexOutOfBoundsException("getApplicationData: Index value '" + index + "' not in range [0.." + (this._applicationDataList.size() - 1) + "]");
}
- return (ApplicationData) _applicationDataList.elementAt(index);
- } //-- ApplicationData getApplicationData(int)
+ return (uk.ac.vamsas.objects.core.ApplicationData) _applicationDataList.get(index);
+ }
/**
- * Method getApplicationData
- *
+ * Method getApplicationData.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 ApplicationData
+ * @return this collection as an Array
*/
- public ApplicationData[] getApplicationData()
- {
- int size = _applicationDataList.size();
- ApplicationData[] mArray = new ApplicationData[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (ApplicationData) _applicationDataList.elementAt(index);
- }
- return mArray;
- } //-- ApplicationData[] getApplicationData()
+ public uk.ac.vamsas.objects.core.ApplicationData[] getApplicationData(
+ ) {
+ uk.ac.vamsas.objects.core.ApplicationData[] array = new uk.ac.vamsas.objects.core.ApplicationData[0];
+ return (uk.ac.vamsas.objects.core.ApplicationData[]) this._applicationDataList.toArray(array);
+ }
/**
- * Method getApplicationDataCount
- *
- *
+ * Method getApplicationDataAsReference.Returns a reference to
+ * '_applicationDataList'. No type checking is performed on any
+ * modifications to the Vector.
*
- * @return int
+ * @return a reference to the Vector backing this class
*/
- public int getApplicationDataCount()
- {
- return _applicationDataList.size();
- } //-- int getApplicationDataCount()
+ public java.util.Vector getApplicationDataAsReference(
+ ) {
+ return this._applicationDataList;
+ }
/**
- * Method getAttachment
- *
+ * Method getApplicationDataCount.
*
+ * @return the size of this collection
+ */
+ public int getApplicationDataCount(
+ ) {
+ return this._applicationDataList.size();
+ }
+
+ /**
+ * Method getAttachment.
*
* @param index
- * @return Attachment
- */
- public Attachment getAttachment(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _attachmentList.size())) {
- throw new IndexOutOfBoundsException("getAttachment: Index value '"+index+"' not in range [0.."+_attachmentList.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.Attachment at the given index
+ */
+ public uk.ac.vamsas.objects.core.Attachment getAttachment(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._attachmentList.size()) {
+ throw new IndexOutOfBoundsException("getAttachment: Index value '" + index + "' not in range [0.." + (this._attachmentList.size() - 1) + "]");
}
- return (Attachment) _attachmentList.elementAt(index);
- } //-- Attachment getAttachment(int)
+ return (uk.ac.vamsas.objects.core.Attachment) _attachmentList.get(index);
+ }
/**
- * Method getAttachment
+ * Method getAttachment.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 Attachment
+ * @return this collection as an Array
*/
- public Attachment[] getAttachment()
- {
- int size = _attachmentList.size();
- Attachment[] mArray = new Attachment[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (Attachment) _attachmentList.elementAt(index);
- }
- return mArray;
- } //-- Attachment[] getAttachment()
+ public uk.ac.vamsas.objects.core.Attachment[] getAttachment(
+ ) {
+ uk.ac.vamsas.objects.core.Attachment[] array = new uk.ac.vamsas.objects.core.Attachment[0];
+ return (uk.ac.vamsas.objects.core.Attachment[]) this._attachmentList.toArray(array);
+ }
/**
- * Method getAttachmentCount
- *
+ * Method getAttachmentAsReference.Returns a reference to
+ * '_attachmentList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getAttachmentAsReference(
+ ) {
+ return this._attachmentList;
+ }
+
+ /**
+ * Method getAttachmentCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getAttachmentCount()
- {
- return _attachmentList.size();
- } //-- int getAttachmentCount()
+ public int getAttachmentCount(
+ ) {
+ return this._attachmentList.size();
+ }
/**
* Returns the value of field 'lockFile'.
*
- * @return LockFile
- * @return the value of field 'lockFile'.
+ * @return the value of field 'LockFile'.
*/
- public uk.ac.vamsas.objects.core.LockFile getLockFile()
- {
+ public uk.ac.vamsas.objects.core.LockFile getLockFile(
+ ) {
return this._lockFile;
- } //-- uk.ac.vamsas.objects.core.LockFile getLockFile()
+ }
/**
* Returns the value of field 'provenance'.
*
- * @return Provenance
- * @return the value of field 'provenance'.
+ * @return the value of field 'Provenance'.
*/
- public Provenance getProvenance()
- {
+ public uk.ac.vamsas.objects.core.Provenance getProvenance(
+ ) {
return this._provenance;
- } //-- Provenance getProvenance()
+ }
/**
- * Method getVAMSAS
- *
- *
+ * Method getVAMSAS.
*
* @param index
- * @return VAMSAS
- */
- public VAMSAS getVAMSAS(int index)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _VAMSASList.size())) {
- throw new IndexOutOfBoundsException("getVAMSAS: Index value '"+index+"' not in range [0.."+_VAMSASList.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.VAMSAS at
+ * the given index
+ */
+ public uk.ac.vamsas.objects.core.VAMSAS getVAMSAS(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._VAMSASList.size()) {
+ throw new IndexOutOfBoundsException("getVAMSAS: Index value '" + index + "' not in range [0.." + (this._VAMSASList.size() - 1) + "]");
}
- return (VAMSAS) _VAMSASList.elementAt(index);
- } //-- VAMSAS getVAMSAS(int)
+ return (uk.ac.vamsas.objects.core.VAMSAS) _VAMSASList.get(index);
+ }
/**
- * Method getVAMSAS
- *
- *
+ * Method getVAMSAS.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 VAMSAS
+ * @return this collection as an Array
*/
- public VAMSAS[] getVAMSAS()
- {
- int size = _VAMSASList.size();
- VAMSAS[] mArray = new VAMSAS[size];
- for (int index = 0; index < size; index++) {
- mArray[index] = (VAMSAS) _VAMSASList.elementAt(index);
- }
- return mArray;
- } //-- VAMSAS[] getVAMSAS()
+ public uk.ac.vamsas.objects.core.VAMSAS[] getVAMSAS(
+ ) {
+ uk.ac.vamsas.objects.core.VAMSAS[] array = new uk.ac.vamsas.objects.core.VAMSAS[0];
+ return (uk.ac.vamsas.objects.core.VAMSAS[]) this._VAMSASList.toArray(array);
+ }
/**
- * Method getVAMSASCount
- *
+ * Method getVAMSASAsReference.Returns a reference to
+ * '_VAMSASList'. No type checking is performed on any
+ * modifications to the Vector.
*
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getVAMSASAsReference(
+ ) {
+ return this._VAMSASList;
+ }
+
+ /**
+ * Method getVAMSASCount.
*
- * @return int
+ * @return the size of this collection
*/
- public int getVAMSASCount()
- {
- return _VAMSASList.size();
- } //-- int getVAMSASCount()
+ public int getVAMSASCount(
+ ) {
+ return this._VAMSASList.size();
+ }
/**
* Returns the value of field 'version'. The field 'version'
* has the following description: Vamsas Document Version
* Number
*
- * @return String
- * @return the value of field 'version'.
+ * @return the value of field 'Version'.
*/
- public java.lang.String getVersion()
- {
+ public java.lang.String getVersion(
+ ) {
return this._version;
- } //-- java.lang.String getVersion()
+ }
/**
- * Method isValid
- *
+ * 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 (_version != null) {
+ result = 37 * result + _version.hashCode();
+ }
+ if (_lockFile != null) {
+ result = 37 * result + _lockFile.hashCode();
+ }
+ if (_provenance != null) {
+ result = 37 * result + _provenance.hashCode();
+ }
+ if (_VAMSASList != null) {
+ result = 37 * result + _VAMSASList.hashCode();
+ }
+ if (_applicationDataList != null) {
+ result = 37 * result + _applicationDataList.hashCode();
+ }
+ if (_attachmentList != null) {
+ result = 37 * result + _attachmentList.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
- */
- public void marshal(java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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
- */
- public void marshal(org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
-
+ * @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(
+ 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 removeAllApplicationData
- *
*/
- public void removeAllApplicationData()
- {
- _applicationDataList.removeAllElements();
- } //-- void removeAllApplicationData()
+ public void removeAllApplicationData(
+ ) {
+ this._applicationDataList.clear();
+ }
/**
- * Method removeAllAttachment
- *
*/
- public void removeAllAttachment()
- {
- _attachmentList.removeAllElements();
- } //-- void removeAllAttachment()
+ public void removeAllAttachment(
+ ) {
+ this._attachmentList.clear();
+ }
/**
- * Method removeAllVAMSAS
- *
*/
- public void removeAllVAMSAS()
- {
- _VAMSASList.removeAllElements();
- } //-- void removeAllVAMSAS()
+ public void removeAllVAMSAS(
+ ) {
+ this._VAMSASList.clear();
+ }
/**
- * Method removeApplicationData
- *
+ * Method removeApplicationData.
*
+ * @param vApplicationData
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeApplicationData(
+ final uk.ac.vamsas.objects.core.ApplicationData vApplicationData) {
+ boolean removed = _applicationDataList.remove(vApplicationData);
+ return removed;
+ }
+
+ /**
+ * Method removeApplicationDataAt.
*
* @param index
- * @return ApplicationData
+ * @return the element removed from the collection
*/
- public ApplicationData removeApplicationData(int index)
- {
- java.lang.Object obj = _applicationDataList.elementAt(index);
- _applicationDataList.removeElementAt(index);
- return (ApplicationData) obj;
- } //-- ApplicationData removeApplicationData(int)
+ public uk.ac.vamsas.objects.core.ApplicationData removeApplicationDataAt(
+ final int index) {
+ java.lang.Object obj = this._applicationDataList.remove(index);
+ return (uk.ac.vamsas.objects.core.ApplicationData) obj;
+ }
/**
- * Method removeAttachment
- *
+ * Method removeAttachment.
*
+ * @param vAttachment
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeAttachment(
+ final uk.ac.vamsas.objects.core.Attachment vAttachment) {
+ boolean removed = _attachmentList.remove(vAttachment);
+ return removed;
+ }
+
+ /**
+ * Method removeAttachmentAt.
*
* @param index
- * @return Attachment
+ * @return the element removed from the collection
*/
- public Attachment removeAttachment(int index)
- {
- java.lang.Object obj = _attachmentList.elementAt(index);
- _attachmentList.removeElementAt(index);
- return (Attachment) obj;
- } //-- Attachment removeAttachment(int)
+ public uk.ac.vamsas.objects.core.Attachment removeAttachmentAt(
+ final int index) {
+ java.lang.Object obj = this._attachmentList.remove(index);
+ return (uk.ac.vamsas.objects.core.Attachment) obj;
+ }
/**
- * Method removeVAMSAS
- *
+ * Method removeVAMSAS.
*
+ * @param vVAMSAS
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeVAMSAS(
+ final uk.ac.vamsas.objects.core.VAMSAS vVAMSAS) {
+ boolean removed = _VAMSASList.remove(vVAMSAS);
+ return removed;
+ }
+
+ /**
+ * Method removeVAMSASAt.
*
* @param index
- * @return VAMSAS
+ * @return the element removed from the collection
*/
- public VAMSAS removeVAMSAS(int index)
- {
- java.lang.Object obj = _VAMSASList.elementAt(index);
- _VAMSASList.removeElementAt(index);
- return (VAMSAS) obj;
- } //-- VAMSAS removeVAMSAS(int)
+ public uk.ac.vamsas.objects.core.VAMSAS removeVAMSASAt(
+ final int index) {
+ java.lang.Object obj = this._VAMSASList.remove(index);
+ return (uk.ac.vamsas.objects.core.VAMSAS) obj;
+ }
/**
- * Method setApplicationData
- *
*
*
* @param index
* @param vApplicationData
- */
- public void setApplicationData(int index, ApplicationData vApplicationData)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _applicationDataList.size())) {
- throw new IndexOutOfBoundsException("setApplicationData: Index value '"+index+"' not in range [0.."+_applicationDataList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setApplicationData(
+ final int index,
+ final uk.ac.vamsas.objects.core.ApplicationData vApplicationData)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._applicationDataList.size()) {
+ throw new IndexOutOfBoundsException("setApplicationData: Index value '" + index + "' not in range [0.." + (this._applicationDataList.size() - 1) + "]");
}
- _applicationDataList.setElementAt(vApplicationData, index);
- } //-- void setApplicationData(int, ApplicationData)
+
+ this._applicationDataList.set(index, vApplicationData);
+ }
/**
- * Method setApplicationData
*
*
- *
- * @param applicationDataArray
+ * @param vApplicationDataArray
*/
- public void setApplicationData(ApplicationData[] applicationDataArray)
- {
+ public void setApplicationData(
+ final uk.ac.vamsas.objects.core.ApplicationData[] vApplicationDataArray) {
//-- copy array
- _applicationDataList.removeAllElements();
- for (int i = 0; i < applicationDataArray.length; i++) {
- _applicationDataList.addElement(applicationDataArray[i]);
+ _applicationDataList.clear();
+
+ for (int i = 0; i < vApplicationDataArray.length; i++) {
+ this._applicationDataList.add(vApplicationDataArray[i]);
}
- } //-- void setApplicationData(ApplicationData)
+ }
/**
- * Method setAttachment
+ * Sets the value of '_applicationDataList' by copying the
+ * given Vector. All elements will be checked for type safety.
*
+ * @param vApplicationDataList the Vector to copy.
+ */
+ public void setApplicationData(
+ final java.util.Vector vApplicationDataList) {
+ // copy vector
+ this._applicationDataList.clear();
+
+ this._applicationDataList.addAll(vApplicationDataList);
+ }
+
+ /**
+ * Sets the value of '_applicationDataList' by setting it to
+ * the given Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param applicationDataVector the Vector to set.
+ */
+ public void setApplicationDataAsReference(
+ final java.util.Vector applicationDataVector) {
+ this._applicationDataList = applicationDataVector;
+ }
+
+ /**
*
*
* @param index
* @param vAttachment
- */
- public void setAttachment(int index, Attachment vAttachment)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _attachmentList.size())) {
- throw new IndexOutOfBoundsException("setAttachment: Index value '"+index+"' not in range [0.."+_attachmentList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setAttachment(
+ final int index,
+ final uk.ac.vamsas.objects.core.Attachment vAttachment)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._attachmentList.size()) {
+ throw new IndexOutOfBoundsException("setAttachment: Index value '" + index + "' not in range [0.." + (this._attachmentList.size() - 1) + "]");
}
- _attachmentList.setElementAt(vAttachment, index);
- } //-- void setAttachment(int, Attachment)
+
+ this._attachmentList.set(index, vAttachment);
+ }
/**
- * Method setAttachment
- *
*
*
- * @param attachmentArray
+ * @param vAttachmentArray
*/
- public void setAttachment(Attachment[] attachmentArray)
- {
+ public void setAttachment(
+ final uk.ac.vamsas.objects.core.Attachment[] vAttachmentArray) {
//-- copy array
- _attachmentList.removeAllElements();
- for (int i = 0; i < attachmentArray.length; i++) {
- _attachmentList.addElement(attachmentArray[i]);
+ _attachmentList.clear();
+
+ for (int i = 0; i < vAttachmentArray.length; i++) {
+ this._attachmentList.add(vAttachmentArray[i]);
}
- } //-- void setAttachment(Attachment)
+ }
+
+ /**
+ * Sets the value of '_attachmentList' by copying the given
+ * Vector. All elements will be checked for type safety.
+ *
+ * @param vAttachmentList the Vector to copy.
+ */
+ public void setAttachment(
+ final java.util.Vector vAttachmentList) {
+ // copy vector
+ this._attachmentList.clear();
+
+ this._attachmentList.addAll(vAttachmentList);
+ }
+
+ /**
+ * Sets the value of '_attachmentList' by setting it to the
+ * given Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param attachmentVector the Vector to set.
+ */
+ public void setAttachmentAsReference(
+ final java.util.Vector attachmentVector) {
+ this._attachmentList = attachmentVector;
+ }
/**
* Sets the value of field 'lockFile'.
*
* @param lockFile the value of field 'lockFile'.
*/
- public void setLockFile(uk.ac.vamsas.objects.core.LockFile lockFile)
- {
+ public void setLockFile(
+ final uk.ac.vamsas.objects.core.LockFile lockFile) {
this._lockFile = lockFile;
- } //-- void setLockFile(uk.ac.vamsas.objects.core.LockFile)
+ }
/**
* Sets the value of field 'provenance'.
*
* @param provenance the value of field 'provenance'.
*/
- public void setProvenance(Provenance provenance)
- {
+ public void setProvenance(
+ final uk.ac.vamsas.objects.core.Provenance provenance) {
this._provenance = provenance;
- } //-- void setProvenance(Provenance)
+ }
/**
- * Method setVAMSAS
- *
*
*
* @param index
* @param vVAMSAS
- */
- public void setVAMSAS(int index, VAMSAS vVAMSAS)
- throws java.lang.IndexOutOfBoundsException
- {
- //-- check bounds for index
- if ((index < 0) || (index > _VAMSASList.size())) {
- throw new IndexOutOfBoundsException("setVAMSAS: Index value '"+index+"' not in range [0.."+_VAMSASList.size()+ "]");
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setVAMSAS(
+ final int index,
+ final uk.ac.vamsas.objects.core.VAMSAS vVAMSAS)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._VAMSASList.size()) {
+ throw new IndexOutOfBoundsException("setVAMSAS: Index value '" + index + "' not in range [0.." + (this._VAMSASList.size() - 1) + "]");
}
- _VAMSASList.setElementAt(vVAMSAS, index);
- } //-- void setVAMSAS(int, VAMSAS)
+
+ this._VAMSASList.set(index, vVAMSAS);
+ }
/**
- * Method setVAMSAS
*
*
- *
- * @param VAMSASArray
+ * @param vVAMSASArray
*/
- public void setVAMSAS(VAMSAS[] VAMSASArray)
- {
+ public void setVAMSAS(
+ final uk.ac.vamsas.objects.core.VAMSAS[] vVAMSASArray) {
//-- copy array
- _VAMSASList.removeAllElements();
- for (int i = 0; i < VAMSASArray.length; i++) {
- _VAMSASList.addElement(VAMSASArray[i]);
+ _VAMSASList.clear();
+
+ for (int i = 0; i < vVAMSASArray.length; i++) {
+ this._VAMSASList.add(vVAMSASArray[i]);
}
- } //-- void setVAMSAS(VAMSAS)
+ }
+
+ /**
+ * Sets the value of '_VAMSASList' by copying the given Vector.
+ * All elements will be checked for type safety.
+ *
+ * @param vVAMSASList the Vector to copy.
+ */
+ public void setVAMSAS(
+ final java.util.Vector vVAMSASList) {
+ // copy vector
+ this._VAMSASList.clear();
+
+ this._VAMSASList.addAll(vVAMSASList);
+ }
+
+ /**
+ * Sets the value of '_VAMSASList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param VAMSASVector the Vector to set.
+ */
+ public void setVAMSASAsReference(
+ final java.util.Vector VAMSASVector) {
+ this._VAMSASList = VAMSASVector;
+ }
/**
* Sets the value of field 'version'. The field 'version' has
*
* @param version the value of field 'version'.
*/
- public void setVersion(java.lang.String version)
- {
+ public void setVersion(
+ final java.lang.String version) {
this._version = version;
- } //-- void setVersion(java.lang.String)
+ }
/**
- * Method unmarshal
- *
- *
+ * Method unmarshal.
*
* @param reader
- * @return VamsasDocument
- */
- public static uk.ac.vamsas.objects.core.VamsasDocument unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
+ * @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.VamsasDocument
+ */
+ public static uk.ac.vamsas.objects.core.VamsasDocument unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (uk.ac.vamsas.objects.core.VamsasDocument) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.VamsasDocument.class, reader);
- } //-- uk.ac.vamsas.objects.core.VamsasDocument 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()
+ }
}
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.AlignmentAnnotation;\r
+\r
+/**\r
+ * Class AlignmentAnnotationDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class AlignmentAnnotationDescriptor extends uk.ac.vamsas.objects.core.descriptors.RangeAnnotationDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public AlignmentAnnotationDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.RangeAnnotationDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "AlignmentAnnotation";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _graph\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_graph", "graph", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AlignmentAnnotation target = (AlignmentAnnotation) object;\r
+ if (!target.hasGraph()) { return null; }\r
+ return (target.getGraph() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AlignmentAnnotation target = (AlignmentAnnotation) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.setGraph( ((java.lang.Boolean) value).booleanValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _graph\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _provenance\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AlignmentAnnotation target = (AlignmentAnnotation) object;\r
+ return target.getProvenance();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AlignmentAnnotation target = (AlignmentAnnotation) object;\r
+ target.setProvenance( (uk.ac.vamsas.objects.core.Provenance) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Provenance();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _provenance\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.AlignmentAnnotation.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Alignment;\r
+\r
+/**\r
+ * Class AlignmentDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class AlignmentDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public AlignmentDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "Alignment";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _gapChar\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_gapChar", "gapChar", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Alignment target = (Alignment) object;\r
+ return target.getGapChar();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.setGapChar( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _gapChar\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _aligned\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_aligned", "aligned", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Alignment target = (Alignment) object;\r
+ if (!target.hasAligned()) { return null; }\r
+ return (target.getAligned() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteAligned();\r
+ return;\r
+ }\r
+ target.setAligned( ((java.lang.Boolean) value).booleanValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _aligned\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Alignment target = (Alignment) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _modifiable\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Alignment target = (Alignment) object;\r
+ return target.getModifiable();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.setModifiable( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _modifiable\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _alignmentAnnotationList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.AlignmentAnnotation.class, "_alignmentAnnotationList", "AlignmentAnnotation", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Alignment target = (Alignment) object;\r
+ return target.getAlignmentAnnotation();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.addAlignmentAnnotation( (uk.ac.vamsas.objects.core.AlignmentAnnotation) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.removeAllAlignmentAnnotation();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.AlignmentAnnotation();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _alignmentAnnotationList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _treeList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Tree.class, "_treeList", "Tree", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Alignment target = (Alignment) object;\r
+ return target.getTree();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.addTree( (uk.ac.vamsas.objects.core.Tree) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.removeAllTree();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Tree();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _treeList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _alignmentSequenceList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.AlignmentSequence.class, "_alignmentSequenceList", "alignmentSequence", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Alignment target = (Alignment) object;\r
+ return target.getAlignmentSequence();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.addAlignmentSequence( (uk.ac.vamsas.objects.core.AlignmentSequence) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.removeAllAlignmentSequence();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.AlignmentSequence();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _alignmentSequenceList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _propertyList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Alignment target = (Alignment) object;\r
+ return target.getProperty();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.addProperty( (uk.ac.vamsas.objects.core.Property) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.removeAllProperty();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Property();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _propertyList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _provenance\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Alignment target = (Alignment) object;\r
+ return target.getProvenance();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Alignment target = (Alignment) object;\r
+ target.setProvenance( (uk.ac.vamsas.objects.core.Provenance) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Provenance();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _provenance\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Alignment.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation;\r
+\r
+/**\r
+ * Class AlignmentSequenceAnnotationDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class AlignmentSequenceAnnotationDescriptor extends uk.ac.vamsas.objects.core.descriptors.RangeAnnotationDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public AlignmentSequenceAnnotationDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.RangeAnnotationDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "AlignmentSequenceAnnotation";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _graph\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_graph", "graph", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object;\r
+ if (!target.hasGraph()) { return null; }\r
+ return (target.getGraph() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.setGraph( ((java.lang.Boolean) value).booleanValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _graph\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _provenance\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object;\r
+ return target.getProvenance();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object;\r
+ target.setProvenance( (uk.ac.vamsas.objects.core.Provenance) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Provenance();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _provenance\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.AlignmentSequence;\r
+\r
+/**\r
+ * Class AlignmentSequenceDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class AlignmentSequenceDescriptor extends uk.ac.vamsas.objects.core.descriptors.SequenceTypeDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public AlignmentSequenceDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.SequenceTypeDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "alignmentSequence";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AlignmentSequence target = (AlignmentSequence) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AlignmentSequence target = (AlignmentSequence) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _refid\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_refid", "refid", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setReference(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AlignmentSequence target = (AlignmentSequence) object;\r
+ return target.getRefid();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AlignmentSequence target = (AlignmentSequence) object;\r
+ target.setRefid( (java.lang.Object) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.Object();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _refid\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdRefValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdRefValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _alignmentSequenceAnnotationList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation.class, "_alignmentSequenceAnnotationList", "AlignmentSequenceAnnotation", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AlignmentSequence target = (AlignmentSequence) object;\r
+ return target.getAlignmentSequenceAnnotation();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AlignmentSequence target = (AlignmentSequence) object;\r
+ target.addAlignmentSequenceAnnotation( (uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ AlignmentSequence target = (AlignmentSequence) object;\r
+ target.removeAllAlignmentSequenceAnnotation();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _alignmentSequenceAnnotationList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.AlignmentSequence.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.AnnotationElement;\r
+\r
+/**\r
+ * Class AnnotationElementDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class AnnotationElementDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public AnnotationElementDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "annotationElement";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _position\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_position", "position", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ if (!target.hasPosition()) { return null; }\r
+ return new java.lang.Long(target.getPosition());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.setPosition( ((java.lang.Long) value).longValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _position\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.LongValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _after\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_after", "after", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ if (!target.hasAfter()) { return null; }\r
+ return (target.getAfter() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteAfter();\r
+ return;\r
+ }\r
+ target.setAfter( ((java.lang.Boolean) value).booleanValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _after\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _description\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ return target.getDescription();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ target.setDescription( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _description\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _glyphList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Glyph.class, "_glyphList", "glyph", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ return target.getGlyph();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ target.addGlyph( (uk.ac.vamsas.objects.core.Glyph) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ target.removeAllGlyph();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Glyph();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _glyphList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _valueList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_valueList", "value", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ return target.getValue();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.addValue( ((java.lang.Float) value).floatValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ AnnotationElement target = (AnnotationElement) object;\r
+ target.removeAllValue();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _valueList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.FloatValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.FloatValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setMinInclusive((float) -3.4028235E38);\r
+ typeValidator.setMaxInclusive((float) 3.4028235E38);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.AnnotationElement.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.AppData;\r
+\r
+/**\r
+ * Class AppDataDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class AppDataDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public AppDataDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "appData";\r
+ _elementDefinition = false;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsChoice();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- initialize element descriptors\r
+ \r
+ //-- _data\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(byte[].class, "_data", "data", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AppData target = (AppData) object;\r
+ return target.getData();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AppData target = (AppData) object;\r
+ target.setData( (byte[]) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _data\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _dataReference\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dataReference", "dataReference", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ AppData target = (AppData) object;\r
+ return target.getDataReference();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ AppData target = (AppData) object;\r
+ target.setDataReference( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _dataReference\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.AppData.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.ApplicationData;\r
+\r
+/**\r
+ * Class ApplicationDataDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class ApplicationDataDescriptor extends uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public ApplicationDataDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "ApplicationData";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _version\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "version", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ ApplicationData target = (ApplicationData) object;\r
+ return target.getVersion();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ ApplicationData target = (ApplicationData) object;\r
+ target.setVersion( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _version\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _name\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ ApplicationData target = (ApplicationData) object;\r
+ return target.getName();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ ApplicationData target = (ApplicationData) object;\r
+ target.setName( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _name\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _userList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.User.class, "_userList", "User", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ ApplicationData target = (ApplicationData) object;\r
+ return target.getUser();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ ApplicationData target = (ApplicationData) object;\r
+ target.addUser( (uk.ac.vamsas.objects.core.User) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ ApplicationData target = (ApplicationData) object;\r
+ target.removeAllUser();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.User();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _userList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _common\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Common.class, "_common", "Common", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ ApplicationData target = (ApplicationData) object;\r
+ return target.getCommon();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ ApplicationData target = (ApplicationData) object;\r
+ target.setCommon( (uk.ac.vamsas.objects.core.Common) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Common();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _common\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _instanceList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Instance.class, "_instanceList", "Instance", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ ApplicationData target = (ApplicationData) object;\r
+ return target.getInstance();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ ApplicationData target = (ApplicationData) object;\r
+ target.addInstance( (uk.ac.vamsas.objects.core.Instance) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ ApplicationData target = (ApplicationData) object;\r
+ target.removeAllInstance();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Instance();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _instanceList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.ApplicationData.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Attachment;\r
+\r
+/**\r
+ * Class AttachmentDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class AttachmentDescriptor extends uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public AttachmentDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "Attachment";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _compressed\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_compressed", "compressed", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Attachment target = (Attachment) object;\r
+ if (!target.hasCompressed()) { return null; }\r
+ return (target.getCompressed() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Attachment target = (Attachment) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteCompressed();\r
+ return;\r
+ }\r
+ target.setCompressed( ((java.lang.Boolean) value).booleanValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _compressed\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _type\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Attachment target = (Attachment) object;\r
+ return target.getType();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Attachment target = (Attachment) object;\r
+ target.setType( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _type\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _objectref\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_objectref", "objectref", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setReference(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Attachment target = (Attachment) object;\r
+ return target.getObjectref();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Attachment target = (Attachment) object;\r
+ target.setObjectref( (java.lang.Object) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.Object();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _objectref\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdRefValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdRefValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Attachment target = (Attachment) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Attachment target = (Attachment) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Attachment.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Common;\r
+\r
+/**\r
+ * Class CommonDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class CommonDescriptor extends uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public CommonDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "Common";\r
+ _elementDefinition = true;\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Common.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.DataSetAnnotations;\r
+\r
+/**\r
+ * Class DataSetAnnotationsDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class DataSetAnnotationsDescriptor extends uk.ac.vamsas.objects.core.descriptors.RangeAnnotationDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public DataSetAnnotationsDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.RangeAnnotationDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "DataSetAnnotations";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _seqRef\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_seqRef", "seqRef", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setReference(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DataSetAnnotations target = (DataSetAnnotations) object;\r
+ return target.getSeqRef();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DataSetAnnotations target = (DataSetAnnotations) object;\r
+ target.setSeqRef( (java.lang.Object) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.Object();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _seqRef\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdRefValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdRefValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _provenance\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DataSetAnnotations target = (DataSetAnnotations) object;\r
+ return target.getProvenance();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DataSetAnnotations target = (DataSetAnnotations) object;\r
+ target.setProvenance( (uk.ac.vamsas.objects.core.Provenance) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Provenance();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _provenance\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.DataSetAnnotations.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.DataSet;\r
+\r
+/**\r
+ * Class DataSetDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class DataSetDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public DataSetDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "DataSet";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DataSet target = (DataSet) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DataSet target = (DataSet) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _sequenceList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Sequence.class, "_sequenceList", "Sequence", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DataSet target = (DataSet) object;\r
+ return target.getSequence();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DataSet target = (DataSet) object;\r
+ target.addSequence( (uk.ac.vamsas.objects.core.Sequence) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ DataSet target = (DataSet) object;\r
+ target.removeAllSequence();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Sequence();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _sequenceList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _dataSetAnnotationsList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.DataSetAnnotations.class, "_dataSetAnnotationsList", "DataSetAnnotations", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DataSet target = (DataSet) object;\r
+ return target.getDataSetAnnotations();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DataSet target = (DataSet) object;\r
+ target.addDataSetAnnotations( (uk.ac.vamsas.objects.core.DataSetAnnotations) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ DataSet target = (DataSet) object;\r
+ target.removeAllDataSetAnnotations();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.DataSetAnnotations();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _dataSetAnnotationsList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _alignmentList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Alignment.class, "_alignmentList", "Alignment", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DataSet target = (DataSet) object;\r
+ return target.getAlignment();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DataSet target = (DataSet) object;\r
+ target.addAlignment( (uk.ac.vamsas.objects.core.Alignment) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ DataSet target = (DataSet) object;\r
+ target.removeAllAlignment();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Alignment();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _alignmentList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _treeList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Tree.class, "_treeList", "Tree", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DataSet target = (DataSet) object;\r
+ return target.getTree();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DataSet target = (DataSet) object;\r
+ target.addTree( (uk.ac.vamsas.objects.core.Tree) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ DataSet target = (DataSet) object;\r
+ target.removeAllTree();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Tree();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _treeList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _provenance\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DataSet target = (DataSet) object;\r
+ return target.getProvenance();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DataSet target = (DataSet) object;\r
+ target.setProvenance( (uk.ac.vamsas.objects.core.Provenance) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Provenance();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _provenance\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.DataSet.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.DbRef;\r
+\r
+/**\r
+ * Class DbRefDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public DbRefDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "dbRef";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _source\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_source", "source", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DbRef target = (DbRef) object;\r
+ return target.getSource();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DbRef target = (DbRef) object;\r
+ target.setSource( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _source\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _version\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "version", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DbRef target = (DbRef) object;\r
+ return target.getVersion();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DbRef target = (DbRef) object;\r
+ target.setVersion( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _version\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _accessionId\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_accessionId", "accessionId", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DbRef target = (DbRef) object;\r
+ return target.getAccessionId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DbRef target = (DbRef) object;\r
+ target.setAccessionId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _accessionId\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DbRef target = (DbRef) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DbRef target = (DbRef) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _mapList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Map.class, "_mapList", "map", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DbRef target = (DbRef) object;\r
+ return target.getMap();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DbRef target = (DbRef) object;\r
+ target.addMap( (uk.ac.vamsas.objects.core.Map) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ DbRef target = (DbRef) object;\r
+ target.removeAllMap();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Map();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _mapList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _linkList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Link.class, "_linkList", "link", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DbRef target = (DbRef) object;\r
+ return target.getLink();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DbRef target = (DbRef) object;\r
+ target.addLink( (uk.ac.vamsas.objects.core.Link) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ DbRef target = (DbRef) object;\r
+ target.removeAllLink();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Link();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _linkList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _propertyList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ DbRef target = (DbRef) object;\r
+ return target.getProperty();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ DbRef target = (DbRef) object;\r
+ target.addProperty( (uk.ac.vamsas.objects.core.Property) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ DbRef target = (DbRef) object;\r
+ target.removeAllProperty();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Property();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _propertyList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.DbRef.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Entry;\r
+\r
+/**\r
+ * Class EntryDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class EntryDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public EntryDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "entry";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Entry target = (Entry) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Entry target = (Entry) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _user\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_user", "User", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Entry target = (Entry) object;\r
+ return target.getUser();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Entry target = (Entry) object;\r
+ target.setUser( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _user\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _app\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_app", "App", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Entry target = (Entry) object;\r
+ return target.getApp();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Entry target = (Entry) object;\r
+ target.setApp( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _app\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _action\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_action", "Action", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Entry target = (Entry) object;\r
+ return target.getAction();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Entry target = (Entry) object;\r
+ target.setAction( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _action\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _date\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.exolab.castor.types.Date.class, "_date", "Date", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Entry target = (Entry) object;\r
+ return target.getDate();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Entry target = (Entry) object;\r
+ target.setDate( (org.exolab.castor.types.Date) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new org.exolab.castor.types.Date();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _date\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.DateTimeValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.DateTimeValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _propertyList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Entry target = (Entry) object;\r
+ return target.getProperty();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Entry target = (Entry) object;\r
+ target.addProperty( (uk.ac.vamsas.objects.core.Property) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ Entry target = (Entry) object;\r
+ target.removeAllProperty();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Property();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _propertyList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _paramList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Param.class, "_paramList", "param", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Entry target = (Entry) object;\r
+ return target.getParam();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Entry target = (Entry) object;\r
+ target.addParam( (uk.ac.vamsas.objects.core.Param) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ Entry target = (Entry) object;\r
+ target.removeAllParam();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Param();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _paramList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _inputList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Input.class, "_inputList", "input", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Entry target = (Entry) object;\r
+ return target.getInput();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Entry target = (Entry) object;\r
+ target.addInput( (uk.ac.vamsas.objects.core.Input) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ Entry target = (Entry) object;\r
+ target.removeAllInput();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Input();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _inputList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Entry.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Glyph;\r
+\r
+/**\r
+ * Class GlyphDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class GlyphDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public GlyphDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "glyph";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- _content\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Glyph target = (Glyph) object;\r
+ return target.getContent();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Glyph target = (Glyph) object;\r
+ target.setContent( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _content\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _dict\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dict", "dict", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Glyph target = (Glyph) object;\r
+ return target.getDict();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Glyph target = (Glyph) object;\r
+ target.setDict( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _dict\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Glyph.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Input;\r
+\r
+/**\r
+ * Class InputDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class InputDescriptor extends uk.ac.vamsas.objects.core.descriptors.RangeTypeDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public InputDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.RangeTypeDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "input";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _name\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Input target = (Input) object;\r
+ return target.getName();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Input target = (Input) object;\r
+ target.setName( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _name\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _objRef\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_objRef", "objRef", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setReference(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Input target = (Input) object;\r
+ return target.getObjRef();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Input target = (Input) object;\r
+ target.setObjRef( (java.lang.Object) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.Object();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _objRef\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdRefValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdRefValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Input.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Instance;\r
+\r
+/**\r
+ * Class InstanceDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class InstanceDescriptor extends uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public InstanceDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "Instance";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _urn\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_urn", "urn", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Instance target = (Instance) object;\r
+ return target.getUrn();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Instance target = (Instance) object;\r
+ target.setUrn( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _urn\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Instance.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Link;\r
+\r
+/**\r
+ * Class LinkDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class LinkDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public LinkDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "link";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- _content\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Link target = (Link) object;\r
+ return target.getContent();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Link target = (Link) object;\r
+ target.setContent( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _content\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _href\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_href", "href", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Link target = (Link) object;\r
+ return target.getHref();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Link target = (Link) object;\r
+ target.setHref( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _href\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Link.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.LockFile;\r
+\r
+/**\r
+ * Class LockFileDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class LockFileDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public LockFileDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasDocument";\r
+ _xmlName = "LockFile";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- _content\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ LockFile target = (LockFile) object;\r
+ return target.getContent();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ LockFile target = (LockFile) object;\r
+ target.setContent( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _content\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.LockFile.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Map;\r
+\r
+/**\r
+ * Class MapDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class MapDescriptor extends uk.ac.vamsas.objects.core.descriptors.MapListDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public MapDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.MapListDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "map";\r
+ _elementDefinition = true;\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Map.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.MapList;\r
+\r
+/**\r
+ * Class MapListDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class MapListDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public MapListDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "mapList";\r
+ _elementDefinition = false;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _from\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_from", "from", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ MapList target = (MapList) object;\r
+ if (!target.hasFrom()) { return null; }\r
+ return new java.lang.Long(target.getFrom());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ MapList target = (MapList) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteFrom();\r
+ return;\r
+ }\r
+ target.setFrom( ((java.lang.Long) value).longValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _from\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.LongValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _to\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_to", "to", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ MapList target = (MapList) object;\r
+ if (!target.hasTo()) { return null; }\r
+ return new java.lang.Long(target.getTo());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ MapList target = (MapList) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteTo();\r
+ return;\r
+ }\r
+ target.setTo( ((java.lang.Long) value).longValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _to\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.LongValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _start\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ MapList target = (MapList) object;\r
+ if (!target.hasStart()) { return null; }\r
+ return new java.lang.Long(target.getStart());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ MapList target = (MapList) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.setStart( ((java.lang.Long) value).longValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _start\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.LongValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _end\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ MapList target = (MapList) object;\r
+ if (!target.hasEnd()) { return null; }\r
+ return new java.lang.Long(target.getEnd());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ MapList target = (MapList) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.setEnd( ((java.lang.Long) value).longValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _end\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.LongValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.MapList.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Mapping;\r
+\r
+/**\r
+ * Class MappingDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class MappingDescriptor extends uk.ac.vamsas.objects.core.descriptors.MapListDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public MappingDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.MapListDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "mapping";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _onto\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_onto", "onto", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setReference(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Mapping target = (Mapping) object;\r
+ return target.getOnto();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Mapping target = (Mapping) object;\r
+ target.setOnto( (java.lang.Object) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.Object();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _onto\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdRefValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdRefValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Mapping.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Newick;\r
+\r
+/**\r
+ * Class NewickDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class NewickDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public NewickDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "newick";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- _content\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Newick target = (Newick) object;\r
+ return target.getContent();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Newick target = (Newick) object;\r
+ target.setContent( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _content\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _title\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Newick target = (Newick) object;\r
+ return target.getTitle();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Newick target = (Newick) object;\r
+ target.setTitle( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _title\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Newick target = (Newick) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Newick target = (Newick) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _modifiable\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Newick target = (Newick) object;\r
+ return target.getModifiable();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Newick target = (Newick) object;\r
+ target.setModifiable( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _modifiable\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Newick.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Param;\r
+\r
+/**\r
+ * Class ParamDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class ParamDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public ParamDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "param";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- _content\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Param target = (Param) object;\r
+ return target.getContent();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Param target = (Param) object;\r
+ target.setContent( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _content\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _name\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Param target = (Param) object;\r
+ return target.getName();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Param target = (Param) object;\r
+ target.setName( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _name\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _type\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Param target = (Param) object;\r
+ return target.getType();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Param target = (Param) object;\r
+ target.setType( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _type\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Param.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Pos;\r
+\r
+/**\r
+ * Class PosDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class PosDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public PosDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "pos";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _i\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_i", "i", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Pos target = (Pos) object;\r
+ if (!target.hasI()) { return null; }\r
+ return new java.lang.Integer(target.getI());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Pos target = (Pos) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.setI( ((java.lang.Integer) value).intValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _i\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IntValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setMinInclusive(-2147483648);\r
+ typeValidator.setMaxInclusive(2147483647);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Pos.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Property;\r
+\r
+/**\r
+ * Class PropertyDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class PropertyDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public PropertyDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "property";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- _content\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Property target = (Property) object;\r
+ return target.getContent();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Property target = (Property) object;\r
+ target.setContent( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _content\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _name\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Property target = (Property) object;\r
+ return target.getName();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Property target = (Property) object;\r
+ target.setName( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _name\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _type\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Property target = (Property) object;\r
+ return target.getType();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Property target = (Property) object;\r
+ target.setType( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _type\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Property.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Provenance;\r
+\r
+/**\r
+ * Class ProvenanceDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class ProvenanceDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public ProvenanceDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "Provenance";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- initialize element descriptors\r
+ \r
+ //-- _entryList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Entry.class, "_entryList", "entry", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Provenance target = (Provenance) object;\r
+ return target.getEntry();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Provenance target = (Provenance) object;\r
+ target.addEntry( (uk.ac.vamsas.objects.core.Entry) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ Provenance target = (Provenance) object;\r
+ target.removeAllEntry();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Entry();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _entryList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Provenance.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.RangeAnnotation;\r
+\r
+/**\r
+ * Class RangeAnnotationDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class RangeAnnotationDescriptor extends uk.ac.vamsas.objects.core.descriptors.RangeTypeDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public RangeAnnotationDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.RangeTypeDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "rangeAnnotation";\r
+ _elementDefinition = false;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _modifiable\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ return target.getModifiable();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.setModifiable( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _modifiable\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _group\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_group", "group", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ return target.getGroup();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.setGroup( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _group\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _type\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ return target.getType();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.setType( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _type\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _label\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_label", "label", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ return target.getLabel();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.setLabel( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _label\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _description\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ return target.getDescription();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.setDescription( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _description\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _status\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_status", "status", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ return target.getStatus();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.setStatus( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _status\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _annotationElementList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.AnnotationElement.class, "_annotationElementList", "annotationElement", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ return target.getAnnotationElement();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.addAnnotationElement( (uk.ac.vamsas.objects.core.AnnotationElement) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.removeAllAnnotationElement();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.AnnotationElement();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _annotationElementList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _scoreList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Score.class, "_scoreList", "score", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ return target.getScore();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.addScore( (uk.ac.vamsas.objects.core.Score) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.removeAllScore();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Score();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _scoreList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _linkList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Link.class, "_linkList", "link", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ return target.getLink();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.addLink( (uk.ac.vamsas.objects.core.Link) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.removeAllLink();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Link();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _linkList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _propertyList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ return target.getProperty();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.addProperty( (uk.ac.vamsas.objects.core.Property) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ RangeAnnotation target = (RangeAnnotation) object;\r
+ target.removeAllProperty();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Property();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _propertyList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.RangeAnnotation.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.RangeType;\r
+\r
+/**\r
+ * Class RangeTypeDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class RangeTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public RangeTypeDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "rangeType";\r
+ _elementDefinition = false;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsChoice();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- initialize element descriptors\r
+ \r
+ //-- _posList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Pos.class, "_posList", "pos", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeType target = (RangeType) object;\r
+ return target.getPos();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeType target = (RangeType) object;\r
+ target.addPos( (uk.ac.vamsas.objects.core.Pos) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ RangeType target = (RangeType) object;\r
+ target.removeAllPos();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Pos();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _posList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _segList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Seg.class, "_segList", "seg", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ RangeType target = (RangeType) object;\r
+ return target.getSeg();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ RangeType target = (RangeType) object;\r
+ target.addSeg( (uk.ac.vamsas.objects.core.Seg) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ RangeType target = (RangeType) object;\r
+ target.removeAllSeg();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Seg();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _segList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.RangeType.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Score;\r
+\r
+/**\r
+ * Class ScoreDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class ScoreDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public ScoreDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "score";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- _content\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Score target = (Score) object;\r
+ if (!target.hasContent()) { return null; }\r
+ return new java.lang.Float(target.getContent());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Score target = (Score) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteContent();\r
+ return;\r
+ }\r
+ target.setContent( ((java.lang.Float) value).floatValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _content\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.FloatValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.FloatValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setMinInclusive((float) -3.4028235E38);\r
+ typeValidator.setMaxInclusive((float) 3.4028235E38);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _name\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Score target = (Score) object;\r
+ return target.getName();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Score target = (Score) object;\r
+ target.setName( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _name\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Score.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Seg;\r
+\r
+/**\r
+ * Class SegDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class SegDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public SegDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "seg";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _start\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Seg target = (Seg) object;\r
+ if (!target.hasStart()) { return null; }\r
+ return new java.lang.Integer(target.getStart());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Seg target = (Seg) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.setStart( ((java.lang.Integer) value).intValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _start\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IntValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setMinInclusive(-2147483648);\r
+ typeValidator.setMaxInclusive(2147483647);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _end\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Seg target = (Seg) object;\r
+ if (!target.hasEnd()) { return null; }\r
+ return new java.lang.Integer(target.getEnd());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Seg target = (Seg) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.setEnd( ((java.lang.Integer) value).intValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _end\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IntValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setMinInclusive(-2147483648);\r
+ typeValidator.setMaxInclusive(2147483647);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _inclusive\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_inclusive", "inclusive", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Seg target = (Seg) object;\r
+ if (!target.hasInclusive()) { return null; }\r
+ return (target.getInclusive() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Seg target = (Seg) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.setInclusive( ((java.lang.Boolean) value).booleanValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _inclusive\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Seg.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Sequence;\r
+\r
+/**\r
+ * Class SequenceDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class SequenceDescriptor extends uk.ac.vamsas.objects.core.descriptors.SequenceTypeDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public SequenceDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.SequenceTypeDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "Sequence";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Sequence target = (Sequence) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Sequence target = (Sequence) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _dictionary\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dictionary", "dictionary", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Sequence target = (Sequence) object;\r
+ return target.getDictionary();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Sequence target = (Sequence) object;\r
+ target.setDictionary( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _dictionary\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _dbRefList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.DbRef.class, "_dbRefList", "dbRef", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Sequence target = (Sequence) object;\r
+ return target.getDbRef();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Sequence target = (Sequence) object;\r
+ target.addDbRef( (uk.ac.vamsas.objects.core.DbRef) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ Sequence target = (Sequence) object;\r
+ target.removeAllDbRef();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.DbRef();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _dbRefList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Sequence.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.SequenceType;\r
+\r
+/**\r
+ * Class SequenceTypeDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class SequenceTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public SequenceTypeDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "SequenceType";\r
+ _elementDefinition = false;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _start\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ SequenceType target = (SequenceType) object;\r
+ if (!target.hasStart()) { return null; }\r
+ return new java.lang.Long(target.getStart());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ SequenceType target = (SequenceType) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.setStart( ((java.lang.Long) value).longValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _start\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.LongValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _end\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ SequenceType target = (SequenceType) object;\r
+ if (!target.hasEnd()) { return null; }\r
+ return new java.lang.Long(target.getEnd());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ SequenceType target = (SequenceType) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) { return; }\r
+ \r
+ target.setEnd( ((java.lang.Long) value).longValue());\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _end\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.LongValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.LongValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _sequence\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequence", "sequence", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ SequenceType target = (SequenceType) object;\r
+ return target.getSequence();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ SequenceType target = (SequenceType) object;\r
+ target.setSequence( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _sequence\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _name\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ SequenceType target = (SequenceType) object;\r
+ return target.getName();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ SequenceType target = (SequenceType) object;\r
+ target.setName( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _name\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _description\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ SequenceType target = (SequenceType) object;\r
+ return target.getDescription();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ SequenceType target = (SequenceType) object;\r
+ target.setDescription( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _description\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _propertyList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ SequenceType target = (SequenceType) object;\r
+ return target.getProperty();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ SequenceType target = (SequenceType) object;\r
+ target.addProperty( (uk.ac.vamsas.objects.core.Property) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ SequenceType target = (SequenceType) object;\r
+ target.removeAllProperty();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Property();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _propertyList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _mappingList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Mapping.class, "_mappingList", "mapping", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ SequenceType target = (SequenceType) object;\r
+ return target.getMapping();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ SequenceType target = (SequenceType) object;\r
+ target.addMapping( (uk.ac.vamsas.objects.core.Mapping) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ SequenceType target = (SequenceType) object;\r
+ target.removeAllMapping();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Mapping();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _mappingList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.SequenceType.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Tree;\r
+\r
+/**\r
+ * Class TreeDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public TreeDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "Tree";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Tree target = (Tree) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Tree target = (Tree) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _modifiable\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Tree target = (Tree) object;\r
+ return target.getModifiable();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Tree target = (Tree) object;\r
+ target.setModifiable( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _modifiable\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _title\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Tree target = (Tree) object;\r
+ return target.getTitle();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Tree target = (Tree) object;\r
+ target.setTitle( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _title\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _newickList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Newick.class, "_newickList", "newick", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Tree target = (Tree) object;\r
+ return target.getNewick();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Tree target = (Tree) object;\r
+ target.addNewick( (uk.ac.vamsas.objects.core.Newick) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ Tree target = (Tree) object;\r
+ target.removeAllNewick();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Newick();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _newickList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _propertyList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Tree target = (Tree) object;\r
+ return target.getProperty();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Tree target = (Tree) object;\r
+ target.addProperty( (uk.ac.vamsas.objects.core.Property) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ Tree target = (Tree) object;\r
+ target.removeAllProperty();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Property();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _propertyList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _provenance\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Tree target = (Tree) object;\r
+ return target.getProvenance();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Tree target = (Tree) object;\r
+ target.setProvenance( (uk.ac.vamsas.objects.core.Provenance) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Provenance();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _provenance\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.Tree.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.User;\r
+\r
+/**\r
+ * Class UserDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class UserDescriptor extends uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public UserDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "User";\r
+ _elementDefinition = true;\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _fullname\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fullname", "fullname", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ User target = (User) object;\r
+ return target.getFullname();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ User target = (User) object;\r
+ target.setFullname( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _fullname\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _organization\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_organization", "organization", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ User target = (User) object;\r
+ return target.getOrganization();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ User target = (User) object;\r
+ target.setOrganization( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _organization\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ if (_identity == null) {\r
+ return super.getIdentity();\r
+ }\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.User.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.VAMSAS;\r
+\r
+/**\r
+ * Class VAMSASDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class VAMSASDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public VAMSASDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "VAMSAS";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _id\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+ this._identity = desc;\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ VAMSAS target = (VAMSAS) object;\r
+ return target.getId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ VAMSAS target = (VAMSAS) object;\r
+ target.setId( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new java.lang.String();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _id\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _modifiable\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ VAMSAS target = (VAMSAS) object;\r
+ return target.getModifiable();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ VAMSAS target = (VAMSAS) object;\r
+ target.setModifiable( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _modifiable\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ //-- _treeList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Tree.class, "_treeList", "Tree", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ VAMSAS target = (VAMSAS) object;\r
+ return target.getTree();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ VAMSAS target = (VAMSAS) object;\r
+ target.addTree( (uk.ac.vamsas.objects.core.Tree) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ VAMSAS target = (VAMSAS) object;\r
+ target.removeAllTree();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Tree();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _treeList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _dataSetList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.DataSet.class, "_dataSetList", "DataSet", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ VAMSAS target = (VAMSAS) object;\r
+ return target.getDataSet();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ VAMSAS target = (VAMSAS) object;\r
+ target.addDataSet( (uk.ac.vamsas.objects.core.DataSet) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ VAMSAS target = (VAMSAS) object;\r
+ target.removeAllDataSet();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.DataSet();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _dataSetList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.VAMSAS.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.VamsasDocument;\r
+\r
+/**\r
+ * Class VamsasDocumentDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class VamsasDocumentDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _elementDefinition.\r
+ */\r
+ private boolean _elementDefinition;\r
+\r
+ /**\r
+ * Field _nsPrefix.\r
+ */\r
+ private java.lang.String _nsPrefix;\r
+\r
+ /**\r
+ * Field _nsURI.\r
+ */\r
+ private java.lang.String _nsURI;\r
+\r
+ /**\r
+ * Field _xmlName.\r
+ */\r
+ private java.lang.String _xmlName;\r
+\r
+ /**\r
+ * Field _identity.\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public VamsasDocumentDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasDocument";\r
+ _xmlName = "VamsasDocument";\r
+ _elementDefinition = true;\r
+ \r
+ //-- set grouping compositor\r
+ setCompositorAsSequence();\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- initialize element descriptors\r
+ \r
+ //-- _version\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "Version", org.exolab.castor.xml.NodeType.Element);\r
+ desc.setImmutable(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ return target.getVersion();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ target.setVersion( (java.lang.String) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasDocument");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _version\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.StringValidator typeValidator;\r
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ typeValidator.setWhiteSpace("preserve");\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _lockFile\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.LockFile.class, "_lockFile", "LockFile", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ return target.getLockFile();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ target.setLockFile( (uk.ac.vamsas.objects.core.LockFile) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.LockFile();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasDocument");\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _lockFile\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _provenance\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ return target.getProvenance();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ target.setProvenance( (uk.ac.vamsas.objects.core.Provenance) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Provenance();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _provenance\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _VAMSASList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.VAMSAS.class, "_VAMSASList", "VAMSAS", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ return target.getVAMSAS();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ target.addVAMSAS( (uk.ac.vamsas.objects.core.VAMSAS) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ target.removeAllVAMSAS();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.VAMSAS();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _VAMSASList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _applicationDataList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.ApplicationData.class, "_applicationDataList", "ApplicationData", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ return target.getApplicationData();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ target.addApplicationData( (uk.ac.vamsas.objects.core.ApplicationData) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ target.removeAllApplicationData();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.ApplicationData();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _applicationDataList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _attachmentList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Attachment.class, "_attachmentList", "Attachment", org.exolab.castor.xml.NodeType.Element);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ return target.getAttachment();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ target.addAttachment( (uk.ac.vamsas.objects.core.Attachment) value);\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+ try {\r
+ VamsasDocument target = (VamsasDocument) object;\r
+ target.removeAllAttachment();\r
+ } catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance(java.lang.Object parent) {\r
+ return new uk.ac.vamsas.objects.core.Attachment();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _attachmentList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode.\r
+ * \r
+ * @return the access mode specified for this class.\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+ ) {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * Method getIdentity.\r
+ * \r
+ * @return the identity field, null if this class has no\r
+ * identity.\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+ ) {\r
+ return _identity;\r
+ }\r
+\r
+ /**\r
+ * Method getJavaClass.\r
+ * \r
+ * @return the Java class represented by this descriptor.\r
+ */\r
+ public java.lang.Class getJavaClass(\r
+ ) {\r
+ return uk.ac.vamsas.objects.core.VamsasDocument.class;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpacePrefix.\r
+ * \r
+ * @return the namespace prefix to use when marshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpacePrefix(\r
+ ) {\r
+ return _nsPrefix;\r
+ }\r
+\r
+ /**\r
+ * Method getNameSpaceURI.\r
+ * \r
+ * @return the namespace URI used when marshaling and\r
+ * unmarshaling as XML.\r
+ */\r
+ public java.lang.String getNameSpaceURI(\r
+ ) {\r
+ return _nsURI;\r
+ }\r
+\r
+ /**\r
+ * Method getValidator.\r
+ * \r
+ * @return a specific validator for the class described by this\r
+ * ClassDescriptor.\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator(\r
+ ) {\r
+ return this;\r
+ }\r
+\r
+ /**\r
+ * Method getXMLName.\r
+ * \r
+ * @return the XML Name for the Class being described.\r
+ */\r
+ public java.lang.String getXMLName(\r
+ ) {\r
+ return _xmlName;\r
+ }\r
+\r
+ /**\r
+ * Method isElementDefinition.\r
+ * \r
+ * @return true if XML schema definition of this Class is that\r
+ * of a global\r
+ * element or element with anonymous type definition.\r
+ */\r
+ public boolean isElementDefinition(\r
+ ) {\r
+ return _elementDefinition;\r
+ }\r
+\r
+}\r