\r
public void update(MapList vobj) {}\r
\r
- public void update(Mapping vobj) {}\r
+ public void update(SequenceMapping vobj) {}\r
\r
public void update(Newick vobj) {}\r
\r
\r
public void update(MapList vobj);\r
\r
- public void update(Mapping vobj);\r
+ public void update(SequenceMapping vobj);\r
\r
public void update(Newick vobj);\r
\r
private java.util.Vector _sequenceList;
/**
+ * Field _sequenceMappingList.
+ */
+ private java.util.Vector _sequenceMappingList;
+
+ /**
* Field _dataSetAnnotationsList.
*/
private java.util.Vector _dataSetAnnotationsList;
public DataSet() {
super();
this._sequenceList = new java.util.Vector();
+ this._sequenceMappingList = new java.util.Vector();
this._dataSetAnnotationsList = new java.util.Vector();
this._alignmentList = new java.util.Vector();
this._treeList = new java.util.Vector();
/**
*
*
+ * @param vSequenceMapping
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSequenceMapping(
+ final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping)
+ throws java.lang.IndexOutOfBoundsException {
+ this._sequenceMappingList.addElement(vSequenceMapping);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSequenceMapping
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSequenceMapping(
+ final int index,
+ final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping)
+ throws java.lang.IndexOutOfBoundsException {
+ this._sequenceMappingList.add(index, vSequenceMapping);
+ }
+
+ /**
+ *
+ *
* @param vTree
* @throws java.lang.IndexOutOfBoundsException if the index
* given is outside the bounds of the collection
}
/**
+ * Method enumerateSequenceMapping.
+ *
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.SequenceMapping elements
+ */
+ public java.util.Enumeration enumerateSequenceMapping(
+ ) {
+ return this._sequenceMappingList.elements();
+ }
+
+ /**
* Method enumerateTree.
*
* @return an Enumeration over all
}
else if (temp._sequenceList != null)
return false;
+ if (this._sequenceMappingList != null) {
+ if (temp._sequenceMappingList == null) return false;
+ else if (!(this._sequenceMappingList.equals(temp._sequenceMappingList)))
+ return false;
+ }
+ else if (temp._sequenceMappingList != null)
+ return false;
if (this._dataSetAnnotationsList != null) {
if (temp._dataSetAnnotationsList == null) return false;
else if (!(this._dataSetAnnotationsList.equals(temp._dataSetAnnotationsList)))
}
/**
+ * Method getSequenceMapping.
+ *
+ * @param index
+ * @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.SequenceMapping at the given index
+ */
+ public uk.ac.vamsas.objects.core.SequenceMapping getSequenceMapping(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._sequenceMappingList.size()) {
+ throw new IndexOutOfBoundsException("getSequenceMapping: Index value '" + index + "' not in range [0.." + (this._sequenceMappingList.size() - 1) + "]");
+ }
+
+ return (uk.ac.vamsas.objects.core.SequenceMapping) _sequenceMappingList.get(index);
+ }
+
+ /**
+ * Method getSequenceMapping.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.SequenceMapping[] getSequenceMapping(
+ ) {
+ uk.ac.vamsas.objects.core.SequenceMapping[] array = new uk.ac.vamsas.objects.core.SequenceMapping[0];
+ return (uk.ac.vamsas.objects.core.SequenceMapping[]) this._sequenceMappingList.toArray(array);
+ }
+
+ /**
+ * Method getSequenceMappingAsReference.Returns a reference to
+ * '_sequenceMappingList'. No type checking is performed on any
+ * modifications to the Vector.
+ *
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getSequenceMappingAsReference(
+ ) {
+ return this._sequenceMappingList;
+ }
+
+ /**
+ * Method getSequenceMappingCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSequenceMappingCount(
+ ) {
+ return this._sequenceMappingList.size();
+ }
+
+ /**
* Method getTree.
*
* @param index
if (_sequenceList != null) {
result = 37 * result + _sequenceList.hashCode();
}
+ if (_sequenceMappingList != null) {
+ result = 37 * result + _sequenceMappingList.hashCode();
+ }
if (_dataSetAnnotationsList != null) {
result = 37 * result + _dataSetAnnotationsList.hashCode();
}
/**
*/
+ public void removeAllSequenceMapping(
+ ) {
+ this._sequenceMappingList.clear();
+ }
+
+ /**
+ */
public void removeAllTree(
) {
this._treeList.clear();
}
/**
+ * Method removeSequenceMapping.
+ *
+ * @param vSequenceMapping
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSequenceMapping(
+ final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping) {
+ boolean removed = _sequenceMappingList.remove(vSequenceMapping);
+ return removed;
+ }
+
+ /**
+ * Method removeSequenceMappingAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public uk.ac.vamsas.objects.core.SequenceMapping removeSequenceMappingAt(
+ final int index) {
+ java.lang.Object obj = this._sequenceMappingList.remove(index);
+ return (uk.ac.vamsas.objects.core.SequenceMapping) obj;
+ }
+
+ /**
* Method removeTree.
*
* @param vTree
*
*
* @param index
+ * @param vSequenceMapping
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setSequenceMapping(
+ final int index,
+ final uk.ac.vamsas.objects.core.SequenceMapping vSequenceMapping)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._sequenceMappingList.size()) {
+ throw new IndexOutOfBoundsException("setSequenceMapping: Index value '" + index + "' not in range [0.." + (this._sequenceMappingList.size() - 1) + "]");
+ }
+
+ this._sequenceMappingList.set(index, vSequenceMapping);
+ }
+
+ /**
+ *
+ *
+ * @param vSequenceMappingArray
+ */
+ public void setSequenceMapping(
+ final uk.ac.vamsas.objects.core.SequenceMapping[] vSequenceMappingArray) {
+ //-- copy array
+ _sequenceMappingList.clear();
+
+ for (int i = 0; i < vSequenceMappingArray.length; i++) {
+ this._sequenceMappingList.add(vSequenceMappingArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of '_sequenceMappingList' by copying the
+ * given Vector. All elements will be checked for type safety.
+ *
+ * @param vSequenceMappingList the Vector to copy.
+ */
+ public void setSequenceMapping(
+ final java.util.Vector vSequenceMappingList) {
+ // copy vector
+ this._sequenceMappingList.clear();
+
+ this._sequenceMappingList.addAll(vSequenceMappingList);
+ }
+
+ /**
+ * Sets the value of '_sequenceMappingList' by setting it to
+ * the given Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param sequenceMappingVector the Vector to set.
+ */
+ public void setSequenceMappingAsReference(
+ final java.util.Vector sequenceMappingVector) {
+ this._sequenceMappingList = sequenceMappingVector;
+ }
+
+ /**
+ *
+ *
+ * @param index
* @param vTree
* @throws java.lang.IndexOutOfBoundsException if the index
* given is outside the bounds of the collection
--- /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;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+\r
+/**\r
+ * Class Range.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Range extends uk.ac.vamsas.client.Vobject \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _seqAStart.\r
+ */\r
+ private int _seqAStart;\r
+\r
+ /**\r
+ * keeps track of state for field: _seqAStart\r
+ */\r
+ private boolean _has_seqAStart;\r
+\r
+ /**\r
+ * Field _seqAEnd.\r
+ */\r
+ private int _seqAEnd;\r
+\r
+ /**\r
+ * keeps track of state for field: _seqAEnd\r
+ */\r
+ private boolean _has_seqAEnd;\r
+\r
+ /**\r
+ * Field _seqBStart.\r
+ */\r
+ private int _seqBStart;\r
+\r
+ /**\r
+ * keeps track of state for field: _seqBStart\r
+ */\r
+ private boolean _has_seqBStart;\r
+\r
+ /**\r
+ * Field _seqBEnd.\r
+ */\r
+ private int _seqBEnd;\r
+\r
+ /**\r
+ * keeps track of state for field: _seqBEnd\r
+ */\r
+ private boolean _has_seqBEnd;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public Range() {\r
+ super();\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ */\r
+ public void deleteSeqAEnd(\r
+ ) {\r
+ this._has_seqAEnd= false;\r
+ }\r
+\r
+ /**\r
+ */\r
+ public void deleteSeqAStart(\r
+ ) {\r
+ this._has_seqAStart= false;\r
+ }\r
+\r
+ /**\r
+ */\r
+ public void deleteSeqBEnd(\r
+ ) {\r
+ this._has_seqBEnd= false;\r
+ }\r
+\r
+ /**\r
+ */\r
+ public void deleteSeqBStart(\r
+ ) {\r
+ this._has_seqBStart= false;\r
+ }\r
+\r
+ /**\r
+ * Overrides the java.lang.Object.equals method.\r
+ * \r
+ * @param obj\r
+ * @return true if the objects are equal.\r
+ */\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
+ if ( this == obj )\r
+ return true;\r
+ \r
+ if (super.equals(obj)==false)\r
+ return false;\r
+ \r
+ if (obj instanceof Range) {\r
+ \r
+ Range temp = (Range)obj;\r
+ if (this._seqAStart != temp._seqAStart)\r
+ return false;\r
+ if (this._has_seqAStart != temp._has_seqAStart)\r
+ return false;\r
+ if (this._seqAEnd != temp._seqAEnd)\r
+ return false;\r
+ if (this._has_seqAEnd != temp._has_seqAEnd)\r
+ return false;\r
+ if (this._seqBStart != temp._seqBStart)\r
+ return false;\r
+ if (this._has_seqBStart != temp._has_seqBStart)\r
+ return false;\r
+ if (this._seqBEnd != temp._seqBEnd)\r
+ return false;\r
+ if (this._has_seqBEnd != temp._has_seqBEnd)\r
+ return false;\r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'seqAEnd'.\r
+ * \r
+ * @return the value of field 'SeqAEnd'.\r
+ */\r
+ public int getSeqAEnd(\r
+ ) {\r
+ return this._seqAEnd;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'seqAStart'.\r
+ * \r
+ * @return the value of field 'SeqAStart'.\r
+ */\r
+ public int getSeqAStart(\r
+ ) {\r
+ return this._seqAStart;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'seqBEnd'.\r
+ * \r
+ * @return the value of field 'SeqBEnd'.\r
+ */\r
+ public int getSeqBEnd(\r
+ ) {\r
+ return this._seqBEnd;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'seqBStart'.\r
+ * \r
+ * @return the value of field 'SeqBStart'.\r
+ */\r
+ public int getSeqBStart(\r
+ ) {\r
+ return this._seqBStart;\r
+ }\r
+\r
+ /**\r
+ * Method hasSeqAEnd.\r
+ * \r
+ * @return true if at least one SeqAEnd has been added\r
+ */\r
+ public boolean hasSeqAEnd(\r
+ ) {\r
+ return this._has_seqAEnd;\r
+ }\r
+\r
+ /**\r
+ * Method hasSeqAStart.\r
+ * \r
+ * @return true if at least one SeqAStart has been added\r
+ */\r
+ public boolean hasSeqAStart(\r
+ ) {\r
+ return this._has_seqAStart;\r
+ }\r
+\r
+ /**\r
+ * Method hasSeqBEnd.\r
+ * \r
+ * @return true if at least one SeqBEnd has been added\r
+ */\r
+ public boolean hasSeqBEnd(\r
+ ) {\r
+ return this._has_seqBEnd;\r
+ }\r
+\r
+ /**\r
+ * Method hasSeqBStart.\r
+ * \r
+ * @return true if at least one SeqBStart has been added\r
+ */\r
+ public boolean hasSeqBStart(\r
+ ) {\r
+ return this._has_seqBStart;\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
+ result = 37 * result + _seqAStart;\r
+ result = 37 * result + _seqAEnd;\r
+ result = 37 * result + _seqBStart;\r
+ result = 37 * result + _seqBEnd;\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
+ * \r
+ * @return true if this object is valid according to the schema\r
+ */\r
+ public boolean isValid(\r
+ ) {\r
+ try {\r
+ validate();\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
+ return false;\r
+ }\r
+ return true;\r
+ }\r
+\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(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+ Marshaller.marshal(this, out);\r
+ }\r
+\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(\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
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'seqAEnd'.\r
+ * \r
+ * @param seqAEnd the value of field 'seqAEnd'.\r
+ */\r
+ public void setSeqAEnd(\r
+ final int seqAEnd) {\r
+ this._seqAEnd = seqAEnd;\r
+ this._has_seqAEnd = true;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'seqAStart'.\r
+ * \r
+ * @param seqAStart the value of field 'seqAStart'.\r
+ */\r
+ public void setSeqAStart(\r
+ final int seqAStart) {\r
+ this._seqAStart = seqAStart;\r
+ this._has_seqAStart = true;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'seqBEnd'.\r
+ * \r
+ * @param seqBEnd the value of field 'seqBEnd'.\r
+ */\r
+ public void setSeqBEnd(\r
+ final int seqBEnd) {\r
+ this._seqBEnd = seqBEnd;\r
+ this._has_seqBEnd = true;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'seqBStart'.\r
+ * \r
+ * @param seqBStart the value of field 'seqBStart'.\r
+ */\r
+ public void setSeqBStart(\r
+ final int seqBStart) {\r
+ this._seqBStart = seqBStart;\r
+ this._has_seqBStart = true;\r
+ }\r
+\r
+ /**\r
+ * Method unmarshal.\r
+ * \r
+ * @param reader\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.Range\r
+ */\r
+ public static uk.ac.vamsas.objects.core.Range 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.Range) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Range.class, reader);\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
+ )\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
+ }\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;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+\r
+/**\r
+ * Class SequenceMapping.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class SequenceMapping extends uk.ac.vamsas.client.Vobject \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field _sequenceA.\r
+ */\r
+ private java.lang.Object _sequenceA;\r
+\r
+ /**\r
+ * Field _sequenceB.\r
+ */\r
+ private java.lang.Object _sequenceB;\r
+\r
+ /**\r
+ * Field _id.\r
+ */\r
+ private java.lang.String _id;\r
+\r
+ /**\r
+ * Field _rangeList.\r
+ */\r
+ private java.util.Vector _rangeList;\r
+\r
+ /**\r
+ * Field _provenance.\r
+ */\r
+ private uk.ac.vamsas.objects.core.Provenance _provenance;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public SequenceMapping() {\r
+ super();\r
+ this._rangeList = new java.util.Vector();\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param vRange\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addRange(\r
+ final uk.ac.vamsas.objects.core.Range vRange)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._rangeList.addElement(vRange);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param index\r
+ * @param vRange\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addRange(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Range vRange)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._rangeList.add(index, vRange);\r
+ }\r
+\r
+ /**\r
+ * Method enumerateRange.\r
+ * \r
+ * @return an Enumeration over all\r
+ * uk.ac.vamsas.objects.core.Range elements\r
+ */\r
+ public java.util.Enumeration enumerateRange(\r
+ ) {\r
+ return this._rangeList.elements();\r
+ }\r
+\r
+ /**\r
+ * Overrides the java.lang.Object.equals method.\r
+ * \r
+ * @param obj\r
+ * @return true if the objects are equal.\r
+ */\r
+ public boolean equals(\r
+ final java.lang.Object obj) {\r
+ if ( this == obj )\r
+ return true;\r
+ \r
+ if (super.equals(obj)==false)\r
+ return false;\r
+ \r
+ if (obj instanceof SequenceMapping) {\r
+ \r
+ SequenceMapping temp = (SequenceMapping)obj;\r
+ if (this._sequenceA != null) {\r
+ if (temp._sequenceA == null) return false;\r
+ else if (!(this._sequenceA.equals(temp._sequenceA))) \r
+ return false;\r
+ }\r
+ else if (temp._sequenceA != null)\r
+ return false;\r
+ if (this._sequenceB != null) {\r
+ if (temp._sequenceB == null) return false;\r
+ else if (!(this._sequenceB.equals(temp._sequenceB))) \r
+ return false;\r
+ }\r
+ else if (temp._sequenceB != null)\r
+ return false;\r
+ if (this._id != null) {\r
+ if (temp._id == null) return false;\r
+ else if (!(this._id.equals(temp._id))) \r
+ return false;\r
+ }\r
+ else if (temp._id != null)\r
+ return false;\r
+ if (this._rangeList != null) {\r
+ if (temp._rangeList == null) return false;\r
+ else if (!(this._rangeList.equals(temp._rangeList))) \r
+ return false;\r
+ }\r
+ else if (temp._rangeList != null)\r
+ return false;\r
+ if (this._provenance != null) {\r
+ if (temp._provenance == null) return false;\r
+ else if (!(this._provenance.equals(temp._provenance))) \r
+ return false;\r
+ }\r
+ else if (temp._provenance != null)\r
+ return false;\r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'id'.\r
+ * \r
+ * @return the value of field 'Id'.\r
+ */\r
+ public java.lang.String getId(\r
+ ) {\r
+ return this._id;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'provenance'.\r
+ * \r
+ * @return the value of field 'Provenance'.\r
+ */\r
+ public uk.ac.vamsas.objects.core.Provenance getProvenance(\r
+ ) {\r
+ return this._provenance;\r
+ }\r
+\r
+ /**\r
+ * Method getRange.\r
+ * \r
+ * @param index\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.Range at\r
+ * the given index\r
+ */\r
+ public uk.ac.vamsas.objects.core.Range getRange(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._rangeList.size()) {\r
+ throw new IndexOutOfBoundsException("getRange: Index value '" + index + "' not in range [0.." + (this._rangeList.size() - 1) + "]");\r
+ }\r
+ \r
+ return (uk.ac.vamsas.objects.core.Range) _rangeList.get(index);\r
+ }\r
+\r
+ /**\r
+ * Method getRange.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 this collection as an Array\r
+ */\r
+ public uk.ac.vamsas.objects.core.Range[] getRange(\r
+ ) {\r
+ uk.ac.vamsas.objects.core.Range[] array = new uk.ac.vamsas.objects.core.Range[0];\r
+ return (uk.ac.vamsas.objects.core.Range[]) this._rangeList.toArray(array);\r
+ }\r
+\r
+ /**\r
+ * Method getRangeAsReference.Returns a reference to\r
+ * '_rangeList'. 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 getRangeAsReference(\r
+ ) {\r
+ return this._rangeList;\r
+ }\r
+\r
+ /**\r
+ * Method getRangeCount.\r
+ * \r
+ * @return the size of this collection\r
+ */\r
+ public int getRangeCount(\r
+ ) {\r
+ return this._rangeList.size();\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'sequenceA'.\r
+ * \r
+ * @return the value of field 'SequenceA'.\r
+ */\r
+ public java.lang.Object getSequenceA(\r
+ ) {\r
+ return this._sequenceA;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'sequenceB'.\r
+ * \r
+ * @return the value of field 'SequenceB'.\r
+ */\r
+ public java.lang.Object getSequenceB(\r
+ ) {\r
+ return this._sequenceB;\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 (_sequenceA != null) {\r
+ result = 37 * result + _sequenceA.hashCode();\r
+ }\r
+ if (_sequenceB != null) {\r
+ result = 37 * result + _sequenceB.hashCode();\r
+ }\r
+ if (_id != null) {\r
+ result = 37 * result + _id.hashCode();\r
+ }\r
+ if (_rangeList != null) {\r
+ result = 37 * result + _rangeList.hashCode();\r
+ }\r
+ if (_provenance != null) {\r
+ result = 37 * result + _provenance.hashCode();\r
+ }\r
+ \r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
+ * \r
+ * @return true if this object is valid according to the schema\r
+ */\r
+ public boolean isValid(\r
+ ) {\r
+ try {\r
+ validate();\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
+ return false;\r
+ }\r
+ return true;\r
+ }\r
+\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(\r
+ final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+ Marshaller.marshal(this, out);\r
+ }\r
+\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(\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
+ }\r
+\r
+ /**\r
+ */\r
+ public void removeAllRange(\r
+ ) {\r
+ this._rangeList.clear();\r
+ }\r
+\r
+ /**\r
+ * Method removeRange.\r
+ * \r
+ * @param vRange\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeRange(\r
+ final uk.ac.vamsas.objects.core.Range vRange) {\r
+ boolean removed = _rangeList.remove(vRange);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removeRangeAt.\r
+ * \r
+ * @param index\r
+ * @return the element removed from the collection\r
+ */\r
+ public uk.ac.vamsas.objects.core.Range removeRangeAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._rangeList.remove(index);\r
+ return (uk.ac.vamsas.objects.core.Range) obj;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'id'.\r
+ * \r
+ * @param id the value of field 'id'.\r
+ */\r
+ public void setId(\r
+ final java.lang.String id) {\r
+ this._id = id;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'provenance'.\r
+ * \r
+ * @param provenance the value of field 'provenance'.\r
+ */\r
+ public void setProvenance(\r
+ final uk.ac.vamsas.objects.core.Provenance provenance) {\r
+ this._provenance = provenance;\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param index\r
+ * @param vRange\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void setRange(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Range vRange)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._rangeList.size()) {\r
+ throw new IndexOutOfBoundsException("setRange: Index value '" + index + "' not in range [0.." + (this._rangeList.size() - 1) + "]");\r
+ }\r
+ \r
+ this._rangeList.set(index, vRange);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param vRangeArray\r
+ */\r
+ public void setRange(\r
+ final uk.ac.vamsas.objects.core.Range[] vRangeArray) {\r
+ //-- copy array\r
+ _rangeList.clear();\r
+ \r
+ for (int i = 0; i < vRangeArray.length; i++) {\r
+ this._rangeList.add(vRangeArray[i]);\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_rangeList' by copying the given Vector.\r
+ * All elements will be checked for type safety.\r
+ * \r
+ * @param vRangeList the Vector to copy.\r
+ */\r
+ public void setRange(\r
+ final java.util.Vector vRangeList) {\r
+ // copy vector\r
+ this._rangeList.clear();\r
+ \r
+ this._rangeList.addAll(vRangeList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_rangeList' by setting it to the given\r
+ * Vector. No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param rangeVector the Vector to set.\r
+ */\r
+ public void setRangeAsReference(\r
+ final java.util.Vector rangeVector) {\r
+ this._rangeList = rangeVector;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'sequenceA'.\r
+ * \r
+ * @param sequenceA the value of field 'sequenceA'.\r
+ */\r
+ public void setSequenceA(\r
+ final java.lang.Object sequenceA) {\r
+ this._sequenceA = sequenceA;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'sequenceB'.\r
+ * \r
+ * @param sequenceB the value of field 'sequenceB'.\r
+ */\r
+ public void setSequenceB(\r
+ final java.lang.Object sequenceB) {\r
+ this._sequenceB = sequenceB;\r
+ }\r
+\r
+ /**\r
+ * Method unmarshal.\r
+ * \r
+ * @param reader\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\r
+ * uk.ac.vamsas.objects.core.SequenceMapping\r
+ */\r
+ public static uk.ac.vamsas.objects.core.SequenceMapping 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.SequenceMapping) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.SequenceMapping.class, reader);\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
+ )\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
+ }\r
+\r
+}\r
*/
private java.util.Vector _propertyList;
- /**
- * Field _mappingList.
- */
- private java.util.Vector _mappingList;
-
//----------------/
//- Constructors -/
public SequenceType() {
super();
this._propertyList = new java.util.Vector();
- this._mappingList = new java.util.Vector();
}
/**
*
*
- * @param vMapping
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addMapping(
- final uk.ac.vamsas.objects.core.Mapping vMapping)
- throws java.lang.IndexOutOfBoundsException {
- this._mappingList.addElement(vMapping);
- }
-
- /**
- *
- *
- * @param index
- * @param vMapping
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- */
- public void addMapping(
- final int index,
- final uk.ac.vamsas.objects.core.Mapping vMapping)
- throws java.lang.IndexOutOfBoundsException {
- this._mappingList.add(index, vMapping);
- }
-
- /**
- *
- *
* @param vProperty
* @throws java.lang.IndexOutOfBoundsException if the index
* given is outside the bounds of the collection
}
/**
- * Method enumerateMapping.
- *
- * @return an Enumeration over all
- * uk.ac.vamsas.objects.core.Mapping elements
- */
- public java.util.Enumeration enumerateMapping(
- ) {
- return this._mappingList.elements();
- }
-
- /**
* Method enumerateProperty.
*
* @return an Enumeration over all
}
else if (temp._propertyList != null)
return false;
- if (this._mappingList != null) {
- if (temp._mappingList == null) return false;
- else if (!(this._mappingList.equals(temp._mappingList)))
- return false;
- }
- else if (temp._mappingList != null)
- return false;
return true;
}
return false;
}
/**
- * Method getMapping.
- *
- * @param index
- * @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.get(index);
- }
-
- /**
- * 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 this collection as an Array
- */
- 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 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 the size of this collection
- */
- public int getMappingCount(
- ) {
- return this._mappingList.size();
- }
-
- /**
* Returns the value of field 'name'.
*
* @return the value of field 'Name'.
if (_propertyList != null) {
result = 37 * result + _propertyList.hashCode();
}
- if (_mappingList != null) {
- result = 37 * result + _mappingList.hashCode();
- }
return result;
}
/**
*/
- public void removeAllMapping(
- ) {
- this._mappingList.clear();
- }
-
- /**
- */
public void removeAllProperty(
) {
this._propertyList.clear();
}
/**
- * 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 the element removed from the collection
- */
- 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;
- }
-
- /**
* Method removeProperty.
*
* @param vProperty
}
/**
- *
- *
- * @param index
- * @param vMapping
- * @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) + "]");
- }
-
- this._mappingList.set(index, vMapping);
- }
-
- /**
- *
- *
- * @param vMappingArray
- */
- public void setMapping(
- final uk.ac.vamsas.objects.core.Mapping[] vMappingArray) {
- //-- copy array
- _mappingList.clear();
-
- for (int i = 0; i < vMappingArray.length; i++) {
- this._mappingList.add(vMappingArray[i]);
- }
- }
-
- /**
- * 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'.
{ //-- local scope\r
}\r
desc.setValidator(fieldValidator);\r
+ //-- _sequenceMappingList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.SequenceMapping.class, "_sequenceMappingList", "sequenceMapping", 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.getSequenceMapping();\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.addSequenceMapping( (uk.ac.vamsas.objects.core.SequenceMapping) 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.removeAllSequenceMapping();\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.SequenceMapping();\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: _sequenceMappingList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\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
--- /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.Range;\r
+\r
+/**\r
+ * Class RangeDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class RangeDescriptor 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 RangeDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "range";\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
+ //-- _seqAStart\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_seqAStart", "seqAStart", 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
+ Range target = (Range) object;\r
+ if (!target.hasSeqAStart()) { return null; }\r
+ return new java.lang.Integer(target.getSeqAStart());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Range target = (Range) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteSeqAStart();\r
+ return;\r
+ }\r
+ target.setSeqAStart( ((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.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _seqAStart\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\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
+ //-- _seqAEnd\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_seqAEnd", "seqAEnd", 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
+ Range target = (Range) object;\r
+ if (!target.hasSeqAEnd()) { return null; }\r
+ return new java.lang.Integer(target.getSeqAEnd());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Range target = (Range) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteSeqAEnd();\r
+ return;\r
+ }\r
+ target.setSeqAEnd( ((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.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _seqAEnd\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\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
+ //-- _seqBStart\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_seqBStart", "seqBStart", 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
+ Range target = (Range) object;\r
+ if (!target.hasSeqBStart()) { return null; }\r
+ return new java.lang.Integer(target.getSeqBStart());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Range target = (Range) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteSeqBStart();\r
+ return;\r
+ }\r
+ target.setSeqBStart( ((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.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _seqBStart\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\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
+ //-- _seqBEnd\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_seqBEnd", "seqBEnd", 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
+ Range target = (Range) object;\r
+ if (!target.hasSeqBEnd()) { return null; }\r
+ return new java.lang.Integer(target.getSeqBEnd());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Range target = (Range) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteSeqBEnd();\r
+ return;\r
+ }\r
+ target.setSeqBEnd( ((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.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _seqBEnd\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\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.Range.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.SequenceMapping;\r
+\r
+/**\r
+ * Class SequenceMappingDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class SequenceMappingDescriptor 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 SequenceMappingDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "sequenceMapping";\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
+ //-- _sequenceA\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_sequenceA", "sequenceA", 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
+ SequenceMapping target = (SequenceMapping) object;\r
+ return target.getSequenceA();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ SequenceMapping target = (SequenceMapping) object;\r
+ target.setSequenceA( (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: _sequenceA\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
+ //-- _sequenceB\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_sequenceB", "sequenceB", 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
+ SequenceMapping target = (SequenceMapping) object;\r
+ return target.getSequenceB();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ SequenceMapping target = (SequenceMapping) object;\r
+ target.setSequenceB( (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: _sequenceB\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
+ SequenceMapping target = (SequenceMapping) 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
+ SequenceMapping target = (SequenceMapping) 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
+ //-- _rangeList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Range.class, "_rangeList", "range", 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
+ SequenceMapping target = (SequenceMapping) object;\r
+ return target.getRange();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ SequenceMapping target = (SequenceMapping) object;\r
+ target.addRange( (uk.ac.vamsas.objects.core.Range) 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
+ SequenceMapping target = (SequenceMapping) object;\r
+ target.removeAllRange();\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.Range();\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: _rangeList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\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
+ SequenceMapping target = (SequenceMapping) 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
+ SequenceMapping target = (SequenceMapping) 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.SequenceMapping.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
{ //-- 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