</xs:simpleContent>
</xs:complexType>
</xs:element>
+ <xs:element name="treenode" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>
+ node identity and mapping data between tree representations and vamsas document objects
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="vamsas:nodeType">
+ <xs:attribute name="treeId" type="xs:IDREFS">
+ <xs:annotation>
+ <xs:documentation>
+ reference to one or more trees containing the node being described.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="nodespec" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ String uniquely identifying a particular node in the referenced tree according to the format of the tree representation that is referenced.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
<xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="vamsas:Provenance"/>
</xs:sequence>
<xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
</xs:complexType>
</xs:element>
+ <xs:complexType name="referenceType">
+ <xs:annotation>
+ <xs:documentation>
+ base type for citing arbitrary links between vamsas objects
+ </xs:documentation>
+ </xs:annotation>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Optional human readable description of the relationship
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="id" type="xs:ID" use="optional">
+ <xs:annotation>
+ <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="refs" type="xs:IDREFS">
+ <xs:annotation>
+ <xs:documentation>List of one or more vamsas object references</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="nodeType">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>Short name for this node</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation>Descriptive text for this node</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vref" type="vamsas:referenceType" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Direct associations between this node and any vamsas objects</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:ID" use="optional">
+ <xs:annotation>
+ <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
+ </xs:complexType>
<xs:element name="property">
<xs:complexType>
<xs:simpleContent>
<xs:complexContent>
<xs:extension base="vamsas:rangeType">
<xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="objRef" type="xs:IDREF" use="optional">
+ <xs:attribute name="objRef" type="xs:IDREFS" use="optional">
<xs:annotation>
<xs:documentation> Reference Frame for rangeType specfication
</xs:documentation>
<xs:documentation> Did what </xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="Date" type="xs:date">
+ <xs:element name="Date" type="xs:dateTime">
<xs:annotation>
- <xs:documentation> When </xs:documentation>
+ <xs:documentation> When</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
</xs:attribute>
</xs:complexType>
</xs:element>
+ <xs:element name="vxref" type="vamsas:referenceType" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>
+ explicitly named cross reference to other objects in the document.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="optional">
<xs:annotation>
<xs:sequence>
<xs:element ref="vamsas:Provenance"/>
</xs:sequence>
- <xs:attribute name="seqRef" type="xs:IDREF" use="required">
+ <xs:attribute name="seqRef" type="xs:IDREFS" use="required">
<xs:annotation>
<xs:documentation> annotation is associated with a
particular dataset sequence </xs:documentation>
graph </xs:documentation>
</xs:annotation>
</xs:attribute>
+ <xs:attribute name="seqrefs" type="xs:IDREFS" use="optional">
+ <xs:annotation>
+ <xs:documentation> annotation is associated with a
+ range on a particular group of alignment sequences</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
</xs:extension>
</xs:complexContent>
</xs:complexType>
-#Fri May 18 12:13:56 BST 2007\r
+#Tue May 22 14:53:59 BST 2007\r
+uk.ac.vamsas.objects.core.Vref=uk.ac.vamsas.objects.core.descriptors.VrefDescriptor\r
+uk.ac.vamsas.objects.core.ReferenceType=uk.ac.vamsas.objects.core.descriptors.ReferenceTypeDescriptor\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.Treenode=uk.ac.vamsas.objects.core.descriptors.TreenodeDescriptor\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.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.Vxref=uk.ac.vamsas.objects.core.descriptors.VxrefDescriptor\r
+uk.ac.vamsas.objects.core.NodeType=uk.ac.vamsas.objects.core.descriptors.NodeTypeDescriptor\r
uk.ac.vamsas.objects.core.SequenceMapping=uk.ac.vamsas.objects.core.descriptors.SequenceMappingDescriptor\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.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.Docxrefs=uk.ac.vamsas.objects.core.descriptors.DocxrefsDescriptor\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.DataSetAnnotations=uk.ac.vamsas.objects.core.descriptors.DataSetAnnotationsDescriptor\r
+uk.ac.vamsas.objects.core.Score=uk.ac.vamsas.objects.core.descriptors.ScoreDescriptor\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
private boolean _has_graph;\r
\r
/**\r
+ * annotation is associated with a\r
+ * range on a particular group of alignment sequences\r
+ */\r
+ private java.util.Vector _seqrefs;\r
+\r
+ /**\r
* Field _provenance.\r
*/\r
private uk.ac.vamsas.objects.core.Provenance _provenance;\r
\r
public AlignmentAnnotation() {\r
super();\r
+ this._seqrefs = new java.util.Vector();\r
}\r
\r
\r
//-----------/\r
\r
/**\r
+ * \r
+ * \r
+ * @param vSeqrefs\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addSeqrefs(\r
+ final java.lang.Object vSeqrefs)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._seqrefs.addElement(vSeqrefs);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param index\r
+ * @param vSeqrefs\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addSeqrefs(\r
+ final int index,\r
+ final java.lang.Object vSeqrefs)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._seqrefs.add(index, vSeqrefs);\r
+ }\r
+\r
+ /**\r
*/\r
public void deleteGraph(\r
) {\r
}\r
\r
/**\r
+ * Method enumerateSeqrefs.\r
+ * \r
+ * @return an Enumeration over all java.lang.Object elements\r
+ */\r
+ public java.util.Enumeration enumerateSeqrefs(\r
+ ) {\r
+ return this._seqrefs.elements();\r
+ }\r
+\r
+ /**\r
* Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
return false;\r
if (this._has_graph != temp._has_graph)\r
return false;\r
+ if (this._seqrefs != null) {\r
+ if (temp._seqrefs == null) return false;\r
+ else if (!(this._seqrefs.equals(temp._seqrefs))) \r
+ return false;\r
+ }\r
+ else if (temp._seqrefs != 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
}\r
\r
/**\r
+ * Method getSeqrefs.\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 java.lang.Object at the given index\r
+ */\r
+ public java.lang.Object getSeqrefs(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._seqrefs.size()) {\r
+ throw new IndexOutOfBoundsException("getSeqrefs: Index value '" + index + "' not in range [0.." + (this._seqrefs.size() - 1) + "]");\r
+ }\r
+ \r
+ return _seqrefs.get(index);\r
+ }\r
+\r
+ /**\r
+ * Method getSeqrefs.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 this collection as an Array\r
+ */\r
+ public java.lang.Object[] getSeqrefs(\r
+ ) {\r
+ java.lang.Object[] array = new java.lang.Object[0];\r
+ return (java.lang.Object[]) this._seqrefs.toArray(array);\r
+ }\r
+\r
+ /**\r
+ * Method getSeqrefsAsReference.Returns a reference to\r
+ * '_seqrefs'. 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 getSeqrefsAsReference(\r
+ ) {\r
+ return this._seqrefs;\r
+ }\r
+\r
+ /**\r
+ * Method getSeqrefsCount.\r
+ * \r
+ * @return the size of this collection\r
+ */\r
+ public int getSeqrefsCount(\r
+ ) {\r
+ return this._seqrefs.size();\r
+ }\r
+\r
+ /**\r
* Method hasGraph.\r
* \r
* @return true if at least one Graph has been added\r
\r
long tmp;\r
result = 37 * result + (_graph?0:1);\r
+ if (_seqrefs != null) {\r
+ result = 37 * result + _seqrefs.hashCode();\r
+ }\r
if (_provenance != null) {\r
result = 37 * result + _provenance.hashCode();\r
}\r
}\r
\r
/**\r
+ */\r
+ public void removeAllSeqrefs(\r
+ ) {\r
+ this._seqrefs.clear();\r
+ }\r
+\r
+ /**\r
+ * Method removeSeqrefs.\r
+ * \r
+ * @param vSeqrefs\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeSeqrefs(\r
+ final java.lang.Object vSeqrefs) {\r
+ boolean removed = _seqrefs.remove(vSeqrefs);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removeSeqrefsAt.\r
+ * \r
+ * @param index\r
+ * @return the element removed from the collection\r
+ */\r
+ public java.lang.Object removeSeqrefsAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._seqrefs.remove(index);\r
+ return obj;\r
+ }\r
+\r
+ /**\r
* Sets the value of field 'graph'. The field 'graph' has the\r
* following description: TODO: decide if this flag is\r
* redundant - when true it would suggest that\r
}\r
\r
/**\r
+ * \r
+ * \r
+ * @param index\r
+ * @param vSeqrefs\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void setSeqrefs(\r
+ final int index,\r
+ final java.lang.Object vSeqrefs)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._seqrefs.size()) {\r
+ throw new IndexOutOfBoundsException("setSeqrefs: Index value '" + index + "' not in range [0.." + (this._seqrefs.size() - 1) + "]");\r
+ }\r
+ \r
+ this._seqrefs.set(index, vSeqrefs);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param vSeqrefsArray\r
+ */\r
+ public void setSeqrefs(\r
+ final java.lang.Object[] vSeqrefsArray) {\r
+ //-- copy array\r
+ _seqrefs.clear();\r
+ \r
+ for (int i = 0; i < vSeqrefsArray.length; i++) {\r
+ this._seqrefs.add(vSeqrefsArray[i]);\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_seqrefs' by copying the given Vector.\r
+ * All elements will be checked for type safety.\r
+ * \r
+ * @param vSeqrefsList the Vector to copy.\r
+ */\r
+ public void setSeqrefs(\r
+ final java.util.Vector vSeqrefsList) {\r
+ // copy vector\r
+ this._seqrefs.clear();\r
+ \r
+ this._seqrefs.addAll(vSeqrefsList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_seqrefs' by setting it to the given\r
+ * Vector. No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param seqrefsVector the Vector to set.\r
+ */\r
+ public void setSeqrefsAsReference(\r
+ final java.util.Vector seqrefsVector) {\r
+ this._seqrefs = seqrefsVector;\r
+ }\r
+\r
+ /**\r
* Method unmarshal.\r
* \r
* @param reader\r
* annotation is associated with a
* particular dataset sequence
*/
- private java.lang.Object _seqRef;
+ private java.util.Vector _seqRef;
/**
* Field _provenance.
public DataSetAnnotations() {
super();
+ this._seqRef = new java.util.Vector();
}
//-----------/
/**
+ *
+ *
+ * @param vSeqRef
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSeqRef(
+ final java.lang.Object vSeqRef)
+ throws java.lang.IndexOutOfBoundsException {
+ this._seqRef.addElement(vSeqRef);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vSeqRef
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addSeqRef(
+ final int index,
+ final java.lang.Object vSeqRef)
+ throws java.lang.IndexOutOfBoundsException {
+ this._seqRef.add(index, vSeqRef);
+ }
+
+ /**
+ * Method enumerateSeqRef.
+ *
+ * @return an Enumeration over all java.lang.Object elements
+ */
+ public java.util.Enumeration enumerateSeqRef(
+ ) {
+ return this._seqRef.elements();
+ }
+
+ /**
* Overrides the java.lang.Object.equals method.
*
* @param obj
}
/**
- * Returns the value of field 'seqRef'. The field 'seqRef' has
- * the following description: annotation is associated with a
- * particular dataset sequence
+ * Method getSeqRef.
*
- * @return the value of field 'SeqRef'.
+ * @param index
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ * @return the value of the java.lang.Object at the given index
*/
public java.lang.Object getSeqRef(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._seqRef.size()) {
+ throw new IndexOutOfBoundsException("getSeqRef: Index value '" + index + "' not in range [0.." + (this._seqRef.size() - 1) + "]");
+ }
+
+ return _seqRef.get(index);
+ }
+
+ /**
+ * Method getSeqRef.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 java.lang.Object[] getSeqRef(
+ ) {
+ java.lang.Object[] array = new java.lang.Object[0];
+ return (java.lang.Object[]) this._seqRef.toArray(array);
+ }
+
+ /**
+ * Method getSeqRefAsReference.Returns a reference to
+ * '_seqRef'. No type checking is performed on any
+ * modifications to the Vector.
+ *
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getSeqRefAsReference(
) {
return this._seqRef;
}
/**
+ * Method getSeqRefCount.
+ *
+ * @return the size of this collection
+ */
+ public int getSeqRefCount(
+ ) {
+ return this._seqRef.size();
+ }
+
+ /**
* Overrides the java.lang.Object.hashCode method.
* <p>
* The following steps came from <b>Effective Java Programming
}
/**
+ */
+ public void removeAllSeqRef(
+ ) {
+ this._seqRef.clear();
+ }
+
+ /**
+ * Method removeSeqRef.
+ *
+ * @param vSeqRef
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeSeqRef(
+ final java.lang.Object vSeqRef) {
+ boolean removed = _seqRef.remove(vSeqRef);
+ return removed;
+ }
+
+ /**
+ * Method removeSeqRefAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public java.lang.Object removeSeqRefAt(
+ final int index) {
+ java.lang.Object obj = this._seqRef.remove(index);
+ return obj;
+ }
+
+ /**
* Sets the value of field 'provenance'.
*
* @param provenance the value of field 'provenance'.
}
/**
- * Sets the value of field 'seqRef'. The field 'seqRef' has the
- * following description: annotation is associated with a
- * particular dataset sequence
*
- * @param seqRef the value of field 'seqRef'.
+ *
+ * @param index
+ * @param vSeqRef
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
*/
public void setSeqRef(
- final java.lang.Object seqRef) {
- this._seqRef = seqRef;
+ final int index,
+ final java.lang.Object vSeqRef)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._seqRef.size()) {
+ throw new IndexOutOfBoundsException("setSeqRef: Index value '" + index + "' not in range [0.." + (this._seqRef.size() - 1) + "]");
+ }
+
+ this._seqRef.set(index, vSeqRef);
+ }
+
+ /**
+ *
+ *
+ * @param vSeqRefArray
+ */
+ public void setSeqRef(
+ final java.lang.Object[] vSeqRefArray) {
+ //-- copy array
+ _seqRef.clear();
+
+ for (int i = 0; i < vSeqRefArray.length; i++) {
+ this._seqRef.add(vSeqRefArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of '_seqRef' by copying the given Vector. All
+ * elements will be checked for type safety.
+ *
+ * @param vSeqRefList the Vector to copy.
+ */
+ public void setSeqRef(
+ final java.util.Vector vSeqRefList) {
+ // copy vector
+ this._seqRef.clear();
+
+ this._seqRef.addAll(vSeqRefList);
+ }
+
+ /**
+ * Sets the value of '_seqRef' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param seqRefVector the Vector to set.
+ */
+ public void setSeqRefAsReference(
+ final java.util.Vector seqRefVector) {
+ this._seqRef = seqRefVector;
}
/**
private java.lang.String _action;
/**
- * When : TODO: change to dateTime for release
+ * When
*/
- private org.exolab.castor.types.Date _date;
+ private java.util.Date _date;
/**
* additional information
/**
* Returns the value of field 'date'. The field 'date' has the
- * following description: When : TODO: change to dateTime for
- * release
+ * following description: When
*
* @return the value of field 'Date'.
*/
- public org.exolab.castor.types.Date getDate(
+ public java.util.Date getDate(
) {
return this._date;
}
/**
* Sets the value of field 'date'. The field 'date' has the
- * following description: When : TODO: change to dateTime for
- * release
+ * following description: When
*
* @param date the value of field 'date'.
*/
public void setDate(
- final org.exolab.castor.types.Date date) {
+ final java.util.Date date) {
this._date = date;
}
* Reference Frame for rangeType specfication\r
* \r
*/\r
- private java.lang.Object _objRef;\r
+ private java.util.Vector _objRef;\r
\r
\r
//----------------/\r
\r
public Input() {\r
super();\r
+ this._objRef = new java.util.Vector();\r
}\r
\r
\r
//-----------/\r
\r
/**\r
+ * \r
+ * \r
+ * @param vObjRef\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addObjRef(\r
+ final java.lang.Object vObjRef)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._objRef.addElement(vObjRef);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param index\r
+ * @param vObjRef\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addObjRef(\r
+ final int index,\r
+ final java.lang.Object vObjRef)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._objRef.add(index, vObjRef);\r
+ }\r
+\r
+ /**\r
+ * Method enumerateObjRef.\r
+ * \r
+ * @return an Enumeration over all java.lang.Object elements\r
+ */\r
+ public java.util.Enumeration enumerateObjRef(\r
+ ) {\r
+ return this._objRef.elements();\r
+ }\r
+\r
+ /**\r
* Overrides the java.lang.Object.equals method.\r
* \r
* @param obj\r
}\r
\r
/**\r
- * Returns the value of field 'objRef'. The field 'objRef' has\r
- * the following description: Reference Frame for rangeType\r
- * specfication\r
- * \r
+ * Method getObjRef.\r
* \r
- * @return the value of field 'ObjRef'.\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 java.lang.Object at the given index\r
*/\r
public java.lang.Object getObjRef(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._objRef.size()) {\r
+ throw new IndexOutOfBoundsException("getObjRef: Index value '" + index + "' not in range [0.." + (this._objRef.size() - 1) + "]");\r
+ }\r
+ \r
+ return _objRef.get(index);\r
+ }\r
+\r
+ /**\r
+ * Method getObjRef.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 this collection as an Array\r
+ */\r
+ public java.lang.Object[] getObjRef(\r
+ ) {\r
+ java.lang.Object[] array = new java.lang.Object[0];\r
+ return (java.lang.Object[]) this._objRef.toArray(array);\r
+ }\r
+\r
+ /**\r
+ * Method getObjRefAsReference.Returns a reference to\r
+ * '_objRef'. 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 getObjRefAsReference(\r
) {\r
return this._objRef;\r
}\r
\r
/**\r
+ * Method getObjRefCount.\r
+ * \r
+ * @return the size of this collection\r
+ */\r
+ public int getObjRefCount(\r
+ ) {\r
+ return this._objRef.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
}\r
\r
/**\r
+ */\r
+ public void removeAllObjRef(\r
+ ) {\r
+ this._objRef.clear();\r
+ }\r
+\r
+ /**\r
+ * Method removeObjRef.\r
+ * \r
+ * @param vObjRef\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeObjRef(\r
+ final java.lang.Object vObjRef) {\r
+ boolean removed = _objRef.remove(vObjRef);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removeObjRefAt.\r
+ * \r
+ * @param index\r
+ * @return the element removed from the collection\r
+ */\r
+ public java.lang.Object removeObjRefAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._objRef.remove(index);\r
+ return obj;\r
+ }\r
+\r
+ /**\r
* Sets the value of field 'name'.\r
* \r
* @param name the value of field 'name'.\r
}\r
\r
/**\r
- * Sets the value of field 'objRef'. The field 'objRef' has the\r
- * following description: Reference Frame for rangeType\r
- * specfication\r
- * \r
* \r
- * @param objRef the value of field 'objRef'.\r
+ * \r
+ * @param index\r
+ * @param vObjRef\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
*/\r
public void setObjRef(\r
- final java.lang.Object objRef) {\r
- this._objRef = objRef;\r
+ final int index,\r
+ final java.lang.Object vObjRef)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._objRef.size()) {\r
+ throw new IndexOutOfBoundsException("setObjRef: Index value '" + index + "' not in range [0.." + (this._objRef.size() - 1) + "]");\r
+ }\r
+ \r
+ this._objRef.set(index, vObjRef);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param vObjRefArray\r
+ */\r
+ public void setObjRef(\r
+ final java.lang.Object[] vObjRefArray) {\r
+ //-- copy array\r
+ _objRef.clear();\r
+ \r
+ for (int i = 0; i < vObjRefArray.length; i++) {\r
+ this._objRef.add(vObjRefArray[i]);\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_objRef' by copying the given Vector. All\r
+ * elements will be checked for type safety.\r
+ * \r
+ * @param vObjRefList the Vector to copy.\r
+ */\r
+ public void setObjRef(\r
+ final java.util.Vector vObjRefList) {\r
+ // copy vector\r
+ this._objRef.clear();\r
+ \r
+ this._objRef.addAll(vObjRefList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_objRef' by setting it to the given\r
+ * Vector. No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param objRefVector the Vector to set.\r
+ */\r
+ public void setObjRefAsReference(\r
+ final java.util.Vector objRefVector) {\r
+ this._objRef = objRefVector;\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 NodeType.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class NodeType extends uk.ac.vamsas.client.Vobject \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Primary Key for vamsas object referencing \r
+ */\r
+ private java.lang.String _id;\r
+\r
+ /**\r
+ * Field _modifiable.\r
+ */\r
+ private java.lang.String _modifiable;\r
+\r
+ /**\r
+ * Short name for this node\r
+ */\r
+ private java.lang.String _name;\r
+\r
+ /**\r
+ * Descriptive text for this node\r
+ */\r
+ private java.lang.String _description;\r
+\r
+ /**\r
+ * Direct associations between this node and any vamsas objects\r
+ */\r
+ private java.util.Vector _vrefList;\r
+\r
+ /**\r
+ * Field _propertyList.\r
+ */\r
+ private java.util.Vector _propertyList;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public NodeType() {\r
+ super();\r
+ this._vrefList = new java.util.Vector();\r
+ this._propertyList = new java.util.Vector();\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\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(\r
+ final uk.ac.vamsas.objects.core.Property vProperty)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._propertyList.addElement(vProperty);\r
+ }\r
+\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(\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
+ * \r
+ * \r
+ * @param vVref\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addVref(\r
+ final uk.ac.vamsas.objects.core.Vref vVref)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._vrefList.addElement(vVref);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param index\r
+ * @param vVref\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addVref(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Vref vVref)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._vrefList.add(index, vVref);\r
+ }\r
+\r
+ /**\r
+ * Method enumerateProperty.\r
+ * \r
+ * @return an Enumeration over all\r
+ * uk.ac.vamsas.objects.core.Property elements\r
+ */\r
+ public java.util.Enumeration enumerateProperty(\r
+ ) {\r
+ return this._propertyList.elements();\r
+ }\r
+\r
+ /**\r
+ * Method enumerateVref.\r
+ * \r
+ * @return an Enumeration over all\r
+ * uk.ac.vamsas.objects.core.Vref elements\r
+ */\r
+ public java.util.Enumeration enumerateVref(\r
+ ) {\r
+ return this._vrefList.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 NodeType) {\r
+ \r
+ NodeType temp = (NodeType)obj;\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._modifiable != null) {\r
+ if (temp._modifiable == null) return false;\r
+ else if (!(this._modifiable.equals(temp._modifiable))) \r
+ return false;\r
+ }\r
+ else if (temp._modifiable != null)\r
+ return false;\r
+ if (this._name != null) {\r
+ if (temp._name == null) return false;\r
+ else if (!(this._name.equals(temp._name))) \r
+ return false;\r
+ }\r
+ else if (temp._name != null)\r
+ return false;\r
+ if (this._description != null) {\r
+ if (temp._description == null) return false;\r
+ else if (!(this._description.equals(temp._description))) \r
+ return false;\r
+ }\r
+ else if (temp._description != null)\r
+ return false;\r
+ if (this._vrefList != null) {\r
+ if (temp._vrefList == null) return false;\r
+ else if (!(this._vrefList.equals(temp._vrefList))) \r
+ return false;\r
+ }\r
+ else if (temp._vrefList != null)\r
+ return false;\r
+ if (this._propertyList != null) {\r
+ if (temp._propertyList == null) return false;\r
+ else if (!(this._propertyList.equals(temp._propertyList))) \r
+ return false;\r
+ }\r
+ else if (temp._propertyList != null)\r
+ return false;\r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'description'. The field\r
+ * 'description' has the following description: Descriptive\r
+ * text for this node\r
+ * \r
+ * @return the value of field 'Description'.\r
+ */\r
+ public java.lang.String getDescription(\r
+ ) {\r
+ return this._description;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'id'. The field 'id' has the\r
+ * following description: Primary Key for vamsas object\r
+ * referencing \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 'modifiable'.\r
+ * \r
+ * @return the value of field 'Modifiable'.\r
+ */\r
+ public java.lang.String getModifiable(\r
+ ) {\r
+ return this._modifiable;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'name'. The field 'name' has the\r
+ * following description: Short name for this node\r
+ * \r
+ * @return the value of field 'Name'.\r
+ */\r
+ public java.lang.String getName(\r
+ ) {\r
+ return this._name;\r
+ }\r
+\r
+ /**\r
+ * Method getProperty.\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.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.get(index);\r
+ }\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 this collection as an Array\r
+ */\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 getPropertyAsReference.Returns a reference to\r
+ * '_propertyList'. 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 getPropertyAsReference(\r
+ ) {\r
+ return this._propertyList;\r
+ }\r
+\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 getVref.\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.Vref at\r
+ * the given index\r
+ */\r
+ public uk.ac.vamsas.objects.core.Vref getVref(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._vrefList.size()) {\r
+ throw new IndexOutOfBoundsException("getVref: Index value '" + index + "' not in range [0.." + (this._vrefList.size() - 1) + "]");\r
+ }\r
+ \r
+ return (uk.ac.vamsas.objects.core.Vref) _vrefList.get(index);\r
+ }\r
+\r
+ /**\r
+ * Method getVref.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.Vref[] getVref(\r
+ ) {\r
+ uk.ac.vamsas.objects.core.Vref[] array = new uk.ac.vamsas.objects.core.Vref[0];\r
+ return (uk.ac.vamsas.objects.core.Vref[]) this._vrefList.toArray(array);\r
+ }\r
+\r
+ /**\r
+ * Method getVrefAsReference.Returns a reference to\r
+ * '_vrefList'. 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 getVrefAsReference(\r
+ ) {\r
+ return this._vrefList;\r
+ }\r
+\r
+ /**\r
+ * Method getVrefCount.\r
+ * \r
+ * @return the size of this collection\r
+ */\r
+ public int getVrefCount(\r
+ ) {\r
+ return this._vrefList.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 (_id != null) {\r
+ result = 37 * result + _id.hashCode();\r
+ }\r
+ if (_modifiable != null) {\r
+ result = 37 * result + _modifiable.hashCode();\r
+ }\r
+ if (_name != null) {\r
+ result = 37 * result + _name.hashCode();\r
+ }\r
+ if (_description != null) {\r
+ result = 37 * result + _description.hashCode();\r
+ }\r
+ if (_vrefList != null) {\r
+ result = 37 * result + _vrefList.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 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 removeAllProperty(\r
+ ) {\r
+ this._propertyList.clear();\r
+ }\r
+\r
+ /**\r
+ */\r
+ public void removeAllVref(\r
+ ) {\r
+ this._vrefList.clear();\r
+ }\r
+\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 the element removed from the collection\r
+ */\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
+ }\r
+\r
+ /**\r
+ * Method removeVref.\r
+ * \r
+ * @param vVref\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeVref(\r
+ final uk.ac.vamsas.objects.core.Vref vVref) {\r
+ boolean removed = _vrefList.remove(vVref);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removeVrefAt.\r
+ * \r
+ * @param index\r
+ * @return the element removed from the collection\r
+ */\r
+ public uk.ac.vamsas.objects.core.Vref removeVrefAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._vrefList.remove(index);\r
+ return (uk.ac.vamsas.objects.core.Vref) obj;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'description'. The field\r
+ * 'description' has the following description: Descriptive\r
+ * text for this node\r
+ * \r
+ * @param description the value of field 'description'.\r
+ */\r
+ public void setDescription(\r
+ final java.lang.String description) {\r
+ this._description = description;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'id'. The field 'id' has the\r
+ * following description: Primary Key for vamsas object\r
+ * referencing \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 'modifiable'.\r
+ * \r
+ * @param modifiable the value of field 'modifiable'.\r
+ */\r
+ public void setModifiable(\r
+ final java.lang.String modifiable) {\r
+ this._modifiable = modifiable;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'name'. The field 'name' has the\r
+ * following description: Short name for this node\r
+ * \r
+ * @param name the value of field 'name'.\r
+ */\r
+ public void setName(\r
+ final java.lang.String name) {\r
+ this._name = name;\r
+ }\r
+\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 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
+ \r
+ this._propertyList.set(index, vProperty);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param vPropertyArray\r
+ */\r
+ public void setProperty(\r
+ final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {\r
+ //-- copy array\r
+ _propertyList.clear();\r
+ \r
+ for (int i = 0; i < vPropertyArray.length; i++) {\r
+ this._propertyList.add(vPropertyArray[i]);\r
+ }\r
+ }\r
+\r
+ /**\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 vVref\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void setVref(\r
+ final int index,\r
+ final uk.ac.vamsas.objects.core.Vref vVref)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._vrefList.size()) {\r
+ throw new IndexOutOfBoundsException("setVref: Index value '" + index + "' not in range [0.." + (this._vrefList.size() - 1) + "]");\r
+ }\r
+ \r
+ this._vrefList.set(index, vVref);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param vVrefArray\r
+ */\r
+ public void setVref(\r
+ final uk.ac.vamsas.objects.core.Vref[] vVrefArray) {\r
+ //-- copy array\r
+ _vrefList.clear();\r
+ \r
+ for (int i = 0; i < vVrefArray.length; i++) {\r
+ this._vrefList.add(vVrefArray[i]);\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_vrefList' by copying the given Vector.\r
+ * All elements will be checked for type safety.\r
+ * \r
+ * @param vVrefList the Vector to copy.\r
+ */\r
+ public void setVref(\r
+ final java.util.Vector vVrefList) {\r
+ // copy vector\r
+ this._vrefList.clear();\r
+ \r
+ this._vrefList.addAll(vVrefList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_vrefList' by setting it to the given\r
+ * Vector. No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param vrefVector the Vector to set.\r
+ */\r
+ public void setVrefAsReference(\r
+ final java.util.Vector vrefVector) {\r
+ this._vrefList = vrefVector;\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.NodeType\r
+ */\r
+ public static uk.ac.vamsas.objects.core.NodeType 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.NodeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.NodeType.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
+ * base type for citing arbitrary links between vamsas objects\r
+ * \r
+ * Optional human readable description of the relationship\r
+ * \r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class ReferenceType extends uk.ac.vamsas.client.Vobject \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * internal content storage\r
+ */\r
+ private java.lang.String _content = "";\r
+\r
+ /**\r
+ * Primary Key for vamsas object referencing \r
+ */\r
+ private java.lang.String _id;\r
+\r
+ /**\r
+ * List of one or more vamsas object references\r
+ */\r
+ private java.util.Vector _refs;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public ReferenceType() {\r
+ super();\r
+ setContent("");\r
+ this._refs = new java.util.Vector();\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param vRefs\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addRefs(\r
+ final java.lang.Object vRefs)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._refs.addElement(vRefs);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param index\r
+ * @param vRefs\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addRefs(\r
+ final int index,\r
+ final java.lang.Object vRefs)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._refs.add(index, vRefs);\r
+ }\r
+\r
+ /**\r
+ * Method enumerateRefs.\r
+ * \r
+ * @return an Enumeration over all java.lang.Object elements\r
+ */\r
+ public java.util.Enumeration enumerateRefs(\r
+ ) {\r
+ return this._refs.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 ReferenceType) {\r
+ \r
+ ReferenceType temp = (ReferenceType)obj;\r
+ if (this._content != null) {\r
+ if (temp._content == null) return false;\r
+ else if (!(this._content.equals(temp._content))) \r
+ return false;\r
+ }\r
+ else if (temp._content != 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._refs != null) {\r
+ if (temp._refs == null) return false;\r
+ else if (!(this._refs.equals(temp._refs))) \r
+ return false;\r
+ }\r
+ else if (temp._refs != null)\r
+ return false;\r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'content'. The field 'content'\r
+ * has the following description: internal content storage\r
+ * \r
+ * @return the value of field 'Content'.\r
+ */\r
+ public java.lang.String getContent(\r
+ ) {\r
+ return this._content;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'id'. The field 'id' has the\r
+ * following description: Primary Key for vamsas object\r
+ * referencing \r
+ * \r
+ * @return the value of field 'Id'.\r
+ */\r
+ public java.lang.String getId(\r
+ ) {\r
+ return this._id;\r
+ }\r
+\r
+ /**\r
+ * Method getRefs.\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 java.lang.Object at the given index\r
+ */\r
+ public java.lang.Object getRefs(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._refs.size()) {\r
+ throw new IndexOutOfBoundsException("getRefs: Index value '" + index + "' not in range [0.." + (this._refs.size() - 1) + "]");\r
+ }\r
+ \r
+ return _refs.get(index);\r
+ }\r
+\r
+ /**\r
+ * Method getRefs.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 java.lang.Object[] getRefs(\r
+ ) {\r
+ java.lang.Object[] array = new java.lang.Object[0];\r
+ return (java.lang.Object[]) this._refs.toArray(array);\r
+ }\r
+\r
+ /**\r
+ * Method getRefsAsReference.Returns a reference to '_refs'. No\r
+ * type checking is performed on any modifications to the\r
+ * Vector.\r
+ * \r
+ * @return a reference to the Vector backing this class\r
+ */\r
+ public java.util.Vector getRefsAsReference(\r
+ ) {\r
+ return this._refs;\r
+ }\r
+\r
+ /**\r
+ * Method getRefsCount.\r
+ * \r
+ * @return the size of this collection\r
+ */\r
+ public int getRefsCount(\r
+ ) {\r
+ return this._refs.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 (_content != null) {\r
+ result = 37 * result + _content.hashCode();\r
+ }\r
+ if (_id != null) {\r
+ result = 37 * result + _id.hashCode();\r
+ }\r
+ if (_refs != null) {\r
+ result = 37 * result + _refs.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 removeAllRefs(\r
+ ) {\r
+ this._refs.clear();\r
+ }\r
+\r
+ /**\r
+ * Method removeRefs.\r
+ * \r
+ * @param vRefs\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeRefs(\r
+ final java.lang.Object vRefs) {\r
+ boolean removed = _refs.remove(vRefs);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removeRefsAt.\r
+ * \r
+ * @param index\r
+ * @return the element removed from the collection\r
+ */\r
+ public java.lang.Object removeRefsAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._refs.remove(index);\r
+ return obj;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'content'. The field 'content' has\r
+ * the following description: internal content storage\r
+ * \r
+ * @param content the value of field 'content'.\r
+ */\r
+ public void setContent(\r
+ final java.lang.String content) {\r
+ this._content = content;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'id'. The field 'id' has the\r
+ * following description: Primary Key for vamsas object\r
+ * referencing \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
+ * \r
+ * \r
+ * @param index\r
+ * @param vRefs\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void setRefs(\r
+ final int index,\r
+ final java.lang.Object vRefs)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._refs.size()) {\r
+ throw new IndexOutOfBoundsException("setRefs: Index value '" + index + "' not in range [0.." + (this._refs.size() - 1) + "]");\r
+ }\r
+ \r
+ this._refs.set(index, vRefs);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param vRefsArray\r
+ */\r
+ public void setRefs(\r
+ final java.lang.Object[] vRefsArray) {\r
+ //-- copy array\r
+ _refs.clear();\r
+ \r
+ for (int i = 0; i < vRefsArray.length; i++) {\r
+ this._refs.add(vRefsArray[i]);\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_refs' by copying the given Vector. All\r
+ * elements will be checked for type safety.\r
+ * \r
+ * @param vRefsList the Vector to copy.\r
+ */\r
+ public void setRefs(\r
+ final java.util.Vector vRefsList) {\r
+ // copy vector\r
+ this._refs.clear();\r
+ \r
+ this._refs.addAll(vRefsList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_refs' by setting it to the given Vector.\r
+ * No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param refsVector the Vector to set.\r
+ */\r
+ public void setRefsAsReference(\r
+ final java.util.Vector refsVector) {\r
+ this._refs = refsVector;\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.ReferenceType\r
+ */\r
+ public static uk.ac.vamsas.objects.core.ReferenceType 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.ReferenceType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.ReferenceType.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 _dbRefList;
+ /**
+ * explicitly named cross reference to other objects in the
+ * document.
+ *
+ */
+ private java.util.Vector _vxrefList;
+
//----------------/
//- Constructors -/
public Sequence() {
super();
this._dbRefList = new java.util.Vector();
+ this._vxrefList = new java.util.Vector();
}
}
/**
+ *
+ *
+ * @param vVxref
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addVxref(
+ final uk.ac.vamsas.objects.core.Vxref vVxref)
+ throws java.lang.IndexOutOfBoundsException {
+ this._vxrefList.addElement(vVxref);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vVxref
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addVxref(
+ final int index,
+ final uk.ac.vamsas.objects.core.Vxref vVxref)
+ throws java.lang.IndexOutOfBoundsException {
+ this._vxrefList.add(index, vVxref);
+ }
+
+ /**
* Method enumerateDbRef.
*
* @return an Enumeration over all
}
/**
+ * Method enumerateVxref.
+ *
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Vxref elements
+ */
+ public java.util.Enumeration enumerateVxref(
+ ) {
+ return this._vxrefList.elements();
+ }
+
+ /**
* Overrides the java.lang.Object.equals method.
*
* @param obj
}
else if (temp._dbRefList != null)
return false;
+ if (this._vxrefList != null) {
+ if (temp._vxrefList == null) return false;
+ else if (!(this._vxrefList.equals(temp._vxrefList)))
+ return false;
+ }
+ else if (temp._vxrefList != null)
+ return false;
return true;
}
return false;
}
/**
+ * Method getVxref.
+ *
+ * @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.Vxref at
+ * the given index
+ */
+ public uk.ac.vamsas.objects.core.Vxref getVxref(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._vxrefList.size()) {
+ throw new IndexOutOfBoundsException("getVxref: Index value '" + index + "' not in range [0.." + (this._vxrefList.size() - 1) + "]");
+ }
+
+ return (uk.ac.vamsas.objects.core.Vxref) _vxrefList.get(index);
+ }
+
+ /**
+ * Method getVxref.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.Vxref[] getVxref(
+ ) {
+ uk.ac.vamsas.objects.core.Vxref[] array = new uk.ac.vamsas.objects.core.Vxref[0];
+ return (uk.ac.vamsas.objects.core.Vxref[]) this._vxrefList.toArray(array);
+ }
+
+ /**
+ * Method getVxrefAsReference.Returns a reference to
+ * '_vxrefList'. No type checking is performed on any
+ * modifications to the Vector.
+ *
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getVxrefAsReference(
+ ) {
+ return this._vxrefList;
+ }
+
+ /**
+ * Method getVxrefCount.
+ *
+ * @return the size of this collection
+ */
+ public int getVxrefCount(
+ ) {
+ return this._vxrefList.size();
+ }
+
+ /**
* Overrides the java.lang.Object.hashCode method.
* <p>
* The following steps came from <b>Effective Java Programming
if (_dbRefList != null) {
result = 37 * result + _dbRefList.hashCode();
}
+ if (_vxrefList != null) {
+ result = 37 * result + _vxrefList.hashCode();
+ }
return result;
}
}
/**
+ */
+ public void removeAllVxref(
+ ) {
+ this._vxrefList.clear();
+ }
+
+ /**
* Method removeDbRef.
*
* @param vDbRef
}
/**
+ * Method removeVxref.
+ *
+ * @param vVxref
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeVxref(
+ final uk.ac.vamsas.objects.core.Vxref vVxref) {
+ boolean removed = _vxrefList.remove(vVxref);
+ return removed;
+ }
+
+ /**
+ * Method removeVxrefAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public uk.ac.vamsas.objects.core.Vxref removeVxrefAt(
+ final int index) {
+ java.lang.Object obj = this._vxrefList.remove(index);
+ return (uk.ac.vamsas.objects.core.Vxref) obj;
+ }
+
+ /**
*
*
* @param index
}
/**
+ *
+ *
+ * @param index
+ * @param vVxref
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setVxref(
+ final int index,
+ final uk.ac.vamsas.objects.core.Vxref vVxref)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._vxrefList.size()) {
+ throw new IndexOutOfBoundsException("setVxref: Index value '" + index + "' not in range [0.." + (this._vxrefList.size() - 1) + "]");
+ }
+
+ this._vxrefList.set(index, vVxref);
+ }
+
+ /**
+ *
+ *
+ * @param vVxrefArray
+ */
+ public void setVxref(
+ final uk.ac.vamsas.objects.core.Vxref[] vVxrefArray) {
+ //-- copy array
+ _vxrefList.clear();
+
+ for (int i = 0; i < vVxrefArray.length; i++) {
+ this._vxrefList.add(vVxrefArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of '_vxrefList' by copying the given Vector.
+ * All elements will be checked for type safety.
+ *
+ * @param vVxrefList the Vector to copy.
+ */
+ public void setVxref(
+ final java.util.Vector vVxrefList) {
+ // copy vector
+ this._vxrefList.clear();
+
+ this._vxrefList.addAll(vVxrefList);
+ }
+
+ /**
+ * Sets the value of '_vxrefList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param vxrefVector the Vector to set.
+ */
+ public void setVxrefAsReference(
+ final java.util.Vector vxrefVector) {
+ this._vxrefList = vxrefVector;
+ }
+
+ /**
* Method unmarshal.
*
* @param reader
private java.util.Vector _newickList;
/**
+ * node identity and mapping data between tree representations
+ * and vamsas document objects
+ *
+ */
+ private java.util.Vector _treenodeList;
+
+ /**
* Field _propertyList.
*/
private java.util.Vector _propertyList;
public Tree() {
super();
this._newickList = new java.util.Vector();
+ this._treenodeList = new java.util.Vector();
this._propertyList = new java.util.Vector();
}
}
/**
+ *
+ *
+ * @param vTreenode
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addTreenode(
+ final uk.ac.vamsas.objects.core.Treenode vTreenode)
+ throws java.lang.IndexOutOfBoundsException {
+ this._treenodeList.addElement(vTreenode);
+ }
+
+ /**
+ *
+ *
+ * @param index
+ * @param vTreenode
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void addTreenode(
+ final int index,
+ final uk.ac.vamsas.objects.core.Treenode vTreenode)
+ throws java.lang.IndexOutOfBoundsException {
+ this._treenodeList.add(index, vTreenode);
+ }
+
+ /**
* Method enumerateNewick.
*
* @return an Enumeration over all
}
/**
+ * Method enumerateTreenode.
+ *
+ * @return an Enumeration over all
+ * uk.ac.vamsas.objects.core.Treenode elements
+ */
+ public java.util.Enumeration enumerateTreenode(
+ ) {
+ return this._treenodeList.elements();
+ }
+
+ /**
* Overrides the java.lang.Object.equals method.
*
* @param obj
}
else if (temp._newickList != null)
return false;
+ if (this._treenodeList != null) {
+ if (temp._treenodeList == null) return false;
+ else if (!(this._treenodeList.equals(temp._treenodeList)))
+ return false;
+ }
+ else if (temp._treenodeList != null)
+ return false;
if (this._propertyList != null) {
if (temp._propertyList == null) return false;
else if (!(this._propertyList.equals(temp._propertyList)))
}
/**
+ * Method getTreenode.
+ *
+ * @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.Treenode
+ * at the given index
+ */
+ public uk.ac.vamsas.objects.core.Treenode getTreenode(
+ final int index)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._treenodeList.size()) {
+ throw new IndexOutOfBoundsException("getTreenode: Index value '" + index + "' not in range [0.." + (this._treenodeList.size() - 1) + "]");
+ }
+
+ return (uk.ac.vamsas.objects.core.Treenode) _treenodeList.get(index);
+ }
+
+ /**
+ * Method getTreenode.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.Treenode[] getTreenode(
+ ) {
+ uk.ac.vamsas.objects.core.Treenode[] array = new uk.ac.vamsas.objects.core.Treenode[0];
+ return (uk.ac.vamsas.objects.core.Treenode[]) this._treenodeList.toArray(array);
+ }
+
+ /**
+ * Method getTreenodeAsReference.Returns a reference to
+ * '_treenodeList'. No type checking is performed on any
+ * modifications to the Vector.
+ *
+ * @return a reference to the Vector backing this class
+ */
+ public java.util.Vector getTreenodeAsReference(
+ ) {
+ return this._treenodeList;
+ }
+
+ /**
+ * Method getTreenodeCount.
+ *
+ * @return the size of this collection
+ */
+ public int getTreenodeCount(
+ ) {
+ return this._treenodeList.size();
+ }
+
+ /**
* Overrides the java.lang.Object.hashCode method.
* <p>
* The following steps came from <b>Effective Java Programming
if (_newickList != null) {
result = 37 * result + _newickList.hashCode();
}
+ if (_treenodeList != null) {
+ result = 37 * result + _treenodeList.hashCode();
+ }
if (_propertyList != null) {
result = 37 * result + _propertyList.hashCode();
}
}
/**
+ */
+ public void removeAllTreenode(
+ ) {
+ this._treenodeList.clear();
+ }
+
+ /**
* Method removeNewick.
*
* @param vNewick
}
/**
+ * Method removeTreenode.
+ *
+ * @param vTreenode
+ * @return true if the object was removed from the collection.
+ */
+ public boolean removeTreenode(
+ final uk.ac.vamsas.objects.core.Treenode vTreenode) {
+ boolean removed = _treenodeList.remove(vTreenode);
+ return removed;
+ }
+
+ /**
+ * Method removeTreenodeAt.
+ *
+ * @param index
+ * @return the element removed from the collection
+ */
+ public uk.ac.vamsas.objects.core.Treenode removeTreenodeAt(
+ final int index) {
+ java.lang.Object obj = this._treenodeList.remove(index);
+ return (uk.ac.vamsas.objects.core.Treenode) obj;
+ }
+
+ /**
* Sets the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
* referencing
}
/**
+ *
+ *
+ * @param index
+ * @param vTreenode
+ * @throws java.lang.IndexOutOfBoundsException if the index
+ * given is outside the bounds of the collection
+ */
+ public void setTreenode(
+ final int index,
+ final uk.ac.vamsas.objects.core.Treenode vTreenode)
+ throws java.lang.IndexOutOfBoundsException {
+ // check bounds for index
+ if (index < 0 || index >= this._treenodeList.size()) {
+ throw new IndexOutOfBoundsException("setTreenode: Index value '" + index + "' not in range [0.." + (this._treenodeList.size() - 1) + "]");
+ }
+
+ this._treenodeList.set(index, vTreenode);
+ }
+
+ /**
+ *
+ *
+ * @param vTreenodeArray
+ */
+ public void setTreenode(
+ final uk.ac.vamsas.objects.core.Treenode[] vTreenodeArray) {
+ //-- copy array
+ _treenodeList.clear();
+
+ for (int i = 0; i < vTreenodeArray.length; i++) {
+ this._treenodeList.add(vTreenodeArray[i]);
+ }
+ }
+
+ /**
+ * Sets the value of '_treenodeList' by copying the given
+ * Vector. All elements will be checked for type safety.
+ *
+ * @param vTreenodeList the Vector to copy.
+ */
+ public void setTreenode(
+ final java.util.Vector vTreenodeList) {
+ // copy vector
+ this._treenodeList.clear();
+
+ this._treenodeList.addAll(vTreenodeList);
+ }
+
+ /**
+ * Sets the value of '_treenodeList' by setting it to the given
+ * Vector. No type checking is performed.
+ * @deprecated
+ *
+ * @param treenodeVector the Vector to set.
+ */
+ public void setTreenodeAsReference(
+ final java.util.Vector treenodeVector) {
+ this._treenodeList = treenodeVector;
+ }
+
+ /**
* Method unmarshal.
*
* @param reader
--- /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
+ * node identity and mapping data between tree representations and\r
+ * vamsas document objects\r
+ * \r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Treenode extends uk.ac.vamsas.objects.core.NodeType \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * reference to one or more trees containing the node being\r
+ * described.\r
+ * \r
+ */\r
+ private java.util.Vector _treeId;\r
+\r
+ /**\r
+ * String uniquely identifying a particular node in the\r
+ * referenced tree according to the format of the tree\r
+ * representation that is referenced.\r
+ * \r
+ */\r
+ private java.lang.String _nodespec;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public Treenode() {\r
+ super();\r
+ this._treeId = new java.util.Vector();\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param vTreeId\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addTreeId(\r
+ final java.lang.Object vTreeId)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._treeId.addElement(vTreeId);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param index\r
+ * @param vTreeId\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void addTreeId(\r
+ final int index,\r
+ final java.lang.Object vTreeId)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ this._treeId.add(index, vTreeId);\r
+ }\r
+\r
+ /**\r
+ * Method enumerateTreeId.\r
+ * \r
+ * @return an Enumeration over all java.lang.Object elements\r
+ */\r
+ public java.util.Enumeration enumerateTreeId(\r
+ ) {\r
+ return this._treeId.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 Treenode) {\r
+ \r
+ Treenode temp = (Treenode)obj;\r
+ if (this._treeId != null) {\r
+ if (temp._treeId == null) return false;\r
+ else if (!(this._treeId.equals(temp._treeId))) \r
+ return false;\r
+ }\r
+ else if (temp._treeId != null)\r
+ return false;\r
+ if (this._nodespec != null) {\r
+ if (temp._nodespec == null) return false;\r
+ else if (!(this._nodespec.equals(temp._nodespec))) \r
+ return false;\r
+ }\r
+ else if (temp._nodespec != null)\r
+ return false;\r
+ return true;\r
+ }\r
+ return false;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'nodespec'. The field 'nodespec'\r
+ * has the following description: String uniquely identifying a\r
+ * particular node in the referenced tree according to the\r
+ * format of the tree representation that is referenced.\r
+ * \r
+ * \r
+ * @return the value of field 'Nodespec'.\r
+ */\r
+ public java.lang.String getNodespec(\r
+ ) {\r
+ return this._nodespec;\r
+ }\r
+\r
+ /**\r
+ * Method getTreeId.\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 java.lang.Object at the given index\r
+ */\r
+ public java.lang.Object getTreeId(\r
+ final int index)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._treeId.size()) {\r
+ throw new IndexOutOfBoundsException("getTreeId: Index value '" + index + "' not in range [0.." + (this._treeId.size() - 1) + "]");\r
+ }\r
+ \r
+ return _treeId.get(index);\r
+ }\r
+\r
+ /**\r
+ * Method getTreeId.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 this collection as an Array\r
+ */\r
+ public java.lang.Object[] getTreeId(\r
+ ) {\r
+ java.lang.Object[] array = new java.lang.Object[0];\r
+ return (java.lang.Object[]) this._treeId.toArray(array);\r
+ }\r
+\r
+ /**\r
+ * Method getTreeIdAsReference.Returns a reference to\r
+ * '_treeId'. 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 getTreeIdAsReference(\r
+ ) {\r
+ return this._treeId;\r
+ }\r
+\r
+ /**\r
+ * Method getTreeIdCount.\r
+ * \r
+ * @return the size of this collection\r
+ */\r
+ public int getTreeIdCount(\r
+ ) {\r
+ return this._treeId.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 (_treeId != null) {\r
+ result = 37 * result + _treeId.hashCode();\r
+ }\r
+ if (_nodespec != null) {\r
+ result = 37 * result + _nodespec.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 removeAllTreeId(\r
+ ) {\r
+ this._treeId.clear();\r
+ }\r
+\r
+ /**\r
+ * Method removeTreeId.\r
+ * \r
+ * @param vTreeId\r
+ * @return true if the object was removed from the collection.\r
+ */\r
+ public boolean removeTreeId(\r
+ final java.lang.Object vTreeId) {\r
+ boolean removed = _treeId.remove(vTreeId);\r
+ return removed;\r
+ }\r
+\r
+ /**\r
+ * Method removeTreeIdAt.\r
+ * \r
+ * @param index\r
+ * @return the element removed from the collection\r
+ */\r
+ public java.lang.Object removeTreeIdAt(\r
+ final int index) {\r
+ java.lang.Object obj = this._treeId.remove(index);\r
+ return obj;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'nodespec'. The field 'nodespec' has\r
+ * the following description: String uniquely identifying a\r
+ * particular node in the referenced tree according to the\r
+ * format of the tree representation that is referenced.\r
+ * \r
+ * \r
+ * @param nodespec the value of field 'nodespec'.\r
+ */\r
+ public void setNodespec(\r
+ final java.lang.String nodespec) {\r
+ this._nodespec = nodespec;\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param index\r
+ * @param vTreeId\r
+ * @throws java.lang.IndexOutOfBoundsException if the index\r
+ * given is outside the bounds of the collection\r
+ */\r
+ public void setTreeId(\r
+ final int index,\r
+ final java.lang.Object vTreeId)\r
+ throws java.lang.IndexOutOfBoundsException {\r
+ // check bounds for index\r
+ if (index < 0 || index >= this._treeId.size()) {\r
+ throw new IndexOutOfBoundsException("setTreeId: Index value '" + index + "' not in range [0.." + (this._treeId.size() - 1) + "]");\r
+ }\r
+ \r
+ this._treeId.set(index, vTreeId);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param vTreeIdArray\r
+ */\r
+ public void setTreeId(\r
+ final java.lang.Object[] vTreeIdArray) {\r
+ //-- copy array\r
+ _treeId.clear();\r
+ \r
+ for (int i = 0; i < vTreeIdArray.length; i++) {\r
+ this._treeId.add(vTreeIdArray[i]);\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_treeId' by copying the given Vector. All\r
+ * elements will be checked for type safety.\r
+ * \r
+ * @param vTreeIdList the Vector to copy.\r
+ */\r
+ public void setTreeId(\r
+ final java.util.Vector vTreeIdList) {\r
+ // copy vector\r
+ this._treeId.clear();\r
+ \r
+ this._treeId.addAll(vTreeIdList);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of '_treeId' by setting it to the given\r
+ * Vector. No type checking is performed.\r
+ * @deprecated\r
+ * \r
+ * @param treeIdVector the Vector to set.\r
+ */\r
+ public void setTreeIdAsReference(\r
+ final java.util.Vector treeIdVector) {\r
+ this._treeId = treeIdVector;\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.NodeType\r
+ */\r
+ public static uk.ac.vamsas.objects.core.NodeType 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.NodeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Treenode.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
+ * Direct associations between this node and any vamsas objects\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Vref extends ReferenceType \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public Vref() {\r
+ super();\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\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 Vref) {\r
+ \r
+ return true;\r
+ }\r
+ return false;\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
+ \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
+ * 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.ReferenceType\r
+ */\r
+ public static uk.ac.vamsas.objects.core.ReferenceType 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.ReferenceType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Vref.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
+ * explicitly named cross reference to other objects in the\r
+ * document.\r
+ * \r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Vxref extends ReferenceType \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public Vxref() {\r
+ super();\r
+ }\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\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 Vxref) {\r
+ \r
+ return true;\r
+ }\r
+ return false;\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
+ \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
+ * 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.ReferenceType\r
+ */\r
+ public static uk.ac.vamsas.objects.core.ReferenceType 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.ReferenceType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Vxref.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
fieldValidator.setValidator(typeValidator);\r
}\r
desc.setValidator(fieldValidator);\r
+ //-- _seqrefs\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_seqrefs", "seqrefs", 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
+ AlignmentAnnotation target = (AlignmentAnnotation) object;\r
+ return target.getSeqrefs();\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.addSeqrefs( (java.lang.Object) 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
+ AlignmentAnnotation target = (AlignmentAnnotation) object;\r
+ target.removeAllSeqrefs();\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.setMultivalued(true);\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _seqrefs\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdRefsValidator typeValidator = new org.exolab.castor.xml.validators.IdRefsValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
//-- initialize element descriptors\r
\r
//-- _provenance\r
{\r
try {\r
DataSetAnnotations target = (DataSetAnnotations) object;\r
- target.setSeqRef( (java.lang.Object) value);\r
+ target.addSeqRef( (java.lang.Object) 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
+ DataSetAnnotations target = (DataSetAnnotations) object;\r
+ target.removeAllSeqRef();\r
} catch (java.lang.Exception ex) {\r
throw new IllegalStateException(ex.toString());\r
}\r
return new java.lang.Object();\r
}\r
};\r
+ desc.setMultivalued(true);\r
desc.setHandler(handler);\r
desc.setRequired(true);\r
- desc.setMultivalued(false);\r
+ desc.setMultivalued(true);\r
addFieldDescriptor(desc);\r
\r
//-- validation code for: _seqRef\r
fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
- fieldValidator.setMinOccurs(1);\r
+ fieldValidator.setMinOccurs(0);\r
{ //-- local scope\r
- org.exolab.castor.xml.validators.IdRefValidator typeValidator;\r
- typeValidator = new org.exolab.castor.xml.validators.IdRefValidator();\r
+ org.exolab.castor.xml.validators.IdRefsValidator typeValidator = new org.exolab.castor.xml.validators.IdRefsValidator();\r
fieldValidator.setValidator(typeValidator);\r
+ desc.setValidator(fieldValidator);\r
}\r
desc.setValidator(fieldValidator);\r
//-- initialize element descriptors\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
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.util.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
try {\r
Entry target = (Entry) object;\r
- target.setDate( (org.exolab.castor.types.Date) value);\r
+ target.setDate( (java.util.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
+ return new java.util.Date();\r
}\r
};\r
+ handler = new org.exolab.castor.xml.handlers.DateFieldHandler(handler);\r
+ desc.setImmutable(true);\r
desc.setHandler(handler);\r
desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
desc.setRequired(true);\r
{\r
try {\r
Input target = (Input) object;\r
- target.setObjRef( (java.lang.Object) value);\r
+ target.addObjRef( (java.lang.Object) 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
+ Input target = (Input) object;\r
+ target.removeAllObjRef();\r
} catch (java.lang.Exception ex) {\r
throw new IllegalStateException(ex.toString());\r
}\r
return new java.lang.Object();\r
}\r
};\r
+ desc.setMultivalued(true);\r
desc.setHandler(handler);\r
- desc.setMultivalued(false);\r
+ desc.setMultivalued(true);\r
addFieldDescriptor(desc);\r
\r
//-- validation code for: _objRef\r
fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
{ //-- local scope\r
- org.exolab.castor.xml.validators.IdRefValidator typeValidator;\r
- typeValidator = new org.exolab.castor.xml.validators.IdRefValidator();\r
+ org.exolab.castor.xml.validators.IdRefsValidator typeValidator = new org.exolab.castor.xml.validators.IdRefsValidator();\r
fieldValidator.setValidator(typeValidator);\r
+ desc.setValidator(fieldValidator);\r
}\r
desc.setValidator(fieldValidator);\r
//-- initialize element descriptors\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.NodeType;\r
+\r
+/**\r
+ * Class NodeTypeDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class NodeTypeDescriptor 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 NodeTypeDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "nodeType";\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
+ NodeType target = (NodeType) 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
+ NodeType target = (NodeType) 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
+ NodeType target = (NodeType) 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
+ NodeType target = (NodeType) 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
+ //-- _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
+ NodeType target = (NodeType) 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
+ NodeType target = (NodeType) 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.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
+ //-- _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
+ NodeType target = (NodeType) 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
+ NodeType target = (NodeType) 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
+ //-- _vrefList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Vref.class, "_vrefList", "vref", 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
+ NodeType target = (NodeType) object;\r
+ return target.getVref();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ NodeType target = (NodeType) object;\r
+ target.addVref( (uk.ac.vamsas.objects.core.Vref) 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
+ NodeType target = (NodeType) object;\r
+ target.removeAllVref();\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.Vref();\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: _vrefList\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
+ NodeType target = (NodeType) 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
+ NodeType target = (NodeType) 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
+ NodeType target = (NodeType) 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.NodeType.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.ReferenceType;\r
+\r
+/**\r
+ * Class ReferenceTypeDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class ReferenceTypeDescriptor 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 ReferenceTypeDescriptor() {\r
+ super();\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "referenceType";\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
+ //-- _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
+ ReferenceType target = (ReferenceType) 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
+ ReferenceType target = (ReferenceType) 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
+ //-- _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
+ ReferenceType target = (ReferenceType) 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
+ ReferenceType target = (ReferenceType) 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
+ //-- _refs\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_refs", "refs", 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
+ ReferenceType target = (ReferenceType) object;\r
+ return target.getRefs();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ ReferenceType target = (ReferenceType) object;\r
+ target.addRefs( (java.lang.Object) 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
+ ReferenceType target = (ReferenceType) object;\r
+ target.removeAllRefs();\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.setMultivalued(true);\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _refs\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdRefsValidator typeValidator = new org.exolab.castor.xml.validators.IdRefsValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ desc.setValidator(fieldValidator);\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.ReferenceType.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
+ //-- _vxrefList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Vxref.class, "_vxrefList", "vxref", 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.getVxref();\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.addVxref( (uk.ac.vamsas.objects.core.Vxref) 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.removeAllVxref();\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.Vxref();\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: _vxrefList\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
}\r
\r
\r
{ //-- local scope\r
}\r
desc.setValidator(fieldValidator);\r
+ //-- _treenodeList\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Treenode.class, "_treenodeList", "treenode", 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.getTreenode();\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.addTreenode( (uk.ac.vamsas.objects.core.Treenode) 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.removeAllTreenode();\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.Treenode();\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: _treenodeList\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
--- /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.Treenode;\r
+\r
+/**\r
+ * Class TreenodeDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class TreenodeDescriptor extends uk.ac.vamsas.objects.core.descriptors.NodeTypeDescriptor {\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 TreenodeDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.NodeTypeDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "treenode";\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
+ //-- _treeId\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_treeId", "treeId", 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
+ Treenode target = (Treenode) object;\r
+ return target.getTreeId();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Treenode target = (Treenode) object;\r
+ target.addTreeId( (java.lang.Object) 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
+ Treenode target = (Treenode) object;\r
+ target.removeAllTreeId();\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.setMultivalued(true);\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(true);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _treeId\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(0);\r
+ { //-- local scope\r
+ org.exolab.castor.xml.validators.IdRefsValidator typeValidator = new org.exolab.castor.xml.validators.IdRefsValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ desc.setValidator(fieldValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _nodespec\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_nodespec", "nodespec", 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
+ Treenode target = (Treenode) object;\r
+ return target.getNodespec();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Treenode target = (Treenode) object;\r
+ target.setNodespec( (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: _nodespec\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
+ 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.Treenode.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.Vref;\r
+\r
+/**\r
+ * Class VrefDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class VrefDescriptor extends uk.ac.vamsas.objects.core.descriptors.ReferenceTypeDescriptor {\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 VrefDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.ReferenceTypeDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "vref";\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.Vref.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.Vxref;\r
+\r
+/**\r
+ * Class VxrefDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class VxrefDescriptor extends uk.ac.vamsas.objects.core.descriptors.ReferenceTypeDescriptor {\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 VxrefDescriptor() {\r
+ super();\r
+ setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.ReferenceTypeDescriptor());\r
+ _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+ _xmlName = "vxref";\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.Vxref.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
e.setApp(app);
e.setAction(action);
e.setUser(user);
- e.setDate(new org.exolab.castor.types.Date(new Date()));
+ e.setDate(new Date());
return e;
}
public static Provenance newProvenance(Entry entry) {
uk.ac.vamsas.objects.core.Entry pentry = new uk.ac.vamsas.objects.core.Entry();
pentry.setUser(this.getProvenanceUser());
pentry.setApp(this.getClientHandle().getClientName());
- pentry.setDate(new org.exolab.castor.types.Date(new java.util.Date()));
+ pentry.setDate(new java.util.Date());
pentry.setAction("created");
return pentry;
}
entry.setAction(action);\r
else\r
entry.setAction("created.");\r
- entry.setDate(new org.exolab.castor.types.Date(new java.util.Date()));\r
+ entry.setDate(new java.util.Date());\r
entry.setUser(this.provEntry.getUser());\r
return entry;\r
}\r