-- listing properties --
-org.vamsas.objects.core.Tree=org.vamsas.objects.core.TreeDescriptor
-org.vamsas.objects.core.Provenance=org.vamsas.objects.core.ProvenanceDes...
-org.vamsas.objects.core.SequenceType=org.vamsas.objects.core.SequenceTypeD...
org.vamsas.objects.core.ProvenanceItem=org.vamsas.objects.core.ProvenanceIte...
-org.vamsas.objects.core.TreeType=org.vamsas.objects.core.TreeTypeDescr...
-org.vamsas.objects.core.AnnotationElement=org.vamsas.objects.core.AnnotationEle...
-org.vamsas.objects.core.AlignmentSequence=org.vamsas.objects.core.AlignmentSequ...
-org.vamsas.objects.core.Alignment=org.vamsas.objects.core.AlignmentDesc...
-org.vamsas.objects.core.DbRef=org.vamsas.objects.core.DbRefDescriptor
-org.vamsas.objects.core.SequenceSetAnnotations=org.vamsas.objects.core.SequenceSetAn...
-org.vamsas.objects.core.Application=org.vamsas.objects.core.ApplicationDe...
-org.vamsas.objects.core.VAMSAS=org.vamsas.objects.core.VAMSASDescriptor
+org.vamsas.objects.core.AlignmentAnnotations=org.vamsas.objects.core.AlignmentAnno...
+org.vamsas.objects.core.Tree=org.vamsas.objects.core.TreeDescriptor
org.vamsas.objects.core.Sequence=org.vamsas.objects.core.SequenceDescr...
+org.vamsas.objects.core.AnnotationElement=org.vamsas.objects.core.AnnotationEle...
org.vamsas.objects.core.LockFile=org.vamsas.objects.core.LockFileDescr...
org.vamsas.objects.core.Entry=org.vamsas.objects.core.EntryDescriptor
+org.vamsas.objects.core.SequenceType=org.vamsas.objects.core.SequenceTypeD...
+org.vamsas.objects.core.VAMSAS=org.vamsas.objects.core.VAMSASDescriptor
org.vamsas.objects.core.SequenceSet=org.vamsas.objects.core.SequenceSetDe...
+org.vamsas.objects.core.DbRef=org.vamsas.objects.core.DbRefDescriptor
org.vamsas.objects.core.ApplicationData=org.vamsas.objects.core.ApplicationDa...
-org.vamsas.objects.core.AlignmentAnnotations=org.vamsas.objects.core.AlignmentAnno...
-org.vamsas.objects.core.Dendro=org.vamsas.objects.core.DendroDescriptor
+org.vamsas.objects.core.Application=org.vamsas.objects.core.ApplicationDe...
+org.vamsas.objects.core.Provenance=org.vamsas.objects.core.ProvenanceDes...
+org.vamsas.objects.core.AlignmentSequence=org.vamsas.objects.core.AlignmentSequ...
+org.vamsas.objects.core.Alignment=org.vamsas.objects.core.AlignmentDesc...
+org.vamsas.objects.core.SequenceSetAnnotations=org.vamsas.objects.core.SequenceSetAn...
}
desc.setValidator(fieldValidator);
//-- _treeList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Tree.class, "_treeList", "tree", org.exolab.castor.xml.NodeType.Element);
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Tree.class, "_treeList", "Tree", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
+++ /dev/null
-/*
- * This class was automatically generated with
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, 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 Dendro.
- *
- * @version $Revision$ $Date$
- */
-public class Dendro extends TreeType
-implements java.io.Serializable
-{
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public Dendro()
- {
- super();
- } //-- org.vamsas.objects.core.Dendro()
-
-
- //-----------/
- //- 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 Dendro) {
-
- Dendro temp = (Dendro)obj;
- return true;
- }
- return false;
- } //-- boolean equals(java.lang.Object)
-
- /**
- * 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 unmarshal
- *
- *
- *
- * @param reader
- * @return Dendro
- */
- public static org.vamsas.objects.core.Dendro unmarshal(java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
- {
- return (org.vamsas.objects.core.Dendro) Unmarshaller.unmarshal(org.vamsas.objects.core.Dendro.class, reader);
- } //-- org.vamsas.objects.core.Dendro 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()
-
-}
+++ /dev/null
-/*
- * This class was automatically generated with
- * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
- * Schema.
- * $Id$
- */
-
-package org.vamsas.objects.core;
-
- //---------------------------------/
- //- Imported classes and packages -/
-//---------------------------------/
-
-import org.exolab.castor.mapping.AccessMode;
-import org.exolab.castor.xml.TypeValidator;
-import org.exolab.castor.xml.XMLFieldDescriptor;
-import org.exolab.castor.xml.validators.*;
-
-/**
- * Class DendroDescriptor.
- *
- * @version $Revision$ $Date$
- */
-public class DendroDescriptor extends TreeTypeDescriptor {
-
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- * Field nsPrefix
- */
- private java.lang.String nsPrefix;
-
- /**
- * Field nsURI
- */
- private java.lang.String nsURI;
-
- /**
- * Field xmlName
- */
- private java.lang.String xmlName;
-
- /**
- * Field identity
- */
- private org.exolab.castor.xml.XMLFieldDescriptor identity;
-
-
- //----------------/
- //- Constructors -/
- //----------------/
-
- public DendroDescriptor()
- {
- super();
- setExtendsWithoutFlatten(new TreeTypeDescriptor());
- nsURI = "http://www.vamsas.org";
- xmlName = "Dendro";
- } //-- org.vamsas.objects.core.DendroDescriptor()
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Method getAccessMode
- *
- *
- *
- * @return AccessMode
- */
- public org.exolab.castor.mapping.AccessMode getAccessMode()
- {
- return null;
- } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
-
- /**
- * Method getExtends
- *
- *
- *
- * @return ClassDescriptor
- */
- public org.exolab.castor.mapping.ClassDescriptor getExtends()
- {
- return super.getExtends();
- } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
-
- /**
- * Method getIdentity
- *
- *
- *
- * @return FieldDescriptor
- */
- public org.exolab.castor.mapping.FieldDescriptor getIdentity()
- {
- if (identity == null)
- return super.getIdentity();
- return identity;
- } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
-
- /**
- * Method getJavaClass
- *
- *
- *
- * @return Class
- */
- public java.lang.Class getJavaClass()
- {
- return org.vamsas.objects.core.Dendro.class;
- } //-- java.lang.Class getJavaClass()
-
- /**
- * Method getNameSpacePrefix
- *
- *
- *
- * @return String
- */
- public java.lang.String getNameSpacePrefix()
- {
- return nsPrefix;
- } //-- java.lang.String getNameSpacePrefix()
-
- /**
- * Method getNameSpaceURI
- *
- *
- *
- * @return String
- */
- public java.lang.String getNameSpaceURI()
- {
- return nsURI;
- } //-- java.lang.String getNameSpaceURI()
-
- /**
- * Method getValidator
- *
- *
- *
- * @return TypeValidator
- */
- public org.exolab.castor.xml.TypeValidator getValidator()
- {
- return this;
- } //-- org.exolab.castor.xml.TypeValidator getValidator()
-
- /**
- * Method getXMLName
- *
- *
- *
- * @return String
- */
- public java.lang.String getXMLName()
- {
- return xmlName;
- } //-- java.lang.String getXMLName()
-
-}
private java.util.Vector _alignmentList;
/**
- * Field _tree
+ * Field _treeList
*/
- private org.vamsas.objects.core.Tree _tree;
+ private java.util.Vector _treeList;
/**
* Field _provenance
_sequenceList = new Vector();
_sequenceSetAnnotationsList = new Vector();
_alignmentList = new Vector();
+ _treeList = new Vector();
} //-- org.vamsas.objects.core.SequenceSet()
} //-- void addSequenceSetAnnotations(int, org.vamsas.objects.core.SequenceSetAnnotations)
/**
+ * 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 deleteAligned
*
*/
} //-- java.util.Enumeration enumerateSequenceSetAnnotations()
/**
+ * Method enumerateTree
+ *
+ *
+ *
+ * @return Enumeration
+ */
+ public java.util.Enumeration enumerateTree()
+ {
+ return _treeList.elements();
+ } //-- java.util.Enumeration enumerateTree()
+
+ /**
* Note: hashCode() has not been overriden
*
* @param obj
}
else if (temp._alignmentList != null)
return false;
- if (this._tree != null) {
- if (temp._tree == null) return false;
- else if (!(this._tree.equals(temp._tree)))
+ if (this._treeList != null) {
+ if (temp._treeList == null) return false;
+ else if (!(this._treeList.equals(temp._treeList)))
return false;
}
- else if (temp._tree != null)
+ else if (temp._treeList != null)
return false;
if (this._provenance != null) {
if (temp._provenance == null) return false;
} //-- int getSequenceSetAnnotationsCount()
/**
- * Returns the value of field 'tree'.
+ * 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
- * @return the value of field 'tree'.
*/
- public org.vamsas.objects.core.Tree getTree()
+ public org.vamsas.objects.core.Tree[] getTree()
{
- return this._tree;
- } //-- 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 hasAligned
} //-- void removeAllSequenceSetAnnotations()
/**
+ * Method removeAllTree
+ *
+ */
+ public void removeAllTree()
+ {
+ _treeList.removeAllElements();
+ } //-- void removeAllTree()
+
+ /**
* Method removeSequence
*
*
} //-- org.vamsas.objects.core.SequenceSetAnnotations removeSequenceSetAnnotations(int)
/**
+ * 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 'aligned'.
*
* @param aligned the value of field 'aligned'.
} //-- void setSequenceSetAnnotations(org.vamsas.objects.core.SequenceSetAnnotations)
/**
- * Sets the value of field 'tree'.
+ * 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 tree the value of field 'tree'.
+ * @param treeArray
*/
- public void setTree(org.vamsas.objects.core.Tree tree)
+ public void setTree(org.vamsas.objects.core.Tree[] treeArray)
{
- this._tree = tree;
+ //-- copy array
+ _treeList.removeAllElements();
+ for (int i = 0; i < treeArray.length; i++) {
+ _treeList.addElement(treeArray[i]);
+ }
} //-- void setTree(org.vamsas.objects.core.Tree)
/**
{ //-- local scope
}
desc.setValidator(fieldValidator);
- //-- _tree
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Tree.class, "_tree", "tree", org.exolab.castor.xml.NodeType.Element);
+ //-- _treeList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Tree.class, "_treeList", "Tree", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
try {
SequenceSet target = (SequenceSet) object;
- target.setTree( (org.vamsas.objects.core.Tree) value);
+ target.addTree( (org.vamsas.objects.core.Tree) value);
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
};
desc.setHandler(handler);
desc.setNameSpaceURI("http://www.vamsas.org");
- desc.setRequired(true);
- desc.setMultivalued(false);
+ desc.setMultivalued(true);
addFieldDescriptor(desc);
- //-- validation code for: _tree
+ //-- validation code for: _treeList
fieldValidator = new org.exolab.castor.xml.FieldValidator();
- fieldValidator.setMinOccurs(1);
+ fieldValidator.setMinOccurs(0);
{ //-- local scope
}
desc.setValidator(fieldValidator);
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;
*
* @version $Revision$ $Date$
*/
-public class Tree extends TreeType
+public class Tree extends org.vamsas.client.object
implements java.io.Serializable
{
+ //--------------------------/
+ //- Class/Member Variables -/
+ //--------------------------/
+
+ /**
+ * Field _id
+ */
+ private java.lang.String _id;
+
+ /**
+ * Field _newickFormatList
+ */
+ private java.util.Vector _newickFormatList;
+
+ /**
+ * Field _provenance
+ */
+ private org.vamsas.objects.core.Provenance _provenance;
+
+
//----------------/
//- Constructors -/
//----------------/
public Tree()
{
super();
+ _newickFormatList = new Vector();
} //-- org.vamsas.objects.core.Tree()
//-----------/
/**
+ * Method addNewickFormat
+ *
+ *
+ *
+ * @param vNewickFormat
+ */
+ public void addNewickFormat(java.lang.String vNewickFormat)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ _newickFormatList.addElement(vNewickFormat);
+ } //-- void addNewickFormat(java.lang.String)
+
+ /**
+ * Method addNewickFormat
+ *
+ *
+ *
+ * @param index
+ * @param vNewickFormat
+ */
+ public void addNewickFormat(int index, java.lang.String vNewickFormat)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ _newickFormatList.insertElementAt(vNewickFormat, index);
+ } //-- void addNewickFormat(int, java.lang.String)
+
+ /**
+ * Method enumerateNewickFormat
+ *
+ *
+ *
+ * @return Enumeration
+ */
+ public java.util.Enumeration enumerateNewickFormat()
+ {
+ return _newickFormatList.elements();
+ } //-- java.util.Enumeration enumerateNewickFormat()
+
+ /**
* Note: hashCode() has not been overriden
*
* @param obj
if (obj instanceof Tree) {
Tree temp = (Tree)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;
+ if (this._newickFormatList != null) {
+ if (temp._newickFormatList == null) return false;
+ else if (!(this._newickFormatList.equals(temp._newickFormatList)))
+ return false;
+ }
+ else if (temp._newickFormatList != 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 'id'.
+ *
+ * @return String
+ * @return the value of field 'id'.
+ */
+ public java.lang.String getId()
+ {
+ return this._id;
+ } //-- java.lang.String getId()
+
+ /**
+ * Method getNewickFormat
+ *
+ *
+ *
+ * @param index
+ * @return String
+ */
+ public java.lang.String getNewickFormat(int index)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ //-- check bounds for index
+ if ((index < 0) || (index > _newickFormatList.size())) {
+ throw new IndexOutOfBoundsException("getNewickFormat: Index value '"+index+"' not in range [0.."+_newickFormatList.size()+ "]");
+ }
+
+ return (String)_newickFormatList.elementAt(index);
+ } //-- java.lang.String getNewickFormat(int)
+
+ /**
+ * Method getNewickFormat
+ *
+ *
+ *
+ * @return String
+ */
+ public java.lang.String[] getNewickFormat()
+ {
+ int size = _newickFormatList.size();
+ java.lang.String[] mArray = new java.lang.String[size];
+ for (int index = 0; index < size; index++) {
+ mArray[index] = (String)_newickFormatList.elementAt(index);
+ }
+ return mArray;
+ } //-- java.lang.String[] getNewickFormat()
+
+ /**
+ * Method getNewickFormatCount
+ *
+ *
+ *
+ * @return int
+ */
+ public int getNewickFormatCount()
+ {
+ return _newickFormatList.size();
+ } //-- int getNewickFormatCount()
+
+ /**
+ * 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
*
*
} //-- void marshal(org.xml.sax.ContentHandler)
/**
+ * Method removeAllNewickFormat
+ *
+ */
+ public void removeAllNewickFormat()
+ {
+ _newickFormatList.removeAllElements();
+ } //-- void removeAllNewickFormat()
+
+ /**
+ * Method removeNewickFormat
+ *
+ *
+ *
+ * @param index
+ * @return String
+ */
+ public java.lang.String removeNewickFormat(int index)
+ {
+ java.lang.Object obj = _newickFormatList.elementAt(index);
+ _newickFormatList.removeElementAt(index);
+ return (String)obj;
+ } //-- java.lang.String removeNewickFormat(int)
+
+ /**
+ * 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 setNewickFormat
+ *
+ *
+ *
+ * @param index
+ * @param vNewickFormat
+ */
+ public void setNewickFormat(int index, java.lang.String vNewickFormat)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ //-- check bounds for index
+ if ((index < 0) || (index > _newickFormatList.size())) {
+ throw new IndexOutOfBoundsException("setNewickFormat: Index value '"+index+"' not in range [0.."+_newickFormatList.size()+ "]");
+ }
+ _newickFormatList.setElementAt(vNewickFormat, index);
+ } //-- void setNewickFormat(int, java.lang.String)
+
+ /**
+ * Method setNewickFormat
+ *
+ *
+ *
+ * @param newickFormatArray
+ */
+ public void setNewickFormat(java.lang.String[] newickFormatArray)
+ {
+ //-- copy array
+ _newickFormatList.removeAllElements();
+ for (int i = 0; i < newickFormatArray.length; i++) {
+ _newickFormatList.addElement(newickFormatArray[i]);
+ }
+ } //-- 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
*
*
*
* @version $Revision$ $Date$
*/
-public class TreeDescriptor extends TreeTypeDescriptor {
+public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
//--------------------------/
public TreeDescriptor()
{
super();
- setExtendsWithoutFlatten(new TreeTypeDescriptor());
nsURI = "http://www.vamsas.org";
- xmlName = "tree";
+ xmlName = "Tree";
+
+ //-- set grouping compositor
+ setCompositorAsSequence();
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
+ org.exolab.castor.mapping.FieldHandler handler = null;
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;
+ //-- initialize attribute descriptors
+
+ //-- _id
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
+ this.identity = desc;
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ Tree target = (Tree) object;
+ return target.getId();
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ Tree target = (Tree) object;
+ target.setId( (java.lang.String) value);
+ }
+ catch (java.lang.Exception ex) {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+ public java.lang.Object newInstance( java.lang.Object parent ) {
+ return new java.lang.String();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ //-- validation code for: _id
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ { //-- local scope
+ }
+ desc.setValidator(fieldValidator);
+ //-- initialize element descriptors
+
+ //-- _newickFormatList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_newickFormatList", "newickFormat", org.exolab.castor.xml.NodeType.Element);
+ desc.setImmutable(true);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ Tree target = (Tree) object;
+ return target.getNewickFormat();
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ Tree target = (Tree) object;
+ target.addNewickFormat( (java.lang.String) value);
+ }
+ catch (java.lang.Exception ex) {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+ public java.lang.Object newInstance( java.lang.Object parent ) {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("http://www.vamsas.org");
+ desc.setRequired(true);
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
+
+ //-- validation code for: _newickFormatList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { //-- local scope
+ StringValidator typeValidator = new StringValidator();
+ typeValidator.setWhiteSpace("preserve");
+ fieldValidator.setValidator(typeValidator);
+ }
+ desc.setValidator(fieldValidator);
+ //-- _provenance
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ Tree target = (Tree) object;
+ return target.getProvenance();
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ Tree target = (Tree) object;
+ target.setProvenance( (org.vamsas.objects.core.Provenance) value);
+ }
+ catch (java.lang.Exception ex) {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+ public java.lang.Object newInstance( java.lang.Object parent ) {
+ return new org.vamsas.objects.core.Provenance();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("http://www.vamsas.org");
+ desc.setRequired(true);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ //-- validation code for: _provenance
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(1);
+ { //-- local scope
+ }
+ desc.setValidator(fieldValidator);
} //-- org.vamsas.objects.core.TreeDescriptor()
*/
public org.exolab.castor.mapping.ClassDescriptor getExtends()
{
- return super.getExtends();
+ return null;
} //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
/**
*/
public org.exolab.castor.mapping.FieldDescriptor getIdentity()
{
- if (identity == null)
- return super.getIdentity();
return identity;
} //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
private java.lang.String _id;
/**
- * Field _dendroList
+ * Field _treeList
*/
- private java.util.Vector _dendroList;
+ private java.util.Vector _treeList;
/**
* Field _sequenceSetList
public VAMSAS()
{
super();
- _dendroList = new Vector();
+ _treeList = new Vector();
_sequenceSetList = new Vector();
} //-- org.vamsas.objects.core.VAMSAS()
//-----------/
/**
- * Method addDendro
+ * Method addSequenceSet
*
*
*
- * @param vDendro
+ * @param vSequenceSet
*/
- public void addDendro(org.vamsas.objects.core.Dendro vDendro)
+ public void addSequenceSet(org.vamsas.objects.core.SequenceSet vSequenceSet)
throws java.lang.IndexOutOfBoundsException
{
- _dendroList.addElement(vDendro);
- } //-- void addDendro(org.vamsas.objects.core.Dendro)
+ _sequenceSetList.addElement(vSequenceSet);
+ } //-- void addSequenceSet(org.vamsas.objects.core.SequenceSet)
/**
- * Method addDendro
+ * Method addSequenceSet
*
*
*
* @param index
- * @param vDendro
+ * @param vSequenceSet
*/
- public void addDendro(int index, org.vamsas.objects.core.Dendro vDendro)
+ public void addSequenceSet(int index, org.vamsas.objects.core.SequenceSet vSequenceSet)
throws java.lang.IndexOutOfBoundsException
{
- _dendroList.insertElementAt(vDendro, index);
- } //-- void addDendro(int, org.vamsas.objects.core.Dendro)
+ _sequenceSetList.insertElementAt(vSequenceSet, index);
+ } //-- void addSequenceSet(int, org.vamsas.objects.core.SequenceSet)
/**
- * Method addSequenceSet
+ * Method addTree
*
*
*
- * @param vSequenceSet
+ * @param vTree
*/
- public void addSequenceSet(org.vamsas.objects.core.SequenceSet vSequenceSet)
+ public void addTree(org.vamsas.objects.core.Tree vTree)
throws java.lang.IndexOutOfBoundsException
{
- _sequenceSetList.addElement(vSequenceSet);
- } //-- void addSequenceSet(org.vamsas.objects.core.SequenceSet)
+ _treeList.addElement(vTree);
+ } //-- void addTree(org.vamsas.objects.core.Tree)
/**
- * Method addSequenceSet
+ * Method addTree
*
*
*
* @param index
- * @param vSequenceSet
+ * @param vTree
*/
- public void addSequenceSet(int index, org.vamsas.objects.core.SequenceSet vSequenceSet)
+ public void addTree(int index, org.vamsas.objects.core.Tree vTree)
throws java.lang.IndexOutOfBoundsException
{
- _sequenceSetList.insertElementAt(vSequenceSet, index);
- } //-- void addSequenceSet(int, org.vamsas.objects.core.SequenceSet)
+ _treeList.insertElementAt(vTree, index);
+ } //-- void addTree(int, org.vamsas.objects.core.Tree)
/**
- * Method enumerateDendro
+ * Method enumerateSequenceSet
*
*
*
* @return Enumeration
*/
- public java.util.Enumeration enumerateDendro()
+ public java.util.Enumeration enumerateSequenceSet()
{
- return _dendroList.elements();
- } //-- java.util.Enumeration enumerateDendro()
+ return _sequenceSetList.elements();
+ } //-- java.util.Enumeration enumerateSequenceSet()
/**
- * Method enumerateSequenceSet
+ * Method enumerateTree
*
*
*
* @return Enumeration
*/
- public java.util.Enumeration enumerateSequenceSet()
+ public java.util.Enumeration enumerateTree()
{
- return _sequenceSetList.elements();
- } //-- java.util.Enumeration enumerateSequenceSet()
+ return _treeList.elements();
+ } //-- java.util.Enumeration enumerateTree()
/**
* Note: hashCode() has not been overriden
}
else if (temp._id != null)
return false;
- if (this._dendroList != null) {
- if (temp._dendroList == null) return false;
- else if (!(this._dendroList.equals(temp._dendroList)))
+ if (this._treeList != null) {
+ if (temp._treeList == null) return false;
+ else if (!(this._treeList.equals(temp._treeList)))
return false;
}
- else if (temp._dendroList != null)
+ else if (temp._treeList != null)
return false;
if (this._sequenceSetList != null) {
if (temp._sequenceSetList == null) return false;
} //-- boolean equals(java.lang.Object)
/**
- * Method getDendro
+ * 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 getSequenceSet
*
*
*
* @param index
- * @return Dendro
+ * @return SequenceSet
*/
- public org.vamsas.objects.core.Dendro getDendro(int index)
+ public org.vamsas.objects.core.SequenceSet getSequenceSet(int index)
throws java.lang.IndexOutOfBoundsException
{
//-- check bounds for index
- if ((index < 0) || (index > _dendroList.size())) {
- throw new IndexOutOfBoundsException("getDendro: Index value '"+index+"' not in range [0.."+_dendroList.size()+ "]");
+ if ((index < 0) || (index > _sequenceSetList.size())) {
+ throw new IndexOutOfBoundsException("getSequenceSet: Index value '"+index+"' not in range [0.."+_sequenceSetList.size()+ "]");
}
- return (org.vamsas.objects.core.Dendro) _dendroList.elementAt(index);
- } //-- org.vamsas.objects.core.Dendro getDendro(int)
+ return (org.vamsas.objects.core.SequenceSet) _sequenceSetList.elementAt(index);
+ } //-- org.vamsas.objects.core.SequenceSet getSequenceSet(int)
/**
- * Method getDendro
+ * Method getSequenceSet
*
*
*
- * @return Dendro
+ * @return SequenceSet
*/
- public org.vamsas.objects.core.Dendro[] getDendro()
+ public org.vamsas.objects.core.SequenceSet[] getSequenceSet()
{
- int size = _dendroList.size();
- org.vamsas.objects.core.Dendro[] mArray = new org.vamsas.objects.core.Dendro[size];
+ 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.Dendro) _dendroList.elementAt(index);
+ mArray[index] = (org.vamsas.objects.core.SequenceSet) _sequenceSetList.elementAt(index);
}
return mArray;
- } //-- org.vamsas.objects.core.Dendro[] getDendro()
+ } //-- org.vamsas.objects.core.SequenceSet[] getSequenceSet()
/**
- * Method getDendroCount
+ * Method getSequenceSetCount
*
*
*
* @return int
*/
- public int getDendroCount()
- {
- return _dendroList.size();
- } //-- int getDendroCount()
-
- /**
- * Returns the value of field 'id'.
- *
- * @return String
- * @return the value of field 'id'.
- */
- public java.lang.String getId()
+ public int getSequenceSetCount()
{
- return this._id;
- } //-- java.lang.String getId()
+ return _sequenceSetList.size();
+ } //-- int getSequenceSetCount()
/**
- * Method getSequenceSet
+ * Method getTree
*
*
*
* @param index
- * @return SequenceSet
+ * @return Tree
*/
- public org.vamsas.objects.core.SequenceSet getSequenceSet(int index)
+ public org.vamsas.objects.core.Tree getTree(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()+ "]");
+ if ((index < 0) || (index > _treeList.size())) {
+ throw new IndexOutOfBoundsException("getTree: Index value '"+index+"' not in range [0.."+_treeList.size()+ "]");
}
- return (org.vamsas.objects.core.SequenceSet) _sequenceSetList.elementAt(index);
- } //-- org.vamsas.objects.core.SequenceSet getSequenceSet(int)
+ return (org.vamsas.objects.core.Tree) _treeList.elementAt(index);
+ } //-- org.vamsas.objects.core.Tree getTree(int)
/**
- * Method getSequenceSet
+ * Method getTree
*
*
*
- * @return SequenceSet
+ * @return Tree
*/
- public org.vamsas.objects.core.SequenceSet[] getSequenceSet()
+ public org.vamsas.objects.core.Tree[] getTree()
{
- int size = _sequenceSetList.size();
- org.vamsas.objects.core.SequenceSet[] mArray = new org.vamsas.objects.core.SequenceSet[size];
+ 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.SequenceSet) _sequenceSetList.elementAt(index);
+ mArray[index] = (org.vamsas.objects.core.Tree) _treeList.elementAt(index);
}
return mArray;
- } //-- org.vamsas.objects.core.SequenceSet[] getSequenceSet()
+ } //-- org.vamsas.objects.core.Tree[] getTree()
/**
- * Method getSequenceSetCount
+ * Method getTreeCount
*
*
*
* @return int
*/
- public int getSequenceSetCount()
+ public int getTreeCount()
{
- return _sequenceSetList.size();
- } //-- int getSequenceSetCount()
+ return _treeList.size();
+ } //-- int getTreeCount()
/**
* Method isValid
} //-- void marshal(org.xml.sax.ContentHandler)
/**
- * Method removeAllDendro
- *
- */
- public void removeAllDendro()
- {
- _dendroList.removeAllElements();
- } //-- void removeAllDendro()
-
- /**
* Method removeAllSequenceSet
*
*/
} //-- void removeAllSequenceSet()
/**
- * Method removeDendro
+ * Method removeAllTree
*
- *
- *
- * @param index
- * @return Dendro
*/
- public org.vamsas.objects.core.Dendro removeDendro(int index)
+ public void removeAllTree()
{
- java.lang.Object obj = _dendroList.elementAt(index);
- _dendroList.removeElementAt(index);
- return (org.vamsas.objects.core.Dendro) obj;
- } //-- org.vamsas.objects.core.Dendro removeDendro(int)
+ _treeList.removeAllElements();
+ } //-- void removeAllTree()
/**
* Method removeSequenceSet
} //-- org.vamsas.objects.core.SequenceSet removeSequenceSet(int)
/**
- * Method setDendro
+ * Method removeTree
*
*
*
* @param index
- * @param vDendro
+ * @return Tree
*/
- public void setDendro(int index, org.vamsas.objects.core.Dendro vDendro)
- throws java.lang.IndexOutOfBoundsException
+ public org.vamsas.objects.core.Tree removeTree(int index)
{
- //-- check bounds for index
- if ((index < 0) || (index > _dendroList.size())) {
- throw new IndexOutOfBoundsException("setDendro: Index value '"+index+"' not in range [0.."+_dendroList.size()+ "]");
- }
- _dendroList.setElementAt(vDendro, index);
- } //-- void setDendro(int, org.vamsas.objects.core.Dendro)
-
- /**
- * Method setDendro
- *
- *
- *
- * @param dendroArray
- */
- public void setDendro(org.vamsas.objects.core.Dendro[] dendroArray)
- {
- //-- copy array
- _dendroList.removeAllElements();
- for (int i = 0; i < dendroArray.length; i++) {
- _dendroList.addElement(dendroArray[i]);
- }
- } //-- void setDendro(org.vamsas.objects.core.Dendro)
+ 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 'id'.
} //-- void setSequenceSet(org.vamsas.objects.core.SequenceSet)
/**
+ * 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
*
*
desc.setValidator(fieldValidator);
//-- initialize element descriptors
- //-- _dendroList
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Dendro.class, "_dendroList", "Dendro", org.exolab.castor.xml.NodeType.Element);
+ //-- _treeList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Tree.class, "_treeList", "Tree", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
VAMSAS target = (VAMSAS) object;
- return target.getDendro();
+ return target.getTree();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
VAMSAS target = (VAMSAS) object;
- target.addDendro( (org.vamsas.objects.core.Dendro) value);
+ target.addTree( (org.vamsas.objects.core.Tree) value);
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance( java.lang.Object parent ) {
- return new org.vamsas.objects.core.Dendro();
+ return new org.vamsas.objects.core.Tree();
}
};
desc.setHandler(handler);
desc.setMultivalued(true);
addFieldDescriptor(desc);
- //-- validation code for: _dendroList
+ //-- validation code for: _treeList
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(0);
{ //-- local scope