From 06aadd1eccd43600c74b6f2dd69581c84e99aee6 Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 19 Sep 2005 16:19:17 +0000 Subject: [PATCH] default generation using sourcegen schema. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@21 be28352e-c001-0410-b1a7-c7978e42abec --- src/org/vamsas/objects/core/Alignment.java | 531 +++++++++++++ .../vamsas/objects/core/AlignmentAnnotations.java | 462 ++++++++++++ src/org/vamsas/objects/core/AlignmentSequence.java | 179 +++++ src/org/vamsas/objects/core/AnnotationElement.java | 360 +++++++++ src/org/vamsas/objects/core/Application.java | 212 ++++++ src/org/vamsas/objects/core/ApplicationData.java | 179 +++++ src/org/vamsas/objects/core/DbRef.java | 245 ++++++ src/org/vamsas/objects/core/Entry.java | 245 ++++++ src/org/vamsas/objects/core/LockFile.java | 182 +++++ src/org/vamsas/objects/core/Provenance.java | 306 ++++++++ src/org/vamsas/objects/core/ProvenanceItem.java | 71 ++ src/org/vamsas/objects/core/Sequence.java | 212 ++++++ src/org/vamsas/objects/core/SequenceSet.java | 778 ++++++++++++++++++++ .../objects/core/SequenceSetAnnotations.java | 537 ++++++++++++++ src/org/vamsas/objects/core/SequenceType.java | 486 ++++++++++++ src/org/vamsas/objects/core/Tree.java | 212 ++++++ src/org/vamsas/objects/core/VAMSAS.java | 464 ++++++++++++ 17 files changed, 5661 insertions(+) create mode 100644 src/org/vamsas/objects/core/Alignment.java create mode 100644 src/org/vamsas/objects/core/AlignmentAnnotations.java create mode 100644 src/org/vamsas/objects/core/AlignmentSequence.java create mode 100644 src/org/vamsas/objects/core/AnnotationElement.java create mode 100644 src/org/vamsas/objects/core/Application.java create mode 100644 src/org/vamsas/objects/core/ApplicationData.java create mode 100644 src/org/vamsas/objects/core/DbRef.java create mode 100644 src/org/vamsas/objects/core/Entry.java create mode 100644 src/org/vamsas/objects/core/LockFile.java create mode 100644 src/org/vamsas/objects/core/Provenance.java create mode 100644 src/org/vamsas/objects/core/ProvenanceItem.java create mode 100644 src/org/vamsas/objects/core/Sequence.java create mode 100644 src/org/vamsas/objects/core/SequenceSet.java create mode 100644 src/org/vamsas/objects/core/SequenceSetAnnotations.java create mode 100644 src/org/vamsas/objects/core/SequenceType.java create mode 100644 src/org/vamsas/objects/core/Tree.java create mode 100644 src/org/vamsas/objects/core/VAMSAS.java diff --git a/src/org/vamsas/objects/core/Alignment.java b/src/org/vamsas/objects/core/Alignment.java new file mode 100644 index 0000000..edd0391 --- /dev/null +++ b/src/org/vamsas/objects/core/Alignment.java @@ -0,0 +1,531 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import java.util.Enumeration; +import java.util.Vector; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Alignment. + * + * @version $Revision$ $Date$ + */ +public class Alignment extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _alignmentAnnotations + */ + private org.vamsas.objects.core.AlignmentAnnotations _alignmentAnnotations; + + /** + * Field _treeList + */ + private java.util.Vector _treeList; + + /** + * Field _alignmentSequenceList + */ + private java.util.Vector _alignmentSequenceList; + + /** + * Field _provenance + */ + private org.vamsas.objects.core.Provenance _provenance; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Alignment() + { + super(); + _treeList = new Vector(); + _alignmentSequenceList = new Vector(); + } //-- org.vamsas.objects.core.Alignment() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addAlignmentSequence + * + * + * + * @param vAlignmentSequence + */ + public void addAlignmentSequence(org.vamsas.objects.core.AlignmentSequence vAlignmentSequence) + throws java.lang.IndexOutOfBoundsException + { + _alignmentSequenceList.addElement(vAlignmentSequence); + } //-- void addAlignmentSequence(org.vamsas.objects.core.AlignmentSequence) + + /** + * Method addAlignmentSequence + * + * + * + * @param index + * @param vAlignmentSequence + */ + public void addAlignmentSequence(int index, org.vamsas.objects.core.AlignmentSequence vAlignmentSequence) + throws java.lang.IndexOutOfBoundsException + { + _alignmentSequenceList.insertElementAt(vAlignmentSequence, index); + } //-- void addAlignmentSequence(int, org.vamsas.objects.core.AlignmentSequence) + + /** + * Method addTree + * + * + * + * @param vTree + */ + public void addTree(org.vamsas.objects.core.Tree vTree) + throws java.lang.IndexOutOfBoundsException + { + _treeList.addElement(vTree); + } //-- void addTree(org.vamsas.objects.core.Tree) + + /** + * Method addTree + * + * + * + * @param index + * @param vTree + */ + public void addTree(int index, org.vamsas.objects.core.Tree vTree) + throws java.lang.IndexOutOfBoundsException + { + _treeList.insertElementAt(vTree, index); + } //-- void addTree(int, org.vamsas.objects.core.Tree) + + /** + * Method enumerateAlignmentSequence + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateAlignmentSequence() + { + return _alignmentSequenceList.elements(); + } //-- java.util.Enumeration enumerateAlignmentSequence() + + /** + * Method enumerateTree + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateTree() + { + return _treeList.elements(); + } //-- java.util.Enumeration enumerateTree() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Alignment) { + + Alignment temp = (Alignment)obj; + if (this._alignmentAnnotations != null) { + if (temp._alignmentAnnotations == null) return false; + else if (!(this._alignmentAnnotations.equals(temp._alignmentAnnotations))) + return false; + } + else if (temp._alignmentAnnotations != null) + return false; + if (this._treeList != null) { + if (temp._treeList == null) return false; + else if (!(this._treeList.equals(temp._treeList))) + return false; + } + else if (temp._treeList != null) + return false; + if (this._alignmentSequenceList != null) { + if (temp._alignmentSequenceList == null) return false; + else if (!(this._alignmentSequenceList.equals(temp._alignmentSequenceList))) + return false; + } + else if (temp._alignmentSequenceList != null) + return false; + if (this._provenance != null) { + if (temp._provenance == null) return false; + else if (!(this._provenance.equals(temp._provenance))) + return false; + } + else if (temp._provenance != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'alignmentAnnotations'. + * + * @return AlignmentAnnotations + * @return the value of field 'alignmentAnnotations'. + */ + public org.vamsas.objects.core.AlignmentAnnotations getAlignmentAnnotations() + { + return this._alignmentAnnotations; + } //-- org.vamsas.objects.core.AlignmentAnnotations getAlignmentAnnotations() + + /** + * Method getAlignmentSequence + * + * + * + * @param index + * @return AlignmentSequence + */ + public org.vamsas.objects.core.AlignmentSequence getAlignmentSequence(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _alignmentSequenceList.size())) { + throw new IndexOutOfBoundsException("getAlignmentSequence: Index value '"+index+"' not in range [0.."+_alignmentSequenceList.size()+ "]"); + } + + return (org.vamsas.objects.core.AlignmentSequence) _alignmentSequenceList.elementAt(index); + } //-- org.vamsas.objects.core.AlignmentSequence getAlignmentSequence(int) + + /** + * Method getAlignmentSequence + * + * + * + * @return AlignmentSequence + */ + public org.vamsas.objects.core.AlignmentSequence[] getAlignmentSequence() + { + int size = _alignmentSequenceList.size(); + org.vamsas.objects.core.AlignmentSequence[] mArray = new org.vamsas.objects.core.AlignmentSequence[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.AlignmentSequence) _alignmentSequenceList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.AlignmentSequence[] getAlignmentSequence() + + /** + * Method getAlignmentSequenceCount + * + * + * + * @return int + */ + public int getAlignmentSequenceCount() + { + return _alignmentSequenceList.size(); + } //-- int getAlignmentSequenceCount() + + /** + * Returns the value of field 'provenance'. + * + * @return Provenance + * @return the value of field 'provenance'. + */ + public org.vamsas.objects.core.Provenance getProvenance() + { + return this._provenance; + } //-- org.vamsas.objects.core.Provenance getProvenance() + + /** + * Method getTree + * + * + * + * @param index + * @return Tree + */ + public org.vamsas.objects.core.Tree getTree(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _treeList.size())) { + throw new IndexOutOfBoundsException("getTree: Index value '"+index+"' not in range [0.."+_treeList.size()+ "]"); + } + + return (org.vamsas.objects.core.Tree) _treeList.elementAt(index); + } //-- org.vamsas.objects.core.Tree getTree(int) + + /** + * Method getTree + * + * + * + * @return Tree + */ + public org.vamsas.objects.core.Tree[] getTree() + { + int size = _treeList.size(); + org.vamsas.objects.core.Tree[] mArray = new org.vamsas.objects.core.Tree[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.Tree) _treeList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.Tree[] getTree() + + /** + * Method getTreeCount + * + * + * + * @return int + */ + public int getTreeCount() + { + return _treeList.size(); + } //-- int getTreeCount() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Method removeAlignmentSequence + * + * + * + * @param index + * @return AlignmentSequence + */ + public org.vamsas.objects.core.AlignmentSequence removeAlignmentSequence(int index) + { + java.lang.Object obj = _alignmentSequenceList.elementAt(index); + _alignmentSequenceList.removeElementAt(index); + return (org.vamsas.objects.core.AlignmentSequence) obj; + } //-- org.vamsas.objects.core.AlignmentSequence removeAlignmentSequence(int) + + /** + * Method removeAllAlignmentSequence + * + */ + public void removeAllAlignmentSequence() + { + _alignmentSequenceList.removeAllElements(); + } //-- void removeAllAlignmentSequence() + + /** + * Method removeAllTree + * + */ + public void removeAllTree() + { + _treeList.removeAllElements(); + } //-- void removeAllTree() + + /** + * Method removeTree + * + * + * + * @param index + * @return Tree + */ + public org.vamsas.objects.core.Tree removeTree(int index) + { + java.lang.Object obj = _treeList.elementAt(index); + _treeList.removeElementAt(index); + return (org.vamsas.objects.core.Tree) obj; + } //-- org.vamsas.objects.core.Tree removeTree(int) + + /** + * Sets the value of field 'alignmentAnnotations'. + * + * @param alignmentAnnotations the value of field + * 'alignmentAnnotations'. + */ + public void setAlignmentAnnotations(org.vamsas.objects.core.AlignmentAnnotations alignmentAnnotations) + { + this._alignmentAnnotations = alignmentAnnotations; + } //-- void setAlignmentAnnotations(org.vamsas.objects.core.AlignmentAnnotations) + + /** + * Method setAlignmentSequence + * + * + * + * @param index + * @param vAlignmentSequence + */ + public void setAlignmentSequence(int index, org.vamsas.objects.core.AlignmentSequence vAlignmentSequence) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _alignmentSequenceList.size())) { + throw new IndexOutOfBoundsException("setAlignmentSequence: Index value '"+index+"' not in range [0.."+_alignmentSequenceList.size()+ "]"); + } + _alignmentSequenceList.setElementAt(vAlignmentSequence, index); + } //-- void setAlignmentSequence(int, org.vamsas.objects.core.AlignmentSequence) + + /** + * Method setAlignmentSequence + * + * + * + * @param alignmentSequenceArray + */ + public void setAlignmentSequence(org.vamsas.objects.core.AlignmentSequence[] alignmentSequenceArray) + { + //-- copy array + _alignmentSequenceList.removeAllElements(); + for (int i = 0; i < alignmentSequenceArray.length; i++) { + _alignmentSequenceList.addElement(alignmentSequenceArray[i]); + } + } //-- void setAlignmentSequence(org.vamsas.objects.core.AlignmentSequence) + + /** + * Sets the value of field 'provenance'. + * + * @param provenance the value of field 'provenance'. + */ + public void setProvenance(org.vamsas.objects.core.Provenance provenance) + { + this._provenance = provenance; + } //-- void setProvenance(org.vamsas.objects.core.Provenance) + + /** + * Method setTree + * + * + * + * @param index + * @param vTree + */ + public void setTree(int index, org.vamsas.objects.core.Tree vTree) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _treeList.size())) { + throw new IndexOutOfBoundsException("setTree: Index value '"+index+"' not in range [0.."+_treeList.size()+ "]"); + } + _treeList.setElementAt(vTree, index); + } //-- void setTree(int, org.vamsas.objects.core.Tree) + + /** + * Method setTree + * + * + * + * @param treeArray + */ + public void setTree(org.vamsas.objects.core.Tree[] treeArray) + { + //-- copy array + _treeList.removeAllElements(); + for (int i = 0; i < treeArray.length; i++) { + _treeList.addElement(treeArray[i]); + } + } //-- void setTree(org.vamsas.objects.core.Tree) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Alignment + */ + public static org.vamsas.objects.core.Alignment unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Alignment) Unmarshaller.unmarshal(org.vamsas.objects.core.Alignment.class, reader); + } //-- org.vamsas.objects.core.Alignment unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/AlignmentAnnotations.java b/src/org/vamsas/objects/core/AlignmentAnnotations.java new file mode 100644 index 0000000..7b262d2 --- /dev/null +++ b/src/org/vamsas/objects/core/AlignmentAnnotations.java @@ -0,0 +1,462 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import java.util.Enumeration; +import java.util.Vector; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class AlignmentAnnotations. + * + * @version $Revision$ $Date$ + */ +public class AlignmentAnnotations extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _graph + */ + private boolean _graph; + + /** + * keeps track of state for field: _graph + */ + private boolean _has_graph; + + /** + * Field _annotationElementList + */ + private java.util.Vector _annotationElementList; + + /** + * Field _label + */ + private java.lang.String _label; + + /** + * Field _description + */ + private java.lang.String _description; + + /** + * Field _provenance + */ + private org.vamsas.objects.core.Provenance _provenance; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AlignmentAnnotations() + { + super(); + _annotationElementList = new Vector(); + } //-- org.vamsas.objects.core.AlignmentAnnotations() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addAnnotationElement + * + * + * + * @param vAnnotationElement + */ + public void addAnnotationElement(org.vamsas.objects.core.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + _annotationElementList.addElement(vAnnotationElement); + } //-- void addAnnotationElement(org.vamsas.objects.core.AnnotationElement) + + /** + * Method addAnnotationElement + * + * + * + * @param index + * @param vAnnotationElement + */ + public void addAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + _annotationElementList.insertElementAt(vAnnotationElement, index); + } //-- void addAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) + + /** + * Method deleteGraph + * + */ + public void deleteGraph() + { + this._has_graph= false; + } //-- void deleteGraph() + + /** + * Method enumerateAnnotationElement + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateAnnotationElement() + { + return _annotationElementList.elements(); + } //-- java.util.Enumeration enumerateAnnotationElement() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof AlignmentAnnotations) { + + AlignmentAnnotations temp = (AlignmentAnnotations)obj; + if (this._graph != temp._graph) + return false; + if (this._has_graph != temp._has_graph) + return false; + if (this._annotationElementList != null) { + if (temp._annotationElementList == null) return false; + else if (!(this._annotationElementList.equals(temp._annotationElementList))) + return false; + } + else if (temp._annotationElementList != null) + return false; + if (this._label != null) { + if (temp._label == null) return false; + else if (!(this._label.equals(temp._label))) + return false; + } + else if (temp._label != null) + return false; + if (this._description != null) { + if (temp._description == null) return false; + else if (!(this._description.equals(temp._description))) + return false; + } + else if (temp._description != null) + return false; + if (this._provenance != null) { + if (temp._provenance == null) return false; + else if (!(this._provenance.equals(temp._provenance))) + return false; + } + else if (temp._provenance != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Method getAnnotationElement + * + * + * + * @param index + * @return AnnotationElement + */ + public org.vamsas.objects.core.AnnotationElement getAnnotationElement(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _annotationElementList.size())) { + throw new IndexOutOfBoundsException("getAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]"); + } + + return (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index); + } //-- org.vamsas.objects.core.AnnotationElement getAnnotationElement(int) + + /** + * Method getAnnotationElement + * + * + * + * @return AnnotationElement + */ + public org.vamsas.objects.core.AnnotationElement[] getAnnotationElement() + { + int size = _annotationElementList.size(); + org.vamsas.objects.core.AnnotationElement[] mArray = new org.vamsas.objects.core.AnnotationElement[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.AnnotationElement[] getAnnotationElement() + + /** + * Method getAnnotationElementCount + * + * + * + * @return int + */ + public int getAnnotationElementCount() + { + return _annotationElementList.size(); + } //-- int getAnnotationElementCount() + + /** + * Returns the value of field 'description'. + * + * @return String + * @return the value of field 'description'. + */ + public java.lang.String getDescription() + { + return this._description; + } //-- java.lang.String getDescription() + + /** + * Returns the value of field 'graph'. + * + * @return boolean + * @return the value of field 'graph'. + */ + public boolean getGraph() + { + return this._graph; + } //-- boolean getGraph() + + /** + * Returns the value of field 'label'. + * + * @return String + * @return the value of field 'label'. + */ + public java.lang.String getLabel() + { + return this._label; + } //-- java.lang.String getLabel() + + /** + * Returns the value of field 'provenance'. + * + * @return Provenance + * @return the value of field 'provenance'. + */ + public org.vamsas.objects.core.Provenance getProvenance() + { + return this._provenance; + } //-- org.vamsas.objects.core.Provenance getProvenance() + + /** + * Method hasGraph + * + * + * + * @return boolean + */ + public boolean hasGraph() + { + return this._has_graph; + } //-- boolean hasGraph() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Method removeAllAnnotationElement + * + */ + public void removeAllAnnotationElement() + { + _annotationElementList.removeAllElements(); + } //-- void removeAllAnnotationElement() + + /** + * Method removeAnnotationElement + * + * + * + * @param index + * @return AnnotationElement + */ + public org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int index) + { + java.lang.Object obj = _annotationElementList.elementAt(index); + _annotationElementList.removeElementAt(index); + return (org.vamsas.objects.core.AnnotationElement) obj; + } //-- org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int) + + /** + * Method setAnnotationElement + * + * + * + * @param index + * @param vAnnotationElement + */ + public void setAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _annotationElementList.size())) { + throw new IndexOutOfBoundsException("setAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]"); + } + _annotationElementList.setElementAt(vAnnotationElement, index); + } //-- void setAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) + + /** + * Method setAnnotationElement + * + * + * + * @param annotationElementArray + */ + public void setAnnotationElement(org.vamsas.objects.core.AnnotationElement[] annotationElementArray) + { + //-- copy array + _annotationElementList.removeAllElements(); + for (int i = 0; i < annotationElementArray.length; i++) { + _annotationElementList.addElement(annotationElementArray[i]); + } + } //-- void setAnnotationElement(org.vamsas.objects.core.AnnotationElement) + + /** + * Sets the value of field 'description'. + * + * @param description the value of field 'description'. + */ + public void setDescription(java.lang.String description) + { + this._description = description; + } //-- void setDescription(java.lang.String) + + /** + * Sets the value of field 'graph'. + * + * @param graph the value of field 'graph'. + */ + public void setGraph(boolean graph) + { + this._graph = graph; + this._has_graph = true; + } //-- void setGraph(boolean) + + /** + * Sets the value of field 'label'. + * + * @param label the value of field 'label'. + */ + public void setLabel(java.lang.String label) + { + this._label = label; + } //-- void setLabel(java.lang.String) + + /** + * Sets the value of field 'provenance'. + * + * @param provenance the value of field 'provenance'. + */ + public void setProvenance(org.vamsas.objects.core.Provenance provenance) + { + this._provenance = provenance; + } //-- void setProvenance(org.vamsas.objects.core.Provenance) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return AlignmentAnnotations + */ + public static org.vamsas.objects.core.AlignmentAnnotations unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.AlignmentAnnotations) Unmarshaller.unmarshal(org.vamsas.objects.core.AlignmentAnnotations.class, reader); + } //-- org.vamsas.objects.core.AlignmentAnnotations unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/AlignmentSequence.java b/src/org/vamsas/objects/core/AlignmentSequence.java new file mode 100644 index 0000000..df55b39 --- /dev/null +++ b/src/org/vamsas/objects/core/AlignmentSequence.java @@ -0,0 +1,179 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class AlignmentSequence. + * + * @version $Revision$ $Date$ + */ +public class AlignmentSequence extends org.vamsas.objects.core.SequenceType +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _id + */ + private java.lang.Object _id; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AlignmentSequence() + { + super(); + } //-- org.vamsas.objects.core.AlignmentSequence() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof AlignmentSequence) { + + AlignmentSequence temp = (AlignmentSequence)obj; + if (this._id != null) { + if (temp._id == null) return false; + else if (!(this._id.equals(temp._id))) + return false; + } + else if (temp._id != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'id'. + * + * @return Object + * @return the value of field 'id'. + */ + public java.lang.Object getId() + { + return this._id; + } //-- java.lang.Object getId() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'id'. + * + * @param id the value of field 'id'. + */ + public void setId(java.lang.Object id) + { + this._id = id; + } //-- void setId(java.lang.Object) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return SequenceType + */ + public static org.vamsas.objects.core.SequenceType unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.AlignmentSequence) Unmarshaller.unmarshal(org.vamsas.objects.core.AlignmentSequence.class, reader); + } //-- org.vamsas.objects.core.SequenceType unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/AnnotationElement.java b/src/org/vamsas/objects/core/AnnotationElement.java new file mode 100644 index 0000000..534eb9c --- /dev/null +++ b/src/org/vamsas/objects/core/AnnotationElement.java @@ -0,0 +1,360 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class AnnotationElement. + * + * @version $Revision$ $Date$ + */ +public class AnnotationElement extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _position + */ + private int _position; + + /** + * keeps track of state for field: _position + */ + private boolean _has_position; + + /** + * Field _displayCharacter + */ + private java.lang.String _displayCharacter; + + /** + * Field _description + */ + private java.lang.String _description; + + /** + * Field _secondaryStructure + */ + private java.lang.String _secondaryStructure; + + /** + * Field _value + */ + private float _value; + + /** + * keeps track of state for field: _value + */ + private boolean _has_value; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AnnotationElement() + { + super(); + } //-- org.vamsas.objects.core.AnnotationElement() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deletePosition + * + */ + public void deletePosition() + { + this._has_position= false; + } //-- void deletePosition() + + /** + * Method deleteValue + * + */ + public void deleteValue() + { + this._has_value= false; + } //-- void deleteValue() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof AnnotationElement) { + + AnnotationElement temp = (AnnotationElement)obj; + if (this._position != temp._position) + return false; + if (this._has_position != temp._has_position) + return false; + if (this._displayCharacter != null) { + if (temp._displayCharacter == null) return false; + else if (!(this._displayCharacter.equals(temp._displayCharacter))) + return false; + } + else if (temp._displayCharacter != null) + return false; + if (this._description != null) { + if (temp._description == null) return false; + else if (!(this._description.equals(temp._description))) + return false; + } + else if (temp._description != null) + return false; + if (this._secondaryStructure != null) { + if (temp._secondaryStructure == null) return false; + else if (!(this._secondaryStructure.equals(temp._secondaryStructure))) + return false; + } + else if (temp._secondaryStructure != null) + return false; + if (this._value != temp._value) + return false; + if (this._has_value != temp._has_value) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'description'. + * + * @return String + * @return the value of field 'description'. + */ + public java.lang.String getDescription() + { + return this._description; + } //-- java.lang.String getDescription() + + /** + * Returns the value of field 'displayCharacter'. + * + * @return String + * @return the value of field 'displayCharacter'. + */ + public java.lang.String getDisplayCharacter() + { + return this._displayCharacter; + } //-- java.lang.String getDisplayCharacter() + + /** + * Returns the value of field 'position'. + * + * @return int + * @return the value of field 'position'. + */ + public int getPosition() + { + return this._position; + } //-- int getPosition() + + /** + * Returns the value of field 'secondaryStructure'. + * + * @return String + * @return the value of field 'secondaryStructure'. + */ + public java.lang.String getSecondaryStructure() + { + return this._secondaryStructure; + } //-- java.lang.String getSecondaryStructure() + + /** + * Returns the value of field 'value'. + * + * @return float + * @return the value of field 'value'. + */ + public float getValue() + { + return this._value; + } //-- float getValue() + + /** + * Method hasPosition + * + * + * + * @return boolean + */ + public boolean hasPosition() + { + return this._has_position; + } //-- boolean hasPosition() + + /** + * Method hasValue + * + * + * + * @return boolean + */ + public boolean hasValue() + { + return this._has_value; + } //-- boolean hasValue() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'description'. + * + * @param description the value of field 'description'. + */ + public void setDescription(java.lang.String description) + { + this._description = description; + } //-- void setDescription(java.lang.String) + + /** + * Sets the value of field 'displayCharacter'. + * + * @param displayCharacter the value of field 'displayCharacter' + */ + public void setDisplayCharacter(java.lang.String displayCharacter) + { + this._displayCharacter = displayCharacter; + } //-- void setDisplayCharacter(java.lang.String) + + /** + * Sets the value of field 'position'. + * + * @param position the value of field 'position'. + */ + public void setPosition(int position) + { + this._position = position; + this._has_position = true; + } //-- void setPosition(int) + + /** + * Sets the value of field 'secondaryStructure'. + * + * @param secondaryStructure the value of field + * 'secondaryStructure'. + */ + public void setSecondaryStructure(java.lang.String secondaryStructure) + { + this._secondaryStructure = secondaryStructure; + } //-- void setSecondaryStructure(java.lang.String) + + /** + * Sets the value of field 'value'. + * + * @param value the value of field 'value'. + */ + public void setValue(float value) + { + this._value = value; + this._has_value = true; + } //-- void setValue(float) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return AnnotationElement + */ + public static org.vamsas.objects.core.AnnotationElement unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.AnnotationElement) Unmarshaller.unmarshal(org.vamsas.objects.core.AnnotationElement.class, reader); + } //-- org.vamsas.objects.core.AnnotationElement unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/Application.java b/src/org/vamsas/objects/core/Application.java new file mode 100644 index 0000000..261bffd --- /dev/null +++ b/src/org/vamsas/objects/core/Application.java @@ -0,0 +1,212 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Application. + * + * @version $Revision$ $Date$ + */ +public class Application extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _version + */ + private java.lang.Object _version; + + /** + * Field _name + */ + private java.lang.Object _name; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Application() + { + super(); + } //-- org.vamsas.objects.core.Application() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Application) { + + Application temp = (Application)obj; + if (this._version != null) { + if (temp._version == null) return false; + else if (!(this._version.equals(temp._version))) + return false; + } + else if (temp._version != null) + return false; + if (this._name != null) { + if (temp._name == null) return false; + else if (!(this._name.equals(temp._name))) + return false; + } + else if (temp._name != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'name'. + * + * @return Object + * @return the value of field 'name'. + */ + public java.lang.Object getName() + { + return this._name; + } //-- java.lang.Object getName() + + /** + * Returns the value of field 'version'. + * + * @return Object + * @return the value of field 'version'. + */ + public java.lang.Object getVersion() + { + return this._version; + } //-- java.lang.Object getVersion() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName(java.lang.Object name) + { + this._name = name; + } //-- void setName(java.lang.Object) + + /** + * Sets the value of field 'version'. + * + * @param version the value of field 'version'. + */ + public void setVersion(java.lang.Object version) + { + this._version = version; + } //-- void setVersion(java.lang.Object) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Application + */ + public static org.vamsas.objects.core.Application unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Application) Unmarshaller.unmarshal(org.vamsas.objects.core.Application.class, reader); + } //-- org.vamsas.objects.core.Application unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/ApplicationData.java b/src/org/vamsas/objects/core/ApplicationData.java new file mode 100644 index 0000000..6e720b2 --- /dev/null +++ b/src/org/vamsas/objects/core/ApplicationData.java @@ -0,0 +1,179 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class ApplicationData. + * + * @version $Revision$ $Date$ + */ +public class ApplicationData extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _application + */ + private org.vamsas.objects.core.Application _application; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ApplicationData() + { + super(); + } //-- org.vamsas.objects.core.ApplicationData() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof ApplicationData) { + + ApplicationData temp = (ApplicationData)obj; + if (this._application != null) { + if (temp._application == null) return false; + else if (!(this._application.equals(temp._application))) + return false; + } + else if (temp._application != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'application'. + * + * @return Application + * @return the value of field 'application'. + */ + public org.vamsas.objects.core.Application getApplication() + { + return this._application; + } //-- org.vamsas.objects.core.Application getApplication() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'application'. + * + * @param application the value of field 'application'. + */ + public void setApplication(org.vamsas.objects.core.Application application) + { + this._application = application; + } //-- void setApplication(org.vamsas.objects.core.Application) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return ApplicationData + */ + public static org.vamsas.objects.core.ApplicationData unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.ApplicationData) Unmarshaller.unmarshal(org.vamsas.objects.core.ApplicationData.class, reader); + } //-- org.vamsas.objects.core.ApplicationData unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/DbRef.java b/src/org/vamsas/objects/core/DbRef.java new file mode 100644 index 0000000..c65d466 --- /dev/null +++ b/src/org/vamsas/objects/core/DbRef.java @@ -0,0 +1,245 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class DbRef. + * + * @version $Revision$ $Date$ + */ +public class DbRef extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _source + */ + private java.lang.Object _source; + + /** + * Field _version + */ + private java.lang.Object _version; + + /** + * Field _accessionId + */ + private java.lang.Object _accessionId; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public DbRef() + { + super(); + } //-- org.vamsas.objects.core.DbRef() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof DbRef) { + + DbRef temp = (DbRef)obj; + if (this._source != null) { + if (temp._source == null) return false; + else if (!(this._source.equals(temp._source))) + return false; + } + else if (temp._source != null) + return false; + if (this._version != null) { + if (temp._version == null) return false; + else if (!(this._version.equals(temp._version))) + return false; + } + else if (temp._version != null) + return false; + if (this._accessionId != null) { + if (temp._accessionId == null) return false; + else if (!(this._accessionId.equals(temp._accessionId))) + return false; + } + else if (temp._accessionId != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'accessionId'. + * + * @return Object + * @return the value of field 'accessionId'. + */ + public java.lang.Object getAccessionId() + { + return this._accessionId; + } //-- java.lang.Object getAccessionId() + + /** + * Returns the value of field 'source'. + * + * @return Object + * @return the value of field 'source'. + */ + public java.lang.Object getSource() + { + return this._source; + } //-- java.lang.Object getSource() + + /** + * Returns the value of field 'version'. + * + * @return Object + * @return the value of field 'version'. + */ + public java.lang.Object getVersion() + { + return this._version; + } //-- java.lang.Object getVersion() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'accessionId'. + * + * @param accessionId the value of field 'accessionId'. + */ + public void setAccessionId(java.lang.Object accessionId) + { + this._accessionId = accessionId; + } //-- void setAccessionId(java.lang.Object) + + /** + * Sets the value of field 'source'. + * + * @param source the value of field 'source'. + */ + public void setSource(java.lang.Object source) + { + this._source = source; + } //-- void setSource(java.lang.Object) + + /** + * Sets the value of field 'version'. + * + * @param version the value of field 'version'. + */ + public void setVersion(java.lang.Object version) + { + this._version = version; + } //-- void setVersion(java.lang.Object) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return DbRef + */ + public static org.vamsas.objects.core.DbRef unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.DbRef) Unmarshaller.unmarshal(org.vamsas.objects.core.DbRef.class, reader); + } //-- org.vamsas.objects.core.DbRef unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/Entry.java b/src/org/vamsas/objects/core/Entry.java new file mode 100644 index 0000000..bfea18e --- /dev/null +++ b/src/org/vamsas/objects/core/Entry.java @@ -0,0 +1,245 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Entry. + * + * @version $Revision$ $Date$ + */ +public class Entry extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _user + */ + private java.lang.String _user; + + /** + * Field _action + */ + private java.lang.String _action; + + /** + * Field _date + */ + private org.exolab.castor.types.Date _date; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Entry() + { + super(); + } //-- org.vamsas.objects.core.Entry() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Entry) { + + Entry temp = (Entry)obj; + if (this._user != null) { + if (temp._user == null) return false; + else if (!(this._user.equals(temp._user))) + return false; + } + else if (temp._user != null) + return false; + if (this._action != null) { + if (temp._action == null) return false; + else if (!(this._action.equals(temp._action))) + return false; + } + else if (temp._action != null) + return false; + if (this._date != null) { + if (temp._date == null) return false; + else if (!(this._date.equals(temp._date))) + return false; + } + else if (temp._date != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'action'. + * + * @return String + * @return the value of field 'action'. + */ + public java.lang.String getAction() + { + return this._action; + } //-- java.lang.String getAction() + + /** + * Returns the value of field 'date'. + * + * @return Date + * @return the value of field 'date'. + */ + public org.exolab.castor.types.Date getDate() + { + return this._date; + } //-- org.exolab.castor.types.Date getDate() + + /** + * Returns the value of field 'user'. + * + * @return String + * @return the value of field 'user'. + */ + public java.lang.String getUser() + { + return this._user; + } //-- java.lang.String getUser() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'action'. + * + * @param action the value of field 'action'. + */ + public void setAction(java.lang.String action) + { + this._action = action; + } //-- void setAction(java.lang.String) + + /** + * Sets the value of field 'date'. + * + * @param date the value of field 'date'. + */ + public void setDate(org.exolab.castor.types.Date date) + { + this._date = date; + } //-- void setDate(org.exolab.castor.types.Date) + + /** + * Sets the value of field 'user'. + * + * @param user the value of field 'user'. + */ + public void setUser(java.lang.String user) + { + this._user = user; + } //-- void setUser(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Entry + */ + public static org.vamsas.objects.core.Entry unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Entry) Unmarshaller.unmarshal(org.vamsas.objects.core.Entry.class, reader); + } //-- org.vamsas.objects.core.Entry unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/LockFile.java b/src/org/vamsas/objects/core/LockFile.java new file mode 100644 index 0000000..0d59af3 --- /dev/null +++ b/src/org/vamsas/objects/core/LockFile.java @@ -0,0 +1,182 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class LockFile. + * + * @version $Revision$ $Date$ + */ +public class LockFile extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * internal content storage + */ + private java.lang.String _content = ""; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public LockFile() + { + super(); + setContent(""); + } //-- org.vamsas.objects.core.LockFile() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof LockFile) { + + LockFile temp = (LockFile)obj; + if (this._content != null) { + if (temp._content == null) return false; + else if (!(this._content.equals(temp._content))) + return false; + } + else if (temp._content != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'content'. The field 'content' + * has the following description: internal content storage + * + * @return String + * @return the value of field 'content'. + */ + public java.lang.String getContent() + { + return this._content; + } //-- java.lang.String getContent() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'content'. The field 'content' has + * the following description: internal content storage + * + * @param content the value of field 'content'. + */ + public void setContent(java.lang.String content) + { + this._content = content; + } //-- void setContent(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return LockFile + */ + public static org.vamsas.objects.core.LockFile unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.LockFile) Unmarshaller.unmarshal(org.vamsas.objects.core.LockFile.class, reader); + } //-- org.vamsas.objects.core.LockFile unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/Provenance.java b/src/org/vamsas/objects/core/Provenance.java new file mode 100644 index 0000000..ed09008 --- /dev/null +++ b/src/org/vamsas/objects/core/Provenance.java @@ -0,0 +1,306 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import java.util.Enumeration; +import java.util.Vector; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Provenance. + * + * @version $Revision$ $Date$ + */ +public class Provenance extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _items + */ + private java.util.Vector _items; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Provenance() + { + super(); + _items = new Vector(); + } //-- org.vamsas.objects.core.Provenance() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addProvenanceItem + * + * + * + * @param vProvenanceItem + */ + public void addProvenanceItem(org.vamsas.objects.core.ProvenanceItem vProvenanceItem) + throws java.lang.IndexOutOfBoundsException + { + _items.addElement(vProvenanceItem); + } //-- void addProvenanceItem(org.vamsas.objects.core.ProvenanceItem) + + /** + * Method addProvenanceItem + * + * + * + * @param index + * @param vProvenanceItem + */ + public void addProvenanceItem(int index, org.vamsas.objects.core.ProvenanceItem vProvenanceItem) + throws java.lang.IndexOutOfBoundsException + { + _items.insertElementAt(vProvenanceItem, index); + } //-- void addProvenanceItem(int, org.vamsas.objects.core.ProvenanceItem) + + /** + * Method enumerateProvenanceItem + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateProvenanceItem() + { + return _items.elements(); + } //-- java.util.Enumeration enumerateProvenanceItem() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Provenance) { + + Provenance temp = (Provenance)obj; + if (this._items != null) { + if (temp._items == null) return false; + else if (!(this._items.equals(temp._items))) + return false; + } + else if (temp._items != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Method getProvenanceItem + * + * + * + * @param index + * @return ProvenanceItem + */ + public org.vamsas.objects.core.ProvenanceItem getProvenanceItem(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _items.size())) { + throw new IndexOutOfBoundsException("getProvenanceItem: Index value '"+index+"' not in range [0.."+_items.size()+ "]"); + } + + return (org.vamsas.objects.core.ProvenanceItem) _items.elementAt(index); + } //-- org.vamsas.objects.core.ProvenanceItem getProvenanceItem(int) + + /** + * Method getProvenanceItem + * + * + * + * @return ProvenanceItem + */ + public org.vamsas.objects.core.ProvenanceItem[] getProvenanceItem() + { + int size = _items.size(); + org.vamsas.objects.core.ProvenanceItem[] mArray = new org.vamsas.objects.core.ProvenanceItem[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.ProvenanceItem) _items.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.ProvenanceItem[] getProvenanceItem() + + /** + * Method getProvenanceItemCount + * + * + * + * @return int + */ + public int getProvenanceItemCount() + { + return _items.size(); + } //-- int getProvenanceItemCount() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Method removeAllProvenanceItem + * + */ + public void removeAllProvenanceItem() + { + _items.removeAllElements(); + } //-- void removeAllProvenanceItem() + + /** + * Method removeProvenanceItem + * + * + * + * @param index + * @return ProvenanceItem + */ + public org.vamsas.objects.core.ProvenanceItem removeProvenanceItem(int index) + { + java.lang.Object obj = _items.elementAt(index); + _items.removeElementAt(index); + return (org.vamsas.objects.core.ProvenanceItem) obj; + } //-- org.vamsas.objects.core.ProvenanceItem removeProvenanceItem(int) + + /** + * Method setProvenanceItem + * + * + * + * @param index + * @param vProvenanceItem + */ + public void setProvenanceItem(int index, org.vamsas.objects.core.ProvenanceItem vProvenanceItem) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _items.size())) { + throw new IndexOutOfBoundsException("setProvenanceItem: Index value '"+index+"' not in range [0.."+_items.size()+ "]"); + } + _items.setElementAt(vProvenanceItem, index); + } //-- void setProvenanceItem(int, org.vamsas.objects.core.ProvenanceItem) + + /** + * Method setProvenanceItem + * + * + * + * @param provenanceItemArray + */ + public void setProvenanceItem(org.vamsas.objects.core.ProvenanceItem[] provenanceItemArray) + { + //-- copy array + _items.removeAllElements(); + for (int i = 0; i < provenanceItemArray.length; i++) { + _items.addElement(provenanceItemArray[i]); + } + } //-- void setProvenanceItem(org.vamsas.objects.core.ProvenanceItem) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Provenance + */ + public static org.vamsas.objects.core.Provenance unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Provenance) Unmarshaller.unmarshal(org.vamsas.objects.core.Provenance.class, reader); + } //-- org.vamsas.objects.core.Provenance unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/ProvenanceItem.java b/src/org/vamsas/objects/core/ProvenanceItem.java new file mode 100644 index 0000000..390895d --- /dev/null +++ b/src/org/vamsas/objects/core/ProvenanceItem.java @@ -0,0 +1,71 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.Serializable; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; + +/** + * Class ProvenanceItem. + * + * @version $Revision$ $Date$ + */ +public class ProvenanceItem implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _entry + */ + private org.vamsas.objects.core.Entry _entry; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ProvenanceItem() + { + super(); + } //-- org.vamsas.objects.core.ProvenanceItem() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'entry'. + * + * @return Entry + * @return the value of field 'entry'. + */ + public org.vamsas.objects.core.Entry getEntry() + { + return this._entry; + } //-- org.vamsas.objects.core.Entry getEntry() + + /** + * Sets the value of field 'entry'. + * + * @param entry the value of field 'entry'. + */ + public void setEntry(org.vamsas.objects.core.Entry entry) + { + this._entry = entry; + } //-- void setEntry(org.vamsas.objects.core.Entry) + +} diff --git a/src/org/vamsas/objects/core/Sequence.java b/src/org/vamsas/objects/core/Sequence.java new file mode 100644 index 0000000..e24fcca --- /dev/null +++ b/src/org/vamsas/objects/core/Sequence.java @@ -0,0 +1,212 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Sequence. + * + * @version $Revision$ $Date$ + */ +public class Sequence extends org.vamsas.objects.core.SequenceType +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _dictionary + */ + private java.lang.String _dictionary; + + /** + * Field _id + */ + private java.lang.String _id; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Sequence() + { + super(); + } //-- org.vamsas.objects.core.Sequence() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Sequence) { + + Sequence temp = (Sequence)obj; + if (this._dictionary != null) { + if (temp._dictionary == null) return false; + else if (!(this._dictionary.equals(temp._dictionary))) + return false; + } + else if (temp._dictionary != null) + return false; + if (this._id != null) { + if (temp._id == null) return false; + else if (!(this._id.equals(temp._id))) + return false; + } + else if (temp._id != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'dictionary'. + * + * @return String + * @return the value of field 'dictionary'. + */ + public java.lang.String getDictionary() + { + return this._dictionary; + } //-- java.lang.String getDictionary() + + /** + * Returns the value of field 'id'. + * + * @return String + * @return the value of field 'id'. + */ + public java.lang.String getId() + { + return this._id; + } //-- java.lang.String getId() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'dictionary'. + * + * @param dictionary the value of field 'dictionary'. + */ + public void setDictionary(java.lang.String dictionary) + { + this._dictionary = dictionary; + } //-- void setDictionary(java.lang.String) + + /** + * Sets the value of field 'id'. + * + * @param id the value of field 'id'. + */ + public void setId(java.lang.String id) + { + this._id = id; + } //-- void setId(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return SequenceType + */ + public static org.vamsas.objects.core.SequenceType unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Sequence) Unmarshaller.unmarshal(org.vamsas.objects.core.Sequence.class, reader); + } //-- org.vamsas.objects.core.SequenceType unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/SequenceSet.java b/src/org/vamsas/objects/core/SequenceSet.java new file mode 100644 index 0000000..1402e02 --- /dev/null +++ b/src/org/vamsas/objects/core/SequenceSet.java @@ -0,0 +1,778 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import java.util.Enumeration; +import java.util.Vector; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class SequenceSet. + * + * @version $Revision$ $Date$ + */ +public class SequenceSet extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _gapChar + */ + private java.lang.String _gapChar; + + /** + * Field _aligned + */ + private boolean _aligned; + + /** + * keeps track of state for field: _aligned + */ + private boolean _has_aligned; + + /** + * Field _sequenceList + */ + private java.util.Vector _sequenceList; + + /** + * Field _sequenceSetAnnotationsList + */ + private java.util.Vector _sequenceSetAnnotationsList; + + /** + * Field _alignmentList + */ + private java.util.Vector _alignmentList; + + /** + * Field _tree + */ + private org.vamsas.objects.core.Tree _tree; + + /** + * Field _provenance + */ + private org.vamsas.objects.core.Provenance _provenance; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceSet() + { + super(); + _sequenceList = new Vector(); + _sequenceSetAnnotationsList = new Vector(); + _alignmentList = new Vector(); + } //-- org.vamsas.objects.core.SequenceSet() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addAlignment + * + * + * + * @param vAlignment + */ + public void addAlignment(org.vamsas.objects.core.Alignment vAlignment) + throws java.lang.IndexOutOfBoundsException + { + _alignmentList.addElement(vAlignment); + } //-- void addAlignment(org.vamsas.objects.core.Alignment) + + /** + * Method addAlignment + * + * + * + * @param index + * @param vAlignment + */ + public void addAlignment(int index, org.vamsas.objects.core.Alignment vAlignment) + throws java.lang.IndexOutOfBoundsException + { + _alignmentList.insertElementAt(vAlignment, index); + } //-- void addAlignment(int, org.vamsas.objects.core.Alignment) + + /** + * Method addSequence + * + * + * + * @param vSequence + */ + public void addSequence(org.vamsas.objects.core.Sequence vSequence) + throws java.lang.IndexOutOfBoundsException + { + _sequenceList.addElement(vSequence); + } //-- void addSequence(org.vamsas.objects.core.Sequence) + + /** + * Method addSequence + * + * + * + * @param index + * @param vSequence + */ + public void addSequence(int index, org.vamsas.objects.core.Sequence vSequence) + throws java.lang.IndexOutOfBoundsException + { + _sequenceList.insertElementAt(vSequence, index); + } //-- void addSequence(int, org.vamsas.objects.core.Sequence) + + /** + * Method addSequenceSetAnnotations + * + * + * + * @param vSequenceSetAnnotations + */ + public void addSequenceSetAnnotations(org.vamsas.objects.core.SequenceSetAnnotations vSequenceSetAnnotations) + throws java.lang.IndexOutOfBoundsException + { + _sequenceSetAnnotationsList.addElement(vSequenceSetAnnotations); + } //-- void addSequenceSetAnnotations(org.vamsas.objects.core.SequenceSetAnnotations) + + /** + * Method addSequenceSetAnnotations + * + * + * + * @param index + * @param vSequenceSetAnnotations + */ + public void addSequenceSetAnnotations(int index, org.vamsas.objects.core.SequenceSetAnnotations vSequenceSetAnnotations) + throws java.lang.IndexOutOfBoundsException + { + _sequenceSetAnnotationsList.insertElementAt(vSequenceSetAnnotations, index); + } //-- void addSequenceSetAnnotations(int, org.vamsas.objects.core.SequenceSetAnnotations) + + /** + * Method deleteAligned + * + */ + public void deleteAligned() + { + this._has_aligned= false; + } //-- void deleteAligned() + + /** + * Method enumerateAlignment + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateAlignment() + { + return _alignmentList.elements(); + } //-- java.util.Enumeration enumerateAlignment() + + /** + * Method enumerateSequence + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateSequence() + { + return _sequenceList.elements(); + } //-- java.util.Enumeration enumerateSequence() + + /** + * Method enumerateSequenceSetAnnotations + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateSequenceSetAnnotations() + { + return _sequenceSetAnnotationsList.elements(); + } //-- java.util.Enumeration enumerateSequenceSetAnnotations() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof SequenceSet) { + + SequenceSet temp = (SequenceSet)obj; + if (this._gapChar != null) { + if (temp._gapChar == null) return false; + else if (!(this._gapChar.equals(temp._gapChar))) + return false; + } + else if (temp._gapChar != null) + return false; + if (this._aligned != temp._aligned) + return false; + if (this._has_aligned != temp._has_aligned) + return false; + if (this._sequenceList != null) { + if (temp._sequenceList == null) return false; + else if (!(this._sequenceList.equals(temp._sequenceList))) + return false; + } + else if (temp._sequenceList != null) + return false; + if (this._sequenceSetAnnotationsList != null) { + if (temp._sequenceSetAnnotationsList == null) return false; + else if (!(this._sequenceSetAnnotationsList.equals(temp._sequenceSetAnnotationsList))) + return false; + } + else if (temp._sequenceSetAnnotationsList != null) + return false; + if (this._alignmentList != null) { + if (temp._alignmentList == null) return false; + else if (!(this._alignmentList.equals(temp._alignmentList))) + return false; + } + else if (temp._alignmentList != null) + return false; + if (this._tree != null) { + if (temp._tree == null) return false; + else if (!(this._tree.equals(temp._tree))) + return false; + } + else if (temp._tree != null) + return false; + if (this._provenance != null) { + if (temp._provenance == null) return false; + else if (!(this._provenance.equals(temp._provenance))) + return false; + } + else if (temp._provenance != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'aligned'. + * + * @return boolean + * @return the value of field 'aligned'. + */ + public boolean getAligned() + { + return this._aligned; + } //-- boolean getAligned() + + /** + * Method getAlignment + * + * + * + * @param index + * @return Alignment + */ + public org.vamsas.objects.core.Alignment getAlignment(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _alignmentList.size())) { + throw new IndexOutOfBoundsException("getAlignment: Index value '"+index+"' not in range [0.."+_alignmentList.size()+ "]"); + } + + return (org.vamsas.objects.core.Alignment) _alignmentList.elementAt(index); + } //-- org.vamsas.objects.core.Alignment getAlignment(int) + + /** + * Method getAlignment + * + * + * + * @return Alignment + */ + public org.vamsas.objects.core.Alignment[] getAlignment() + { + int size = _alignmentList.size(); + org.vamsas.objects.core.Alignment[] mArray = new org.vamsas.objects.core.Alignment[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.Alignment) _alignmentList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.Alignment[] getAlignment() + + /** + * Method getAlignmentCount + * + * + * + * @return int + */ + public int getAlignmentCount() + { + return _alignmentList.size(); + } //-- int getAlignmentCount() + + /** + * Returns the value of field 'gapChar'. + * + * @return String + * @return the value of field 'gapChar'. + */ + public java.lang.String getGapChar() + { + return this._gapChar; + } //-- java.lang.String getGapChar() + + /** + * Returns the value of field 'provenance'. + * + * @return Provenance + * @return the value of field 'provenance'. + */ + public org.vamsas.objects.core.Provenance getProvenance() + { + return this._provenance; + } //-- org.vamsas.objects.core.Provenance getProvenance() + + /** + * Method getSequence + * + * + * + * @param index + * @return Sequence + */ + public org.vamsas.objects.core.Sequence getSequence(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _sequenceList.size())) { + throw new IndexOutOfBoundsException("getSequence: Index value '"+index+"' not in range [0.."+_sequenceList.size()+ "]"); + } + + return (org.vamsas.objects.core.Sequence) _sequenceList.elementAt(index); + } //-- org.vamsas.objects.core.Sequence getSequence(int) + + /** + * Method getSequence + * + * + * + * @return Sequence + */ + public org.vamsas.objects.core.Sequence[] getSequence() + { + int size = _sequenceList.size(); + org.vamsas.objects.core.Sequence[] mArray = new org.vamsas.objects.core.Sequence[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.Sequence) _sequenceList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.Sequence[] getSequence() + + /** + * Method getSequenceCount + * + * + * + * @return int + */ + public int getSequenceCount() + { + return _sequenceList.size(); + } //-- int getSequenceCount() + + /** + * Method getSequenceSetAnnotations + * + * + * + * @param index + * @return SequenceSetAnnotations + */ + public org.vamsas.objects.core.SequenceSetAnnotations getSequenceSetAnnotations(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _sequenceSetAnnotationsList.size())) { + throw new IndexOutOfBoundsException("getSequenceSetAnnotations: Index value '"+index+"' not in range [0.."+_sequenceSetAnnotationsList.size()+ "]"); + } + + return (org.vamsas.objects.core.SequenceSetAnnotations) _sequenceSetAnnotationsList.elementAt(index); + } //-- org.vamsas.objects.core.SequenceSetAnnotations getSequenceSetAnnotations(int) + + /** + * Method getSequenceSetAnnotations + * + * + * + * @return SequenceSetAnnotations + */ + public org.vamsas.objects.core.SequenceSetAnnotations[] getSequenceSetAnnotations() + { + int size = _sequenceSetAnnotationsList.size(); + org.vamsas.objects.core.SequenceSetAnnotations[] mArray = new org.vamsas.objects.core.SequenceSetAnnotations[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.SequenceSetAnnotations) _sequenceSetAnnotationsList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.SequenceSetAnnotations[] getSequenceSetAnnotations() + + /** + * Method getSequenceSetAnnotationsCount + * + * + * + * @return int + */ + public int getSequenceSetAnnotationsCount() + { + return _sequenceSetAnnotationsList.size(); + } //-- int getSequenceSetAnnotationsCount() + + /** + * Returns the value of field 'tree'. + * + * @return Tree + * @return the value of field 'tree'. + */ + public org.vamsas.objects.core.Tree getTree() + { + return this._tree; + } //-- org.vamsas.objects.core.Tree getTree() + + /** + * Method hasAligned + * + * + * + * @return boolean + */ + public boolean hasAligned() + { + return this._has_aligned; + } //-- boolean hasAligned() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Method removeAlignment + * + * + * + * @param index + * @return Alignment + */ + public org.vamsas.objects.core.Alignment removeAlignment(int index) + { + java.lang.Object obj = _alignmentList.elementAt(index); + _alignmentList.removeElementAt(index); + return (org.vamsas.objects.core.Alignment) obj; + } //-- org.vamsas.objects.core.Alignment removeAlignment(int) + + /** + * Method removeAllAlignment + * + */ + public void removeAllAlignment() + { + _alignmentList.removeAllElements(); + } //-- void removeAllAlignment() + + /** + * Method removeAllSequence + * + */ + public void removeAllSequence() + { + _sequenceList.removeAllElements(); + } //-- void removeAllSequence() + + /** + * Method removeAllSequenceSetAnnotations + * + */ + public void removeAllSequenceSetAnnotations() + { + _sequenceSetAnnotationsList.removeAllElements(); + } //-- void removeAllSequenceSetAnnotations() + + /** + * Method removeSequence + * + * + * + * @param index + * @return Sequence + */ + public org.vamsas.objects.core.Sequence removeSequence(int index) + { + java.lang.Object obj = _sequenceList.elementAt(index); + _sequenceList.removeElementAt(index); + return (org.vamsas.objects.core.Sequence) obj; + } //-- org.vamsas.objects.core.Sequence removeSequence(int) + + /** + * Method removeSequenceSetAnnotations + * + * + * + * @param index + * @return SequenceSetAnnotations + */ + public org.vamsas.objects.core.SequenceSetAnnotations removeSequenceSetAnnotations(int index) + { + java.lang.Object obj = _sequenceSetAnnotationsList.elementAt(index); + _sequenceSetAnnotationsList.removeElementAt(index); + return (org.vamsas.objects.core.SequenceSetAnnotations) obj; + } //-- org.vamsas.objects.core.SequenceSetAnnotations removeSequenceSetAnnotations(int) + + /** + * Sets the value of field 'aligned'. + * + * @param aligned the value of field 'aligned'. + */ + public void setAligned(boolean aligned) + { + this._aligned = aligned; + this._has_aligned = true; + } //-- void setAligned(boolean) + + /** + * Method setAlignment + * + * + * + * @param index + * @param vAlignment + */ + public void setAlignment(int index, org.vamsas.objects.core.Alignment vAlignment) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _alignmentList.size())) { + throw new IndexOutOfBoundsException("setAlignment: Index value '"+index+"' not in range [0.."+_alignmentList.size()+ "]"); + } + _alignmentList.setElementAt(vAlignment, index); + } //-- void setAlignment(int, org.vamsas.objects.core.Alignment) + + /** + * Method setAlignment + * + * + * + * @param alignmentArray + */ + public void setAlignment(org.vamsas.objects.core.Alignment[] alignmentArray) + { + //-- copy array + _alignmentList.removeAllElements(); + for (int i = 0; i < alignmentArray.length; i++) { + _alignmentList.addElement(alignmentArray[i]); + } + } //-- void setAlignment(org.vamsas.objects.core.Alignment) + + /** + * Sets the value of field 'gapChar'. + * + * @param gapChar the value of field 'gapChar'. + */ + public void setGapChar(java.lang.String gapChar) + { + this._gapChar = gapChar; + } //-- void setGapChar(java.lang.String) + + /** + * Sets the value of field 'provenance'. + * + * @param provenance the value of field 'provenance'. + */ + public void setProvenance(org.vamsas.objects.core.Provenance provenance) + { + this._provenance = provenance; + } //-- void setProvenance(org.vamsas.objects.core.Provenance) + + /** + * Method setSequence + * + * + * + * @param index + * @param vSequence + */ + public void setSequence(int index, org.vamsas.objects.core.Sequence vSequence) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _sequenceList.size())) { + throw new IndexOutOfBoundsException("setSequence: Index value '"+index+"' not in range [0.."+_sequenceList.size()+ "]"); + } + _sequenceList.setElementAt(vSequence, index); + } //-- void setSequence(int, org.vamsas.objects.core.Sequence) + + /** + * Method setSequence + * + * + * + * @param sequenceArray + */ + public void setSequence(org.vamsas.objects.core.Sequence[] sequenceArray) + { + //-- copy array + _sequenceList.removeAllElements(); + for (int i = 0; i < sequenceArray.length; i++) { + _sequenceList.addElement(sequenceArray[i]); + } + } //-- void setSequence(org.vamsas.objects.core.Sequence) + + /** + * Method setSequenceSetAnnotations + * + * + * + * @param index + * @param vSequenceSetAnnotations + */ + public void setSequenceSetAnnotations(int index, org.vamsas.objects.core.SequenceSetAnnotations vSequenceSetAnnotations) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _sequenceSetAnnotationsList.size())) { + throw new IndexOutOfBoundsException("setSequenceSetAnnotations: Index value '"+index+"' not in range [0.."+_sequenceSetAnnotationsList.size()+ "]"); + } + _sequenceSetAnnotationsList.setElementAt(vSequenceSetAnnotations, index); + } //-- void setSequenceSetAnnotations(int, org.vamsas.objects.core.SequenceSetAnnotations) + + /** + * Method setSequenceSetAnnotations + * + * + * + * @param sequenceSetAnnotationsArray + */ + public void setSequenceSetAnnotations(org.vamsas.objects.core.SequenceSetAnnotations[] sequenceSetAnnotationsArray) + { + //-- copy array + _sequenceSetAnnotationsList.removeAllElements(); + for (int i = 0; i < sequenceSetAnnotationsArray.length; i++) { + _sequenceSetAnnotationsList.addElement(sequenceSetAnnotationsArray[i]); + } + } //-- void setSequenceSetAnnotations(org.vamsas.objects.core.SequenceSetAnnotations) + + /** + * Sets the value of field 'tree'. + * + * @param tree the value of field 'tree'. + */ + public void setTree(org.vamsas.objects.core.Tree tree) + { + this._tree = tree; + } //-- void setTree(org.vamsas.objects.core.Tree) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return SequenceSet + */ + public static org.vamsas.objects.core.SequenceSet unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.SequenceSet) Unmarshaller.unmarshal(org.vamsas.objects.core.SequenceSet.class, reader); + } //-- org.vamsas.objects.core.SequenceSet unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/SequenceSetAnnotations.java b/src/org/vamsas/objects/core/SequenceSetAnnotations.java new file mode 100644 index 0000000..092dbba --- /dev/null +++ b/src/org/vamsas/objects/core/SequenceSetAnnotations.java @@ -0,0 +1,537 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import java.util.Enumeration; +import java.util.Vector; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class SequenceSetAnnotations. + * + * @version $Revision$ $Date$ + */ +public class SequenceSetAnnotations extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _type + */ + private java.lang.String _type; + + /** + * Field _end + */ + private java.lang.String _end; + + /** + * Field _begin + */ + private java.lang.String _begin; + + /** + * Field _seqRef + */ + private java.lang.Object _seqRef; + + /** + * Field _description + */ + private java.lang.String _description; + + /** + * Field _status + */ + private java.lang.String _status; + + /** + * Field _annotationElementList + */ + private java.util.Vector _annotationElementList; + + /** + * Field _provenance + */ + private org.vamsas.objects.core.Provenance _provenance; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceSetAnnotations() + { + super(); + _annotationElementList = new Vector(); + } //-- org.vamsas.objects.core.SequenceSetAnnotations() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addAnnotationElement + * + * + * + * @param vAnnotationElement + */ + public void addAnnotationElement(org.vamsas.objects.core.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + _annotationElementList.addElement(vAnnotationElement); + } //-- void addAnnotationElement(org.vamsas.objects.core.AnnotationElement) + + /** + * Method addAnnotationElement + * + * + * + * @param index + * @param vAnnotationElement + */ + public void addAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + _annotationElementList.insertElementAt(vAnnotationElement, index); + } //-- void addAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) + + /** + * Method enumerateAnnotationElement + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateAnnotationElement() + { + return _annotationElementList.elements(); + } //-- java.util.Enumeration enumerateAnnotationElement() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof SequenceSetAnnotations) { + + SequenceSetAnnotations temp = (SequenceSetAnnotations)obj; + if (this._type != null) { + if (temp._type == null) return false; + else if (!(this._type.equals(temp._type))) + return false; + } + else if (temp._type != null) + return false; + if (this._end != null) { + if (temp._end == null) return false; + else if (!(this._end.equals(temp._end))) + return false; + } + else if (temp._end != null) + return false; + if (this._begin != null) { + if (temp._begin == null) return false; + else if (!(this._begin.equals(temp._begin))) + return false; + } + else if (temp._begin != null) + return false; + if (this._seqRef != null) { + if (temp._seqRef == null) return false; + else if (!(this._seqRef.equals(temp._seqRef))) + return false; + } + else if (temp._seqRef != null) + return false; + if (this._description != null) { + if (temp._description == null) return false; + else if (!(this._description.equals(temp._description))) + return false; + } + else if (temp._description != null) + return false; + if (this._status != null) { + if (temp._status == null) return false; + else if (!(this._status.equals(temp._status))) + return false; + } + else if (temp._status != null) + return false; + if (this._annotationElementList != null) { + if (temp._annotationElementList == null) return false; + else if (!(this._annotationElementList.equals(temp._annotationElementList))) + return false; + } + else if (temp._annotationElementList != null) + return false; + if (this._provenance != null) { + if (temp._provenance == null) return false; + else if (!(this._provenance.equals(temp._provenance))) + return false; + } + else if (temp._provenance != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Method getAnnotationElement + * + * + * + * @param index + * @return AnnotationElement + */ + public org.vamsas.objects.core.AnnotationElement getAnnotationElement(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _annotationElementList.size())) { + throw new IndexOutOfBoundsException("getAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]"); + } + + return (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index); + } //-- org.vamsas.objects.core.AnnotationElement getAnnotationElement(int) + + /** + * Method getAnnotationElement + * + * + * + * @return AnnotationElement + */ + public org.vamsas.objects.core.AnnotationElement[] getAnnotationElement() + { + int size = _annotationElementList.size(); + org.vamsas.objects.core.AnnotationElement[] mArray = new org.vamsas.objects.core.AnnotationElement[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.AnnotationElement[] getAnnotationElement() + + /** + * Method getAnnotationElementCount + * + * + * + * @return int + */ + public int getAnnotationElementCount() + { + return _annotationElementList.size(); + } //-- int getAnnotationElementCount() + + /** + * Returns the value of field 'begin'. + * + * @return String + * @return the value of field 'begin'. + */ + public java.lang.String getBegin() + { + return this._begin; + } //-- java.lang.String getBegin() + + /** + * Returns the value of field 'description'. + * + * @return String + * @return the value of field 'description'. + */ + public java.lang.String getDescription() + { + return this._description; + } //-- java.lang.String getDescription() + + /** + * Returns the value of field 'end'. + * + * @return String + * @return the value of field 'end'. + */ + public java.lang.String getEnd() + { + return this._end; + } //-- java.lang.String getEnd() + + /** + * Returns the value of field 'provenance'. + * + * @return Provenance + * @return the value of field 'provenance'. + */ + public org.vamsas.objects.core.Provenance getProvenance() + { + return this._provenance; + } //-- org.vamsas.objects.core.Provenance getProvenance() + + /** + * Returns the value of field 'seqRef'. + * + * @return Object + * @return the value of field 'seqRef'. + */ + public java.lang.Object getSeqRef() + { + return this._seqRef; + } //-- java.lang.Object getSeqRef() + + /** + * Returns the value of field 'status'. + * + * @return String + * @return the value of field 'status'. + */ + public java.lang.String getStatus() + { + return this._status; + } //-- java.lang.String getStatus() + + /** + * Returns the value of field 'type'. + * + * @return String + * @return the value of field 'type'. + */ + public java.lang.String getType() + { + return this._type; + } //-- java.lang.String getType() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Method removeAllAnnotationElement + * + */ + public void removeAllAnnotationElement() + { + _annotationElementList.removeAllElements(); + } //-- void removeAllAnnotationElement() + + /** + * Method removeAnnotationElement + * + * + * + * @param index + * @return AnnotationElement + */ + public org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int index) + { + java.lang.Object obj = _annotationElementList.elementAt(index); + _annotationElementList.removeElementAt(index); + return (org.vamsas.objects.core.AnnotationElement) obj; + } //-- org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int) + + /** + * Method setAnnotationElement + * + * + * + * @param index + * @param vAnnotationElement + */ + public void setAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _annotationElementList.size())) { + throw new IndexOutOfBoundsException("setAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]"); + } + _annotationElementList.setElementAt(vAnnotationElement, index); + } //-- void setAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) + + /** + * Method setAnnotationElement + * + * + * + * @param annotationElementArray + */ + public void setAnnotationElement(org.vamsas.objects.core.AnnotationElement[] annotationElementArray) + { + //-- copy array + _annotationElementList.removeAllElements(); + for (int i = 0; i < annotationElementArray.length; i++) { + _annotationElementList.addElement(annotationElementArray[i]); + } + } //-- void setAnnotationElement(org.vamsas.objects.core.AnnotationElement) + + /** + * Sets the value of field 'begin'. + * + * @param begin the value of field 'begin'. + */ + public void setBegin(java.lang.String begin) + { + this._begin = begin; + } //-- void setBegin(java.lang.String) + + /** + * Sets the value of field 'description'. + * + * @param description the value of field 'description'. + */ + public void setDescription(java.lang.String description) + { + this._description = description; + } //-- void setDescription(java.lang.String) + + /** + * Sets the value of field 'end'. + * + * @param end the value of field 'end'. + */ + public void setEnd(java.lang.String end) + { + this._end = end; + } //-- void setEnd(java.lang.String) + + /** + * Sets the value of field 'provenance'. + * + * @param provenance the value of field 'provenance'. + */ + public void setProvenance(org.vamsas.objects.core.Provenance provenance) + { + this._provenance = provenance; + } //-- void setProvenance(org.vamsas.objects.core.Provenance) + + /** + * Sets the value of field 'seqRef'. + * + * @param seqRef the value of field 'seqRef'. + */ + public void setSeqRef(java.lang.Object seqRef) + { + this._seqRef = seqRef; + } //-- void setSeqRef(java.lang.Object) + + /** + * Sets the value of field 'status'. + * + * @param status the value of field 'status'. + */ + public void setStatus(java.lang.String status) + { + this._status = status; + } //-- void setStatus(java.lang.String) + + /** + * Sets the value of field 'type'. + * + * @param type the value of field 'type'. + */ + public void setType(java.lang.String type) + { + this._type = type; + } //-- void setType(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return SequenceSetAnnotations + */ + public static org.vamsas.objects.core.SequenceSetAnnotations unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.SequenceSetAnnotations) Unmarshaller.unmarshal(org.vamsas.objects.core.SequenceSetAnnotations.class, reader); + } //-- org.vamsas.objects.core.SequenceSetAnnotations unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/SequenceType.java b/src/org/vamsas/objects/core/SequenceType.java new file mode 100644 index 0000000..4c16ba3 --- /dev/null +++ b/src/org/vamsas/objects/core/SequenceType.java @@ -0,0 +1,486 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import java.util.Enumeration; +import java.util.Vector; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class SequenceType. + * + * @version $Revision$ $Date$ + */ +public class SequenceType extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _start + */ + private int _start; + + /** + * keeps track of state for field: _start + */ + private boolean _has_start; + + /** + * Field _end + */ + private int _end; + + /** + * keeps track of state for field: _end + */ + private boolean _has_end; + + /** + * Field _sequence + */ + private java.lang.String _sequence; + + /** + * Field _name + */ + private java.lang.String _name; + + /** + * Field _dbRefList + */ + private java.util.Vector _dbRefList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SequenceType() + { + super(); + _dbRefList = new Vector(); + } //-- org.vamsas.objects.core.SequenceType() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addDbRef + * + * + * + * @param vDbRef + */ + public void addDbRef(org.vamsas.objects.core.DbRef vDbRef) + throws java.lang.IndexOutOfBoundsException + { + _dbRefList.addElement(vDbRef); + } //-- void addDbRef(org.vamsas.objects.core.DbRef) + + /** + * Method addDbRef + * + * + * + * @param index + * @param vDbRef + */ + public void addDbRef(int index, org.vamsas.objects.core.DbRef vDbRef) + throws java.lang.IndexOutOfBoundsException + { + _dbRefList.insertElementAt(vDbRef, index); + } //-- void addDbRef(int, org.vamsas.objects.core.DbRef) + + /** + * Method deleteEnd + * + */ + public void deleteEnd() + { + this._has_end= false; + } //-- void deleteEnd() + + /** + * Method deleteStart + * + */ + public void deleteStart() + { + this._has_start= false; + } //-- void deleteStart() + + /** + * Method enumerateDbRef + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateDbRef() + { + return _dbRefList.elements(); + } //-- java.util.Enumeration enumerateDbRef() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof SequenceType) { + + SequenceType temp = (SequenceType)obj; + if (this._start != temp._start) + return false; + if (this._has_start != temp._has_start) + return false; + if (this._end != temp._end) + return false; + if (this._has_end != temp._has_end) + return false; + if (this._sequence != null) { + if (temp._sequence == null) return false; + else if (!(this._sequence.equals(temp._sequence))) + return false; + } + else if (temp._sequence != null) + return false; + if (this._name != null) { + if (temp._name == null) return false; + else if (!(this._name.equals(temp._name))) + return false; + } + else if (temp._name != null) + return false; + if (this._dbRefList != null) { + if (temp._dbRefList == null) return false; + else if (!(this._dbRefList.equals(temp._dbRefList))) + return false; + } + else if (temp._dbRefList != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Method getDbRef + * + * + * + * @param index + * @return DbRef + */ + public org.vamsas.objects.core.DbRef getDbRef(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _dbRefList.size())) { + throw new IndexOutOfBoundsException("getDbRef: Index value '"+index+"' not in range [0.."+_dbRefList.size()+ "]"); + } + + return (org.vamsas.objects.core.DbRef) _dbRefList.elementAt(index); + } //-- org.vamsas.objects.core.DbRef getDbRef(int) + + /** + * Method getDbRef + * + * + * + * @return DbRef + */ + public org.vamsas.objects.core.DbRef[] getDbRef() + { + int size = _dbRefList.size(); + org.vamsas.objects.core.DbRef[] mArray = new org.vamsas.objects.core.DbRef[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.DbRef) _dbRefList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.DbRef[] getDbRef() + + /** + * Method getDbRefCount + * + * + * + * @return int + */ + public int getDbRefCount() + { + return _dbRefList.size(); + } //-- int getDbRefCount() + + /** + * Returns the value of field 'end'. + * + * @return int + * @return the value of field 'end'. + */ + public int getEnd() + { + return this._end; + } //-- int getEnd() + + /** + * Returns the value of field 'name'. + * + * @return String + * @return the value of field 'name'. + */ + public java.lang.String getName() + { + return this._name; + } //-- java.lang.String getName() + + /** + * Returns the value of field 'sequence'. + * + * @return String + * @return the value of field 'sequence'. + */ + public java.lang.String getSequence() + { + return this._sequence; + } //-- java.lang.String getSequence() + + /** + * Returns the value of field 'start'. + * + * @return int + * @return the value of field 'start'. + */ + public int getStart() + { + return this._start; + } //-- int getStart() + + /** + * Method hasEnd + * + * + * + * @return boolean + */ + public boolean hasEnd() + { + return this._has_end; + } //-- boolean hasEnd() + + /** + * Method hasStart + * + * + * + * @return boolean + */ + public boolean hasStart() + { + return this._has_start; + } //-- boolean hasStart() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Method removeAllDbRef + * + */ + public void removeAllDbRef() + { + _dbRefList.removeAllElements(); + } //-- void removeAllDbRef() + + /** + * Method removeDbRef + * + * + * + * @param index + * @return DbRef + */ + public org.vamsas.objects.core.DbRef removeDbRef(int index) + { + java.lang.Object obj = _dbRefList.elementAt(index); + _dbRefList.removeElementAt(index); + return (org.vamsas.objects.core.DbRef) obj; + } //-- org.vamsas.objects.core.DbRef removeDbRef(int) + + /** + * Method setDbRef + * + * + * + * @param index + * @param vDbRef + */ + public void setDbRef(int index, org.vamsas.objects.core.DbRef vDbRef) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _dbRefList.size())) { + throw new IndexOutOfBoundsException("setDbRef: Index value '"+index+"' not in range [0.."+_dbRefList.size()+ "]"); + } + _dbRefList.setElementAt(vDbRef, index); + } //-- void setDbRef(int, org.vamsas.objects.core.DbRef) + + /** + * Method setDbRef + * + * + * + * @param dbRefArray + */ + public void setDbRef(org.vamsas.objects.core.DbRef[] dbRefArray) + { + //-- copy array + _dbRefList.removeAllElements(); + for (int i = 0; i < dbRefArray.length; i++) { + _dbRefList.addElement(dbRefArray[i]); + } + } //-- void setDbRef(org.vamsas.objects.core.DbRef) + + /** + * Sets the value of field 'end'. + * + * @param end the value of field 'end'. + */ + public void setEnd(int end) + { + this._end = end; + this._has_end = true; + } //-- void setEnd(int) + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName(java.lang.String name) + { + this._name = name; + } //-- void setName(java.lang.String) + + /** + * Sets the value of field 'sequence'. + * + * @param sequence the value of field 'sequence'. + */ + public void setSequence(java.lang.String sequence) + { + this._sequence = sequence; + } //-- void setSequence(java.lang.String) + + /** + * Sets the value of field 'start'. + * + * @param start the value of field 'start'. + */ + public void setStart(int start) + { + this._start = start; + this._has_start = true; + } //-- void setStart(int) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return SequenceType + */ + public static org.vamsas.objects.core.SequenceType unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.SequenceType) Unmarshaller.unmarshal(org.vamsas.objects.core.SequenceType.class, reader); + } //-- org.vamsas.objects.core.SequenceType unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/Tree.java b/src/org/vamsas/objects/core/Tree.java new file mode 100644 index 0000000..7687cbb --- /dev/null +++ b/src/org/vamsas/objects/core/Tree.java @@ -0,0 +1,212 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Tree. + * + * @version $Revision$ $Date$ + */ +public class Tree extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _provenance + */ + private org.vamsas.objects.core.Provenance _provenance; + + /** + * Field _newickFormat + */ + private java.lang.String _newickFormat; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Tree() + { + super(); + } //-- org.vamsas.objects.core.Tree() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Tree) { + + Tree temp = (Tree)obj; + if (this._provenance != null) { + if (temp._provenance == null) return false; + else if (!(this._provenance.equals(temp._provenance))) + return false; + } + else if (temp._provenance != null) + return false; + if (this._newickFormat != null) { + if (temp._newickFormat == null) return false; + else if (!(this._newickFormat.equals(temp._newickFormat))) + return false; + } + else if (temp._newickFormat != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'newickFormat'. + * + * @return String + * @return the value of field 'newickFormat'. + */ + public java.lang.String getNewickFormat() + { + return this._newickFormat; + } //-- java.lang.String getNewickFormat() + + /** + * Returns the value of field 'provenance'. + * + * @return Provenance + * @return the value of field 'provenance'. + */ + public org.vamsas.objects.core.Provenance getProvenance() + { + return this._provenance; + } //-- org.vamsas.objects.core.Provenance getProvenance() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'newickFormat'. + * + * @param newickFormat the value of field 'newickFormat'. + */ + public void setNewickFormat(java.lang.String newickFormat) + { + this._newickFormat = newickFormat; + } //-- void setNewickFormat(java.lang.String) + + /** + * Sets the value of field 'provenance'. + * + * @param provenance the value of field 'provenance'. + */ + public void setProvenance(org.vamsas.objects.core.Provenance provenance) + { + this._provenance = provenance; + } //-- void setProvenance(org.vamsas.objects.core.Provenance) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Tree + */ + public static org.vamsas.objects.core.Tree unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Tree) Unmarshaller.unmarshal(org.vamsas.objects.core.Tree.class, reader); + } //-- org.vamsas.objects.core.Tree unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/VAMSAS.java b/src/org/vamsas/objects/core/VAMSAS.java new file mode 100644 index 0000000..c1d4fa5 --- /dev/null +++ b/src/org/vamsas/objects/core/VAMSAS.java @@ -0,0 +1,464 @@ +/* + * This class was automatically generated with + * Castor 0.9.9M1, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import java.util.Enumeration; +import java.util.Vector; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class VAMSAS. + * + * @version $Revision$ $Date$ + */ +public class VAMSAS extends org.vamsas.client.object +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _treeList + */ + private java.util.Vector _treeList; + + /** + * Field _sequenceSetList + */ + private java.util.Vector _sequenceSetList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public VAMSAS() + { + super(); + _treeList = new Vector(); + _sequenceSetList = new Vector(); + } //-- org.vamsas.objects.core.VAMSAS() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addSequenceSet + * + * + * + * @param vSequenceSet + */ + public void addSequenceSet(org.vamsas.objects.core.SequenceSet vSequenceSet) + throws java.lang.IndexOutOfBoundsException + { + _sequenceSetList.addElement(vSequenceSet); + } //-- void addSequenceSet(org.vamsas.objects.core.SequenceSet) + + /** + * Method addSequenceSet + * + * + * + * @param index + * @param vSequenceSet + */ + public void addSequenceSet(int index, org.vamsas.objects.core.SequenceSet vSequenceSet) + throws java.lang.IndexOutOfBoundsException + { + _sequenceSetList.insertElementAt(vSequenceSet, index); + } //-- void addSequenceSet(int, org.vamsas.objects.core.SequenceSet) + + /** + * Method addTree + * + * + * + * @param vTree + */ + public void addTree(java.lang.String vTree) + throws java.lang.IndexOutOfBoundsException + { + _treeList.addElement(vTree); + } //-- void addTree(java.lang.String) + + /** + * Method addTree + * + * + * + * @param index + * @param vTree + */ + public void addTree(int index, java.lang.String vTree) + throws java.lang.IndexOutOfBoundsException + { + _treeList.insertElementAt(vTree, index); + } //-- void addTree(int, java.lang.String) + + /** + * Method enumerateSequenceSet + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateSequenceSet() + { + return _sequenceSetList.elements(); + } //-- java.util.Enumeration enumerateSequenceSet() + + /** + * Method enumerateTree + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateTree() + { + return _treeList.elements(); + } //-- java.util.Enumeration enumerateTree() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof VAMSAS) { + + VAMSAS temp = (VAMSAS)obj; + if (this._treeList != null) { + if (temp._treeList == null) return false; + else if (!(this._treeList.equals(temp._treeList))) + return false; + } + else if (temp._treeList != null) + return false; + if (this._sequenceSetList != null) { + if (temp._sequenceSetList == null) return false; + else if (!(this._sequenceSetList.equals(temp._sequenceSetList))) + return false; + } + else if (temp._sequenceSetList != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Method getSequenceSet + * + * + * + * @param index + * @return SequenceSet + */ + public org.vamsas.objects.core.SequenceSet getSequenceSet(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _sequenceSetList.size())) { + throw new IndexOutOfBoundsException("getSequenceSet: Index value '"+index+"' not in range [0.."+_sequenceSetList.size()+ "]"); + } + + return (org.vamsas.objects.core.SequenceSet) _sequenceSetList.elementAt(index); + } //-- org.vamsas.objects.core.SequenceSet getSequenceSet(int) + + /** + * Method getSequenceSet + * + * + * + * @return SequenceSet + */ + public org.vamsas.objects.core.SequenceSet[] getSequenceSet() + { + int size = _sequenceSetList.size(); + org.vamsas.objects.core.SequenceSet[] mArray = new org.vamsas.objects.core.SequenceSet[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.SequenceSet) _sequenceSetList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.SequenceSet[] getSequenceSet() + + /** + * Method getSequenceSetCount + * + * + * + * @return int + */ + public int getSequenceSetCount() + { + return _sequenceSetList.size(); + } //-- int getSequenceSetCount() + + /** + * Method getTree + * + * + * + * @param index + * @return String + */ + public java.lang.String getTree(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _treeList.size())) { + throw new IndexOutOfBoundsException("getTree: Index value '"+index+"' not in range [0.."+_treeList.size()+ "]"); + } + + return (String)_treeList.elementAt(index); + } //-- java.lang.String getTree(int) + + /** + * Method getTree + * + * + * + * @return String + */ + public java.lang.String[] getTree() + { + int size = _treeList.size(); + java.lang.String[] mArray = new java.lang.String[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (String)_treeList.elementAt(index); + } + return mArray; + } //-- java.lang.String[] getTree() + + /** + * Method getTreeCount + * + * + * + * @return int + */ + public int getTreeCount() + { + return _treeList.size(); + } //-- int getTreeCount() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Method removeAllSequenceSet + * + */ + public void removeAllSequenceSet() + { + _sequenceSetList.removeAllElements(); + } //-- void removeAllSequenceSet() + + /** + * Method removeAllTree + * + */ + public void removeAllTree() + { + _treeList.removeAllElements(); + } //-- void removeAllTree() + + /** + * Method removeSequenceSet + * + * + * + * @param index + * @return SequenceSet + */ + public org.vamsas.objects.core.SequenceSet removeSequenceSet(int index) + { + java.lang.Object obj = _sequenceSetList.elementAt(index); + _sequenceSetList.removeElementAt(index); + return (org.vamsas.objects.core.SequenceSet) obj; + } //-- org.vamsas.objects.core.SequenceSet removeSequenceSet(int) + + /** + * Method removeTree + * + * + * + * @param index + * @return String + */ + public java.lang.String removeTree(int index) + { + java.lang.Object obj = _treeList.elementAt(index); + _treeList.removeElementAt(index); + return (String)obj; + } //-- java.lang.String removeTree(int) + + /** + * Method setSequenceSet + * + * + * + * @param index + * @param vSequenceSet + */ + public void setSequenceSet(int index, org.vamsas.objects.core.SequenceSet vSequenceSet) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _sequenceSetList.size())) { + throw new IndexOutOfBoundsException("setSequenceSet: Index value '"+index+"' not in range [0.."+_sequenceSetList.size()+ "]"); + } + _sequenceSetList.setElementAt(vSequenceSet, index); + } //-- void setSequenceSet(int, org.vamsas.objects.core.SequenceSet) + + /** + * Method setSequenceSet + * + * + * + * @param sequenceSetArray + */ + public void setSequenceSet(org.vamsas.objects.core.SequenceSet[] sequenceSetArray) + { + //-- copy array + _sequenceSetList.removeAllElements(); + for (int i = 0; i < sequenceSetArray.length; i++) { + _sequenceSetList.addElement(sequenceSetArray[i]); + } + } //-- void setSequenceSet(org.vamsas.objects.core.SequenceSet) + + /** + * Method setTree + * + * + * + * @param index + * @param vTree + */ + public void setTree(int index, java.lang.String vTree) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _treeList.size())) { + throw new IndexOutOfBoundsException("setTree: Index value '"+index+"' not in range [0.."+_treeList.size()+ "]"); + } + _treeList.setElementAt(vTree, index); + } //-- void setTree(int, java.lang.String) + + /** + * Method setTree + * + * + * + * @param treeArray + */ + public void setTree(java.lang.String[] treeArray) + { + //-- copy array + _treeList.removeAllElements(); + for (int i = 0; i < treeArray.length; i++) { + _treeList.addElement(treeArray[i]); + } + } //-- void setTree(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return VAMSAS + */ + public static org.vamsas.objects.core.VAMSAS unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.VAMSAS) Unmarshaller.unmarshal(org.vamsas.objects.core.VAMSAS.class, reader); + } //-- org.vamsas.objects.core.VAMSAS unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} -- 1.7.10.2