From c68ce4c63bd79f23b87aac3eb0afa7f6b42a3098 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 14 Jun 2005 10:40:13 +0000 Subject: [PATCH] Saves trees --- src/jalview/binding/Alignment.java | 168 ++-- src/jalview/binding/Annotation.java | 337 +++---- src/jalview/binding/AnnotationElement.java | 258 +++-- src/jalview/binding/Colour.java | 168 ++-- src/jalview/binding/JGroup.java | 601 ++++++----- src/jalview/binding/JSeq.java | 286 +++--- src/jalview/binding/JalviewModel.java | 186 ++-- src/jalview/binding/JalviewModelSequence.java | 783 +++++++++------ src/jalview/binding/JalviewModelSequence2.java | 270 +++-- src/jalview/binding/JalviewModelSequence2Item.java | 191 ++-- src/jalview/binding/JalviewUserColours.java | 257 +++-- src/jalview/binding/JalviewUserColoursItem.java | 76 +- src/jalview/binding/Residue.java | 188 ++-- src/jalview/binding/Sequence.java | 132 ++- src/jalview/binding/SequenceSet.java | 434 ++++---- src/jalview/binding/SequenceType.java | 184 ++-- src/jalview/binding/Tree.java | 756 ++++++++++++++ src/jalview/binding/UserColour.java | 189 ++-- src/jalview/binding/UserColourScheme.java | 133 ++- src/jalview/binding/UserColours.java | 169 ++-- src/jalview/binding/VAMSAS.java | 515 +++++----- src/jalview/binding/VamsasModel.java | 132 ++- src/jalview/binding/Viewport.java | 1056 ++++++++++---------- 23 files changed, 4077 insertions(+), 3392 deletions(-) create mode 100755 src/jalview/binding/Tree.java diff --git a/src/jalview/binding/Alignment.java b/src/jalview/binding/Alignment.java index 093ae6f..9a38f10 100755 --- a/src/jalview/binding/Alignment.java +++ b/src/jalview/binding/Alignment.java @@ -1,53 +1,36 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 Alignment. - * + * * @version $Revision$ $Date$ */ public class Alignment implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -60,120 +43,131 @@ public class Alignment implements java.io.Serializable { */ private jalview.binding.SequenceSet _sequenceSet; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public Alignment() { super(); - } - //-- jalview.binding.Alignment() - //-----------/ + } //-- jalview.binding.Alignment() - public jalview.binding.Annotation getAnnotation() { + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'annotation'. + * + * @return Annotation + * @return the value of field 'annotation'. + */ + public jalview.binding.Annotation getAnnotation() + { return this._annotation; - } - //-- jalview.binding.Annotation getAnnotation() + } //-- jalview.binding.Annotation getAnnotation() /** * Returns the value of field 'sequenceSet'. - * + * * @return SequenceSet * @return the value of field 'sequenceSet'. */ - public jalview.binding.SequenceSet getSequenceSet() { + public jalview.binding.SequenceSet getSequenceSet() + { return this._sequenceSet; - } - //-- jalview.binding.SequenceSet getSequenceSet() + } //-- jalview.binding.SequenceSet getSequenceSet() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'annotation'. - * + * * @param annotation the value of field 'annotation'. */ - public void setAnnotation(jalview.binding.Annotation annotation) { + public void setAnnotation(jalview.binding.Annotation annotation) + { this._annotation = annotation; - } - //-- void setAnnotation(jalview.binding.Annotation) + } //-- void setAnnotation(jalview.binding.Annotation) /** * Sets the value of field 'sequenceSet'. - * + * * @param sequenceSet the value of field 'sequenceSet'. */ - public void setSequenceSet(jalview.binding.SequenceSet sequenceSet) { + public void setSequenceSet(jalview.binding.SequenceSet sequenceSet) + { this._sequenceSet = sequenceSet; - } - //-- void setSequenceSet(jalview.binding.SequenceSet) + } //-- void setSequenceSet(jalview.binding.SequenceSet) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.Alignment) Unmarshaller.unmarshal(jalview.binding.Alignment.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.Alignment) Unmarshaller.unmarshal(jalview.binding.Alignment.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/Annotation.java b/src/jalview/binding/Annotation.java index 6879c96..fefdd12 100755 --- a/src/jalview/binding/Annotation.java +++ b/src/jalview/binding/Annotation.java @@ -1,56 +1,38 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 Annotation. - * + * * @version $Revision$ $Date$ */ public class Annotation implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -78,317 +60,320 @@ public class Annotation implements java.io.Serializable { */ private java.lang.String _description; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public Annotation() { super(); _annotationElementList = new Vector(); - } - //-- jalview.binding.Annotation() - //-----------/ + } //-- jalview.binding.Annotation() + - public void addAnnotationElement( - jalview.binding.AnnotationElement vAnnotationElement) - throws java.lang.IndexOutOfBoundsException { + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addAnnotationElement + * + * + * + * @param vAnnotationElement + */ + public void addAnnotationElement(jalview.binding.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { _annotationElementList.addElement(vAnnotationElement); - } - //-- void addAnnotationElement(jalview.binding.AnnotationElement) + } //-- void addAnnotationElement(jalview.binding.AnnotationElement) /** * Method addAnnotationElement - * - * - * + * + * + * * @param index * @param vAnnotationElement */ - public void addAnnotationElement(int index, - jalview.binding.AnnotationElement vAnnotationElement) - throws java.lang.IndexOutOfBoundsException { + public void addAnnotationElement(int index, jalview.binding.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { _annotationElementList.insertElementAt(vAnnotationElement, index); - } - //-- void addAnnotationElement(int, jalview.binding.AnnotationElement) + } //-- void addAnnotationElement(int, jalview.binding.AnnotationElement) /** * Method deleteGraph - * + * */ - public void deleteGraph() { - this._has_graph = false; - } - //-- void deleteGraph() + public void deleteGraph() + { + this._has_graph= false; + } //-- void deleteGraph() /** * Method enumerateAnnotationElement - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateAnnotationElement() { + public java.util.Enumeration enumerateAnnotationElement() + { return _annotationElementList.elements(); - } - //-- java.util.Enumeration enumerateAnnotationElement() + } //-- java.util.Enumeration enumerateAnnotationElement() /** * Method getAnnotationElement - * - * - * + * + * + * * @param index * @return AnnotationElement */ public jalview.binding.AnnotationElement getAnnotationElement(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _annotationElementList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.AnnotationElement) _annotationElementList.elementAt(index); - } - //-- jalview.binding.AnnotationElement getAnnotationElement(int) + } //-- jalview.binding.AnnotationElement getAnnotationElement(int) /** * Method getAnnotationElement - * - * - * + * + * + * * @return AnnotationElement */ - public jalview.binding.AnnotationElement[] getAnnotationElement() { + public jalview.binding.AnnotationElement[] getAnnotationElement() + { int size = _annotationElementList.size(); jalview.binding.AnnotationElement[] mArray = new jalview.binding.AnnotationElement[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.AnnotationElement) _annotationElementList.elementAt(index); } - return mArray; - } - //-- jalview.binding.AnnotationElement[] getAnnotationElement() + } //-- jalview.binding.AnnotationElement[] getAnnotationElement() /** * Method getAnnotationElementCount - * - * - * + * + * + * * @return int */ - public int getAnnotationElementCount() { + public int getAnnotationElementCount() + { return _annotationElementList.size(); - } - //-- int getAnnotationElementCount() + } //-- int getAnnotationElementCount() /** * Returns the value of field 'description'. - * + * * @return String * @return the value of field 'description'. */ - public java.lang.String getDescription() { + public java.lang.String getDescription() + { return this._description; - } - //-- java.lang.String getDescription() + } //-- java.lang.String getDescription() /** * Returns the value of field 'graph'. - * + * * @return boolean * @return the value of field 'graph'. */ - public boolean getGraph() { + public boolean getGraph() + { return this._graph; - } - //-- boolean getGraph() + } //-- boolean getGraph() /** * Returns the value of field 'label'. - * + * * @return String * @return the value of field 'label'. */ - public java.lang.String getLabel() { + public java.lang.String getLabel() + { return this._label; - } - //-- java.lang.String getLabel() + } //-- java.lang.String getLabel() /** * Method hasGraph - * - * - * + * + * + * * @return boolean */ - public boolean hasGraph() { + public boolean hasGraph() + { return this._has_graph; - } - //-- boolean hasGraph() + } //-- boolean hasGraph() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Method removeAllAnnotationElement - * + * */ - public void removeAllAnnotationElement() { + public void removeAllAnnotationElement() + { _annotationElementList.removeAllElements(); - } - //-- void removeAllAnnotationElement() + } //-- void removeAllAnnotationElement() /** * Method removeAnnotationElement - * - * - * + * + * + * * @param index * @return AnnotationElement */ - public jalview.binding.AnnotationElement removeAnnotationElement(int index) { + public jalview.binding.AnnotationElement removeAnnotationElement(int index) + { java.lang.Object obj = _annotationElementList.elementAt(index); _annotationElementList.removeElementAt(index); - return (jalview.binding.AnnotationElement) obj; - } - //-- jalview.binding.AnnotationElement removeAnnotationElement(int) + } //-- jalview.binding.AnnotationElement removeAnnotationElement(int) /** * Method setAnnotationElement - * - * - * + * + * + * * @param index * @param vAnnotationElement */ - public void setAnnotationElement(int index, - jalview.binding.AnnotationElement vAnnotationElement) - throws java.lang.IndexOutOfBoundsException { + public void setAnnotationElement(int index, jalview.binding.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _annotationElementList.size())) { throw new IndexOutOfBoundsException(); } - _annotationElementList.setElementAt(vAnnotationElement, index); - } - //-- void setAnnotationElement(int, jalview.binding.AnnotationElement) + } //-- void setAnnotationElement(int, jalview.binding.AnnotationElement) /** * Method setAnnotationElement - * - * - * + * + * + * * @param annotationElementArray */ - public void setAnnotationElement( - jalview.binding.AnnotationElement[] annotationElementArray) { + public void setAnnotationElement(jalview.binding.AnnotationElement[] annotationElementArray) + { //-- copy array _annotationElementList.removeAllElements(); - for (int i = 0; i < annotationElementArray.length; i++) { _annotationElementList.addElement(annotationElementArray[i]); } - } - //-- void setAnnotationElement(jalview.binding.AnnotationElement) + } //-- void setAnnotationElement(jalview.binding.AnnotationElement) /** * Sets the value of field 'description'. - * + * * @param description the value of field 'description'. */ - public void setDescription(java.lang.String description) { + public void setDescription(java.lang.String description) + { this._description = description; - } - //-- void setDescription(java.lang.String) + } //-- void setDescription(java.lang.String) /** * Sets the value of field 'graph'. - * + * * @param graph the value of field 'graph'. */ - public void setGraph(boolean graph) { + public void setGraph(boolean graph) + { this._graph = graph; this._has_graph = true; - } - //-- void setGraph(boolean) + } //-- void setGraph(boolean) /** * Sets the value of field 'label'. - * + * * @param label the value of field 'label'. */ - public void setLabel(java.lang.String label) { + public void setLabel(java.lang.String label) + { this._label = label; - } - //-- void setLabel(java.lang.String) + } //-- void setLabel(java.lang.String) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.Annotation) Unmarshaller.unmarshal(jalview.binding.Annotation.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.Annotation) Unmarshaller.unmarshal(jalview.binding.Annotation.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/AnnotationElement.java b/src/jalview/binding/AnnotationElement.java index 3c6eba4..e4aec31 100755 --- a/src/jalview/binding/AnnotationElement.java +++ b/src/jalview/binding/AnnotationElement.java @@ -1,53 +1,36 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -85,230 +68,239 @@ public class AnnotationElement implements java.io.Serializable { */ private boolean _has_value; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public AnnotationElement() { super(); - } - //-- jalview.binding.AnnotationElement() - //-----------/ + } //-- jalview.binding.AnnotationElement() - public void deletePosition() { - this._has_position = false; - } - //-- void deletePosition() + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deletePosition + * + */ + public void deletePosition() + { + this._has_position= false; + } //-- void deletePosition() /** * Method deleteValue - * + * */ - public void deleteValue() { - this._has_value = false; - } - //-- void deleteValue() + public void deleteValue() + { + this._has_value= false; + } //-- void deleteValue() /** * Returns the value of field 'description'. - * + * * @return String * @return the value of field 'description'. */ - public java.lang.String getDescription() { + public java.lang.String getDescription() + { return this._description; - } - //-- java.lang.String getDescription() + } //-- java.lang.String getDescription() /** * Returns the value of field 'displayCharacter'. - * + * * @return String * @return the value of field 'displayCharacter'. */ - public java.lang.String getDisplayCharacter() { + public java.lang.String getDisplayCharacter() + { return this._displayCharacter; - } - //-- java.lang.String getDisplayCharacter() + } //-- java.lang.String getDisplayCharacter() /** * Returns the value of field 'position'. - * + * * @return int * @return the value of field 'position'. */ - public int getPosition() { + public int getPosition() + { return this._position; - } - //-- int getPosition() + } //-- int getPosition() /** * Returns the value of field 'secondaryStructure'. - * + * * @return String * @return the value of field 'secondaryStructure'. */ - public java.lang.String getSecondaryStructure() { + public java.lang.String getSecondaryStructure() + { return this._secondaryStructure; - } - //-- java.lang.String getSecondaryStructure() + } //-- java.lang.String getSecondaryStructure() /** * Returns the value of field 'value'. - * + * * @return float * @return the value of field 'value'. */ - public float getValue() { + public float getValue() + { return this._value; - } - //-- float getValue() + } //-- float getValue() /** * Method hasPosition - * - * - * + * + * + * * @return boolean */ - public boolean hasPosition() { + public boolean hasPosition() + { return this._has_position; - } - //-- boolean hasPosition() + } //-- boolean hasPosition() /** * Method hasValue - * - * - * + * + * + * * @return boolean */ - public boolean hasValue() { + public boolean hasValue() + { return this._has_value; - } - //-- boolean hasValue() + } //-- boolean hasValue() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- 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) { + public void setDescription(java.lang.String description) + { this._description = description; - } - //-- void setDescription(java.lang.String) + } //-- 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) { + public void setDisplayCharacter(java.lang.String displayCharacter) + { this._displayCharacter = displayCharacter; - } - //-- void setDisplayCharacter(java.lang.String) + } //-- void setDisplayCharacter(java.lang.String) /** * Sets the value of field 'position'. - * + * * @param position the value of field 'position'. */ - public void setPosition(int position) { + public void setPosition(int position) + { this._position = position; this._has_position = true; - } - //-- void setPosition(int) + } //-- void setPosition(int) /** * Sets the value of field 'secondaryStructure'. - * + * * @param secondaryStructure the value of field * 'secondaryStructure'. */ - public void setSecondaryStructure(java.lang.String secondaryStructure) { + public void setSecondaryStructure(java.lang.String secondaryStructure) + { this._secondaryStructure = secondaryStructure; - } - //-- void setSecondaryStructure(java.lang.String) + } //-- void setSecondaryStructure(java.lang.String) /** * Sets the value of field 'value'. - * + * * @param value the value of field 'value'. */ - public void setValue(float value) { + public void setValue(float value) + { this._value = value; this._has_value = true; - } - //-- void setValue(float) + } //-- void setValue(float) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(jalview.binding.AnnotationElement.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.AnnotationElement) Unmarshaller.unmarshal(jalview.binding.AnnotationElement.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/Colour.java b/src/jalview/binding/Colour.java index 7cd04b3..a51102b 100755 --- a/src/jalview/binding/Colour.java +++ b/src/jalview/binding/Colour.java @@ -1,53 +1,36 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 Colour. - * + * * @version $Revision$ $Date$ */ public class Colour implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -60,120 +43,131 @@ public class Colour implements java.io.Serializable { */ private java.lang.String _RGB; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public Colour() { super(); - } - //-- jalview.binding.Colour() - //-----------/ + } //-- jalview.binding.Colour() + - public java.lang.String getName() { + //-----------/ + //- Methods -/ + //-----------/ + + /** + * 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() + } //-- java.lang.String getName() /** * Returns the value of field 'RGB'. - * + * * @return String * @return the value of field 'RGB'. */ - public java.lang.String getRGB() { + public java.lang.String getRGB() + { return this._RGB; - } - //-- java.lang.String getRGB() + } //-- java.lang.String getRGB() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'name'. - * + * * @param name the value of field 'name'. */ - public void setName(java.lang.String name) { + public void setName(java.lang.String name) + { this._name = name; - } - //-- void setName(java.lang.String) + } //-- void setName(java.lang.String) /** * Sets the value of field 'RGB'. - * + * * @param RGB the value of field 'RGB'. */ - public void setRGB(java.lang.String RGB) { + public void setRGB(java.lang.String RGB) + { this._RGB = RGB; - } - //-- void setRGB(java.lang.String) + } //-- void setRGB(java.lang.String) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.Colour) Unmarshaller.unmarshal(jalview.binding.Colour.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.Colour) Unmarshaller.unmarshal(jalview.binding.Colour.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/JGroup.java b/src/jalview/binding/JGroup.java index 3b5c0b8..6473149 100755 --- a/src/jalview/binding/JGroup.java +++ b/src/jalview/binding/JGroup.java @@ -1,56 +1,38 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 JGroup. - * + * * @version $Revision$ $Date$ */ public class JGroup implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -148,612 +130,621 @@ public class JGroup implements java.io.Serializable { */ private java.util.Vector _seqList; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public JGroup() { super(); _seqList = new Vector(); - } - //-- jalview.binding.JGroup() - //-----------/ + } //-- jalview.binding.JGroup() + - public void addSeq(int vSeq) throws java.lang.IndexOutOfBoundsException { + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addSeq + * + * + * + * @param vSeq + */ + public void addSeq(int vSeq) + throws java.lang.IndexOutOfBoundsException + { _seqList.addElement(new java.lang.Integer(vSeq)); - } - //-- void addSeq(int) + } //-- void addSeq(int) /** * Method addSeq - * - * - * + * + * + * * @param index * @param vSeq */ public void addSeq(int index, int vSeq) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _seqList.insertElementAt(new java.lang.Integer(vSeq), index); - } - //-- void addSeq(int, int) + } //-- void addSeq(int, int) /** * Method deleteColourText - * + * */ - public void deleteColourText() { - this._has_colourText = false; - } - //-- void deleteColourText() + public void deleteColourText() + { + this._has_colourText= false; + } //-- void deleteColourText() /** * Method deleteConsThreshold - * + * */ - public void deleteConsThreshold() { - this._has_consThreshold = false; - } - //-- void deleteConsThreshold() + public void deleteConsThreshold() + { + this._has_consThreshold= false; + } //-- void deleteConsThreshold() /** * Method deleteDisplayBoxes - * + * */ - public void deleteDisplayBoxes() { - this._has_displayBoxes = false; - } - //-- void deleteDisplayBoxes() + public void deleteDisplayBoxes() + { + this._has_displayBoxes= false; + } //-- void deleteDisplayBoxes() /** * Method deleteDisplayText - * + * */ - public void deleteDisplayText() { - this._has_displayText = false; - } - //-- void deleteDisplayText() + public void deleteDisplayText() + { + this._has_displayText= false; + } //-- void deleteDisplayText() /** * Method deleteEnd - * + * */ - public void deleteEnd() { - this._has_end = false; - } - //-- void deleteEnd() + public void deleteEnd() + { + this._has_end= false; + } //-- void deleteEnd() /** * Method deleteOutlineColour - * + * */ - public void deleteOutlineColour() { - this._has_outlineColour = false; - } - //-- void deleteOutlineColour() + public void deleteOutlineColour() + { + this._has_outlineColour= false; + } //-- void deleteOutlineColour() /** * Method deletePidThreshold - * + * */ - public void deletePidThreshold() { - this._has_pidThreshold = false; - } - //-- void deletePidThreshold() + public void deletePidThreshold() + { + this._has_pidThreshold= false; + } //-- void deletePidThreshold() /** * Method deleteStart - * + * */ - public void deleteStart() { - this._has_start = false; - } - //-- void deleteStart() + public void deleteStart() + { + this._has_start= false; + } //-- void deleteStart() /** * Method enumerateSeq - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateSeq() { + public java.util.Enumeration enumerateSeq() + { return _seqList.elements(); - } - //-- java.util.Enumeration enumerateSeq() + } //-- java.util.Enumeration enumerateSeq() /** * Returns the value of field 'colour'. - * + * * @return String * @return the value of field 'colour'. */ - public java.lang.String getColour() { + public java.lang.String getColour() + { return this._colour; - } - //-- java.lang.String getColour() + } //-- java.lang.String getColour() /** * Returns the value of field 'colourText'. - * + * * @return boolean * @return the value of field 'colourText'. */ - public boolean getColourText() { + public boolean getColourText() + { return this._colourText; - } - //-- boolean getColourText() + } //-- boolean getColourText() /** * Returns the value of field 'consThreshold'. - * + * * @return int * @return the value of field 'consThreshold'. */ - public int getConsThreshold() { + public int getConsThreshold() + { return this._consThreshold; - } - //-- int getConsThreshold() + } //-- int getConsThreshold() /** * Returns the value of field 'displayBoxes'. - * + * * @return boolean * @return the value of field 'displayBoxes'. */ - public boolean getDisplayBoxes() { + public boolean getDisplayBoxes() + { return this._displayBoxes; - } - //-- boolean getDisplayBoxes() + } //-- boolean getDisplayBoxes() /** * Returns the value of field 'displayText'. - * + * * @return boolean * @return the value of field 'displayText'. */ - public boolean getDisplayText() { + public boolean getDisplayText() + { return this._displayText; - } - //-- boolean getDisplayText() + } //-- boolean getDisplayText() /** * Returns the value of field 'end'. - * + * * @return int * @return the value of field 'end'. */ - public int getEnd() { + public int getEnd() + { return this._end; - } - //-- int getEnd() + } //-- int getEnd() /** * Returns the value of field 'name'. - * + * * @return String * @return the value of field 'name'. */ - public java.lang.String getName() { + public java.lang.String getName() + { return this._name; - } - //-- java.lang.String getName() + } //-- java.lang.String getName() /** * Returns the value of field 'outlineColour'. - * + * * @return int * @return the value of field 'outlineColour'. */ - public int getOutlineColour() { + public int getOutlineColour() + { return this._outlineColour; - } - //-- int getOutlineColour() + } //-- int getOutlineColour() /** * Returns the value of field 'pidThreshold'. - * + * * @return int * @return the value of field 'pidThreshold'. */ - public int getPidThreshold() { + public int getPidThreshold() + { return this._pidThreshold; - } - //-- int getPidThreshold() + } //-- int getPidThreshold() /** * Method getSeq - * - * - * + * + * + * * @param index * @return int */ - public int getSeq(int index) throws java.lang.IndexOutOfBoundsException { + public int getSeq(int index) + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _seqList.size())) { throw new IndexOutOfBoundsException(); } - - return ((java.lang.Integer) _seqList.elementAt(index)).intValue(); - } - //-- int getSeq(int) + + return ((java.lang.Integer)_seqList.elementAt(index)).intValue(); + } //-- int getSeq(int) /** * Method getSeq - * - * - * + * + * + * * @return int */ - public int[] getSeq() { + public int[] getSeq() + { int size = _seqList.size(); int[] mArray = new int[size]; - for (int index = 0; index < size; index++) { - mArray[index] = ((java.lang.Integer) _seqList.elementAt(index)).intValue(); + mArray[index] = ((java.lang.Integer)_seqList.elementAt(index)).intValue(); } - return mArray; - } - //-- int[] getSeq() + } //-- int[] getSeq() /** * Method getSeqCount - * - * - * + * + * + * * @return int */ - public int getSeqCount() { + public int getSeqCount() + { return _seqList.size(); - } - //-- int getSeqCount() + } //-- int getSeqCount() /** * Returns the value of field 'start'. - * + * * @return int * @return the value of field 'start'. */ - public int getStart() { + public int getStart() + { return this._start; - } - //-- int getStart() + } //-- int getStart() /** * Method hasColourText - * - * - * + * + * + * * @return boolean */ - public boolean hasColourText() { + public boolean hasColourText() + { return this._has_colourText; - } - //-- boolean hasColourText() + } //-- boolean hasColourText() /** * Method hasConsThreshold - * - * - * + * + * + * * @return boolean */ - public boolean hasConsThreshold() { + public boolean hasConsThreshold() + { return this._has_consThreshold; - } - //-- boolean hasConsThreshold() + } //-- boolean hasConsThreshold() /** * Method hasDisplayBoxes - * - * - * + * + * + * * @return boolean */ - public boolean hasDisplayBoxes() { + public boolean hasDisplayBoxes() + { return this._has_displayBoxes; - } - //-- boolean hasDisplayBoxes() + } //-- boolean hasDisplayBoxes() /** * Method hasDisplayText - * - * - * + * + * + * * @return boolean */ - public boolean hasDisplayText() { + public boolean hasDisplayText() + { return this._has_displayText; - } - //-- boolean hasDisplayText() + } //-- boolean hasDisplayText() /** * Method hasEnd - * - * - * + * + * + * * @return boolean */ - public boolean hasEnd() { + public boolean hasEnd() + { return this._has_end; - } - //-- boolean hasEnd() + } //-- boolean hasEnd() /** * Method hasOutlineColour - * - * - * + * + * + * * @return boolean */ - public boolean hasOutlineColour() { + public boolean hasOutlineColour() + { return this._has_outlineColour; - } - //-- boolean hasOutlineColour() + } //-- boolean hasOutlineColour() /** * Method hasPidThreshold - * - * - * + * + * + * * @return boolean */ - public boolean hasPidThreshold() { + public boolean hasPidThreshold() + { return this._has_pidThreshold; - } - //-- boolean hasPidThreshold() + } //-- boolean hasPidThreshold() /** * Method hasStart - * - * - * + * + * + * * @return boolean */ - public boolean hasStart() { + public boolean hasStart() + { return this._has_start; - } - //-- boolean hasStart() + } //-- boolean hasStart() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Method removeAllSeq - * + * */ - public void removeAllSeq() { + public void removeAllSeq() + { _seqList.removeAllElements(); - } - //-- void removeAllSeq() + } //-- void removeAllSeq() /** * Method removeSeq - * - * - * + * + * + * * @param index * @return int */ - public int removeSeq(int index) { + public int removeSeq(int index) + { java.lang.Object obj = _seqList.elementAt(index); _seqList.removeElementAt(index); - - return ((java.lang.Integer) obj).intValue(); - } - //-- int removeSeq(int) + return ((java.lang.Integer)obj).intValue(); + } //-- int removeSeq(int) /** * Sets the value of field 'colour'. - * + * * @param colour the value of field 'colour'. */ - public void setColour(java.lang.String colour) { + public void setColour(java.lang.String colour) + { this._colour = colour; - } - //-- void setColour(java.lang.String) + } //-- void setColour(java.lang.String) /** * Sets the value of field 'colourText'. - * + * * @param colourText the value of field 'colourText'. */ - public void setColourText(boolean colourText) { + public void setColourText(boolean colourText) + { this._colourText = colourText; this._has_colourText = true; - } - //-- void setColourText(boolean) + } //-- void setColourText(boolean) /** * Sets the value of field 'consThreshold'. - * + * * @param consThreshold the value of field 'consThreshold'. */ - public void setConsThreshold(int consThreshold) { + public void setConsThreshold(int consThreshold) + { this._consThreshold = consThreshold; this._has_consThreshold = true; - } - //-- void setConsThreshold(int) + } //-- void setConsThreshold(int) /** * Sets the value of field 'displayBoxes'. - * + * * @param displayBoxes the value of field 'displayBoxes'. */ - public void setDisplayBoxes(boolean displayBoxes) { + public void setDisplayBoxes(boolean displayBoxes) + { this._displayBoxes = displayBoxes; this._has_displayBoxes = true; - } - //-- void setDisplayBoxes(boolean) + } //-- void setDisplayBoxes(boolean) /** * Sets the value of field 'displayText'. - * + * * @param displayText the value of field 'displayText'. */ - public void setDisplayText(boolean displayText) { + public void setDisplayText(boolean displayText) + { this._displayText = displayText; this._has_displayText = true; - } - //-- void setDisplayText(boolean) + } //-- void setDisplayText(boolean) /** * Sets the value of field 'end'. - * + * * @param end the value of field 'end'. */ - public void setEnd(int end) { + public void setEnd(int end) + { this._end = end; this._has_end = true; - } - //-- void setEnd(int) + } //-- void setEnd(int) /** * Sets the value of field 'name'. - * + * * @param name the value of field 'name'. */ - public void setName(java.lang.String name) { + public void setName(java.lang.String name) + { this._name = name; - } - //-- void setName(java.lang.String) + } //-- void setName(java.lang.String) /** * Sets the value of field 'outlineColour'. - * + * * @param outlineColour the value of field 'outlineColour'. */ - public void setOutlineColour(int outlineColour) { + public void setOutlineColour(int outlineColour) + { this._outlineColour = outlineColour; this._has_outlineColour = true; - } - //-- void setOutlineColour(int) + } //-- void setOutlineColour(int) /** * Sets the value of field 'pidThreshold'. - * + * * @param pidThreshold the value of field 'pidThreshold'. */ - public void setPidThreshold(int pidThreshold) { + public void setPidThreshold(int pidThreshold) + { this._pidThreshold = pidThreshold; this._has_pidThreshold = true; - } - //-- void setPidThreshold(int) + } //-- void setPidThreshold(int) /** * Method setSeq - * - * - * + * + * + * * @param index * @param vSeq */ public void setSeq(int index, int vSeq) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _seqList.size())) { throw new IndexOutOfBoundsException(); } - _seqList.setElementAt(new java.lang.Integer(vSeq), index); - } - //-- void setSeq(int, int) + } //-- void setSeq(int, int) /** * Method setSeq - * - * - * + * + * + * * @param seqArray */ - public void setSeq(int[] seqArray) { + public void setSeq(int[] seqArray) + { //-- copy array _seqList.removeAllElements(); - for (int i = 0; i < seqArray.length; i++) { _seqList.addElement(new java.lang.Integer(seqArray[i])); } - } - //-- void setSeq(int) + } //-- void setSeq(int) /** * Sets the value of field 'start'. - * + * * @param start the value of field 'start'. */ - public void setStart(int start) { + public void setStart(int start) + { this._start = start; this._has_start = true; - } - //-- void setStart(int) + } //-- void setStart(int) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.JGroup) Unmarshaller.unmarshal(jalview.binding.JGroup.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.JGroup) Unmarshaller.unmarshal(jalview.binding.JGroup.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/JSeq.java b/src/jalview/binding/JSeq.java index cabf5c8..751409f 100755 --- a/src/jalview/binding/JSeq.java +++ b/src/jalview/binding/JSeq.java @@ -1,53 +1,36 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 JSeq. - * + * * @version $Revision$ $Date$ */ public class JSeq implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -90,252 +73,261 @@ public class JSeq implements java.io.Serializable { */ private boolean _has_id; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public JSeq() { super(); - } - //-- jalview.binding.JSeq() - //-----------/ + } //-- jalview.binding.JSeq() - public void deleteColour() { - this._has_colour = false; - } - //-- void deleteColour() + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteColour + * + */ + public void deleteColour() + { + this._has_colour= false; + } //-- void deleteColour() /** * Method deleteEnd - * + * */ - public void deleteEnd() { - this._has_end = false; - } - //-- void deleteEnd() + public void deleteEnd() + { + this._has_end= false; + } //-- void deleteEnd() /** * Method deleteId - * + * */ - public void deleteId() { - this._has_id = false; - } - //-- void deleteId() + public void deleteId() + { + this._has_id= false; + } //-- void deleteId() /** * Method deleteStart - * + * */ - public void deleteStart() { - this._has_start = false; - } - //-- void deleteStart() + public void deleteStart() + { + this._has_start= false; + } //-- void deleteStart() /** * Returns the value of field 'colour'. - * + * * @return int * @return the value of field 'colour'. */ - public int getColour() { + public int getColour() + { return this._colour; - } - //-- int getColour() + } //-- int getColour() /** * Returns the value of field 'end'. - * + * * @return int * @return the value of field 'end'. */ - public int getEnd() { + public int getEnd() + { return this._end; - } - //-- int getEnd() + } //-- int getEnd() /** * Returns the value of field 'id'. - * + * * @return int * @return the value of field 'id'. */ - public int getId() { + public int getId() + { return this._id; - } - //-- int getId() + } //-- int getId() /** * Returns the value of field 'start'. - * + * * @return int * @return the value of field 'start'. */ - public int getStart() { + public int getStart() + { return this._start; - } - //-- int getStart() + } //-- int getStart() /** * Method hasColour - * - * - * + * + * + * * @return boolean */ - public boolean hasColour() { + public boolean hasColour() + { return this._has_colour; - } - //-- boolean hasColour() + } //-- boolean hasColour() /** * Method hasEnd - * - * - * + * + * + * * @return boolean */ - public boolean hasEnd() { + public boolean hasEnd() + { return this._has_end; - } - //-- boolean hasEnd() + } //-- boolean hasEnd() /** * Method hasId - * - * - * + * + * + * * @return boolean */ - public boolean hasId() { + public boolean hasId() + { return this._has_id; - } - //-- boolean hasId() + } //-- boolean hasId() /** * Method hasStart - * - * - * + * + * + * * @return boolean */ - public boolean hasStart() { + public boolean hasStart() + { return this._has_start; - } - //-- boolean hasStart() + } //-- boolean hasStart() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'colour'. - * + * * @param colour the value of field 'colour'. */ - public void setColour(int colour) { + public void setColour(int colour) + { this._colour = colour; this._has_colour = true; - } - //-- void setColour(int) + } //-- void setColour(int) /** * Sets the value of field 'end'. - * + * * @param end the value of field 'end'. */ - public void setEnd(int end) { + public void setEnd(int end) + { this._end = end; this._has_end = true; - } - //-- void setEnd(int) + } //-- void setEnd(int) /** * Sets the value of field 'id'. - * + * * @param id the value of field 'id'. */ - public void setId(int id) { + public void setId(int id) + { this._id = id; this._has_id = true; - } - //-- void setId(int) + } //-- void setId(int) /** * Sets the value of field 'start'. - * + * * @param start the value of field 'start'. */ - public void setStart(int start) { + public void setStart(int start) + { this._start = start; this._has_start = true; - } - //-- void setStart(int) + } //-- void setStart(int) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.JSeq) Unmarshaller.unmarshal(jalview.binding.JSeq.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.JSeq) Unmarshaller.unmarshal(jalview.binding.JSeq.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/JalviewModel.java b/src/jalview/binding/JalviewModel.java index 85bfe26..a558b10 100755 --- a/src/jalview/binding/JalviewModel.java +++ b/src/jalview/binding/JalviewModel.java @@ -1,55 +1,37 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ + import java.io.IOException; import java.io.Reader; import java.io.Serializable; import java.io.Writer; - import java.util.Date; - +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 JalviewModel. - * + * * @version $Revision$ $Date$ */ public class JalviewModel implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -67,143 +49,153 @@ public class JalviewModel implements java.io.Serializable { */ private jalview.binding.JalviewModelSequence _jalviewModelSequence; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public JalviewModel() { super(); - } - //-- jalview.binding.JalviewModel() - //-----------/ + } //-- jalview.binding.JalviewModel() - public java.util.Date getCreationDate() { + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'creationDate'. + * + * @return Date + * @return the value of field 'creationDate'. + */ + public java.util.Date getCreationDate() + { return this._creationDate; - } - //-- java.util.Date getCreationDate() + } //-- java.util.Date getCreationDate() /** * Returns the value of field 'jalviewModelSequence'. - * + * * @return JalviewModelSequence * @return the value of field 'jalviewModelSequence'. */ - public jalview.binding.JalviewModelSequence getJalviewModelSequence() { + public jalview.binding.JalviewModelSequence getJalviewModelSequence() + { return this._jalviewModelSequence; - } - //-- jalview.binding.JalviewModelSequence getJalviewModelSequence() + } //-- jalview.binding.JalviewModelSequence getJalviewModelSequence() /** * Returns the value of field 'vamsasModel'. - * + * * @return VamsasModel * @return the value of field 'vamsasModel'. */ - public jalview.binding.VamsasModel getVamsasModel() { + public jalview.binding.VamsasModel getVamsasModel() + { return this._vamsasModel; - } - //-- jalview.binding.VamsasModel getVamsasModel() + } //-- jalview.binding.VamsasModel getVamsasModel() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'creationDate'. - * + * * @param creationDate the value of field 'creationDate'. */ - public void setCreationDate(java.util.Date creationDate) { + public void setCreationDate(java.util.Date creationDate) + { this._creationDate = creationDate; - } - //-- void setCreationDate(java.util.Date) + } //-- void setCreationDate(java.util.Date) /** * Sets the value of field 'jalviewModelSequence'. - * + * * @param jalviewModelSequence the value of field * 'jalviewModelSequence'. */ - public void setJalviewModelSequence( - jalview.binding.JalviewModelSequence jalviewModelSequence) { + public void setJalviewModelSequence(jalview.binding.JalviewModelSequence jalviewModelSequence) + { this._jalviewModelSequence = jalviewModelSequence; - } - //-- void setJalviewModelSequence(jalview.binding.JalviewModelSequence) + } //-- void setJalviewModelSequence(jalview.binding.JalviewModelSequence) /** * Sets the value of field 'vamsasModel'. - * + * * @param vamsasModel the value of field 'vamsasModel'. */ - public void setVamsasModel(jalview.binding.VamsasModel vamsasModel) { + public void setVamsasModel(jalview.binding.VamsasModel vamsasModel) + { this._vamsasModel = vamsasModel; - } - //-- void setVamsasModel(jalview.binding.VamsasModel) + } //-- void setVamsasModel(jalview.binding.VamsasModel) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.JalviewModel) Unmarshaller.unmarshal(jalview.binding.JalviewModel.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.JalviewModel) Unmarshaller.unmarshal(jalview.binding.JalviewModel.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/JalviewModelSequence.java b/src/jalview/binding/JalviewModelSequence.java index 2abee13..4ac40d5 100755 --- a/src/jalview/binding/JalviewModelSequence.java +++ b/src/jalview/binding/JalviewModelSequence.java @@ -1,56 +1,38 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 JalviewModelSequence. - * + * * @version $Revision$ $Date$ */ public class JalviewModelSequence implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -73,683 +55,824 @@ public class JalviewModelSequence implements java.io.Serializable { */ private java.util.Vector _userColoursList; + /** + * Field _treeList + */ + private java.util.Vector _treeList; + + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public JalviewModelSequence() { super(); _JSeqList = new Vector(); _JGroupList = new Vector(); _viewportList = new Vector(); _userColoursList = new Vector(); - } - //-- jalview.binding.JalviewModelSequence() - //-----------/ + _treeList = new Vector(); + } //-- jalview.binding.JalviewModelSequence() + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addJGroup + * + * + * + * @param vJGroup + */ public void addJGroup(jalview.binding.JGroup vJGroup) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _JGroupList.addElement(vJGroup); - } - //-- void addJGroup(jalview.binding.JGroup) + } //-- void addJGroup(jalview.binding.JGroup) /** * Method addJGroup - * - * - * + * + * + * * @param index * @param vJGroup */ public void addJGroup(int index, jalview.binding.JGroup vJGroup) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _JGroupList.insertElementAt(vJGroup, index); - } - //-- void addJGroup(int, jalview.binding.JGroup) + } //-- void addJGroup(int, jalview.binding.JGroup) /** * Method addJSeq - * - * - * + * + * + * * @param vJSeq */ public void addJSeq(jalview.binding.JSeq vJSeq) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _JSeqList.addElement(vJSeq); - } - //-- void addJSeq(jalview.binding.JSeq) + } //-- void addJSeq(jalview.binding.JSeq) /** * Method addJSeq - * - * - * + * + * + * * @param index * @param vJSeq */ public void addJSeq(int index, jalview.binding.JSeq vJSeq) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _JSeqList.insertElementAt(vJSeq, index); - } - //-- void addJSeq(int, jalview.binding.JSeq) + } //-- void addJSeq(int, jalview.binding.JSeq) + + /** + * Method addTree + * + * + * + * @param vTree + */ + public void addTree(jalview.binding.Tree vTree) + throws java.lang.IndexOutOfBoundsException + { + _treeList.addElement(vTree); + } //-- void addTree(jalview.binding.Tree) + + /** + * Method addTree + * + * + * + * @param index + * @param vTree + */ + public void addTree(int index, jalview.binding.Tree vTree) + throws java.lang.IndexOutOfBoundsException + { + _treeList.insertElementAt(vTree, index); + } //-- void addTree(int, jalview.binding.Tree) /** * Method addUserColours - * - * - * + * + * + * * @param vUserColours */ public void addUserColours(jalview.binding.UserColours vUserColours) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _userColoursList.addElement(vUserColours); - } - //-- void addUserColours(jalview.binding.UserColours) + } //-- void addUserColours(jalview.binding.UserColours) /** * Method addUserColours - * - * - * + * + * + * * @param index * @param vUserColours */ - public void addUserColours(int index, - jalview.binding.UserColours vUserColours) - throws java.lang.IndexOutOfBoundsException { + public void addUserColours(int index, jalview.binding.UserColours vUserColours) + throws java.lang.IndexOutOfBoundsException + { _userColoursList.insertElementAt(vUserColours, index); - } - //-- void addUserColours(int, jalview.binding.UserColours) + } //-- void addUserColours(int, jalview.binding.UserColours) /** * Method addViewport - * - * - * + * + * + * * @param vViewport */ public void addViewport(jalview.binding.Viewport vViewport) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _viewportList.addElement(vViewport); - } - //-- void addViewport(jalview.binding.Viewport) + } //-- void addViewport(jalview.binding.Viewport) /** * Method addViewport - * - * - * + * + * + * * @param index * @param vViewport */ public void addViewport(int index, jalview.binding.Viewport vViewport) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _viewportList.insertElementAt(vViewport, index); - } - //-- void addViewport(int, jalview.binding.Viewport) + } //-- void addViewport(int, jalview.binding.Viewport) /** * Method enumerateJGroup - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateJGroup() { + public java.util.Enumeration enumerateJGroup() + { return _JGroupList.elements(); - } - //-- java.util.Enumeration enumerateJGroup() + } //-- java.util.Enumeration enumerateJGroup() /** * Method enumerateJSeq - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateJSeq() { + public java.util.Enumeration enumerateJSeq() + { return _JSeqList.elements(); - } - //-- java.util.Enumeration enumerateJSeq() + } //-- java.util.Enumeration enumerateJSeq() + + /** + * Method enumerateTree + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateTree() + { + return _treeList.elements(); + } //-- java.util.Enumeration enumerateTree() /** * Method enumerateUserColours - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateUserColours() { + public java.util.Enumeration enumerateUserColours() + { return _userColoursList.elements(); - } - //-- java.util.Enumeration enumerateUserColours() + } //-- java.util.Enumeration enumerateUserColours() /** * Method enumerateViewport - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateViewport() { + public java.util.Enumeration enumerateViewport() + { return _viewportList.elements(); - } - //-- java.util.Enumeration enumerateViewport() + } //-- java.util.Enumeration enumerateViewport() /** * Method getJGroup - * - * - * + * + * + * * @param index * @return JGroup */ public jalview.binding.JGroup getJGroup(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _JGroupList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.JGroup) _JGroupList.elementAt(index); - } - //-- jalview.binding.JGroup getJGroup(int) + } //-- jalview.binding.JGroup getJGroup(int) /** * Method getJGroup - * - * - * + * + * + * * @return JGroup */ - public jalview.binding.JGroup[] getJGroup() { + public jalview.binding.JGroup[] getJGroup() + { int size = _JGroupList.size(); jalview.binding.JGroup[] mArray = new jalview.binding.JGroup[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.JGroup) _JGroupList.elementAt(index); } - return mArray; - } - //-- jalview.binding.JGroup[] getJGroup() + } //-- jalview.binding.JGroup[] getJGroup() /** * Method getJGroupCount - * - * - * + * + * + * * @return int */ - public int getJGroupCount() { + public int getJGroupCount() + { return _JGroupList.size(); - } - //-- int getJGroupCount() + } //-- int getJGroupCount() /** * Method getJSeq - * - * - * + * + * + * * @param index * @return JSeq */ public jalview.binding.JSeq getJSeq(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _JSeqList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.JSeq) _JSeqList.elementAt(index); - } - //-- jalview.binding.JSeq getJSeq(int) + } //-- jalview.binding.JSeq getJSeq(int) /** * Method getJSeq - * - * - * + * + * + * * @return JSeq */ - public jalview.binding.JSeq[] getJSeq() { + public jalview.binding.JSeq[] getJSeq() + { int size = _JSeqList.size(); jalview.binding.JSeq[] mArray = new jalview.binding.JSeq[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.JSeq) _JSeqList.elementAt(index); } - return mArray; - } - //-- jalview.binding.JSeq[] getJSeq() + } //-- jalview.binding.JSeq[] getJSeq() /** * Method getJSeqCount - * - * - * + * + * + * * @return int */ - public int getJSeqCount() { + public int getJSeqCount() + { return _JSeqList.size(); - } - //-- int getJSeqCount() + } //-- int getJSeqCount() + + /** + * Method getTree + * + * + * + * @param index + * @return Tree + */ + public jalview.binding.Tree getTree(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _treeList.size())) { + throw new IndexOutOfBoundsException(); + } + + return (jalview.binding.Tree) _treeList.elementAt(index); + } //-- jalview.binding.Tree getTree(int) + + /** + * Method getTree + * + * + * + * @return Tree + */ + public jalview.binding.Tree[] getTree() + { + int size = _treeList.size(); + jalview.binding.Tree[] mArray = new jalview.binding.Tree[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (jalview.binding.Tree) _treeList.elementAt(index); + } + return mArray; + } //-- jalview.binding.Tree[] getTree() + + /** + * Method getTreeCount + * + * + * + * @return int + */ + public int getTreeCount() + { + return _treeList.size(); + } //-- int getTreeCount() /** * Method getUserColours - * - * - * + * + * + * * @param index * @return UserColours */ public jalview.binding.UserColours getUserColours(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _userColoursList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.UserColours) _userColoursList.elementAt(index); - } - //-- jalview.binding.UserColours getUserColours(int) + } //-- jalview.binding.UserColours getUserColours(int) /** * Method getUserColours - * - * - * + * + * + * * @return UserColours */ - public jalview.binding.UserColours[] getUserColours() { + public jalview.binding.UserColours[] getUserColours() + { int size = _userColoursList.size(); jalview.binding.UserColours[] mArray = new jalview.binding.UserColours[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.UserColours) _userColoursList.elementAt(index); } - return mArray; - } - //-- jalview.binding.UserColours[] getUserColours() + } //-- jalview.binding.UserColours[] getUserColours() /** * Method getUserColoursCount - * - * - * + * + * + * * @return int */ - public int getUserColoursCount() { + public int getUserColoursCount() + { return _userColoursList.size(); - } - //-- int getUserColoursCount() + } //-- int getUserColoursCount() /** * Method getViewport - * - * - * + * + * + * * @param index * @return Viewport */ public jalview.binding.Viewport getViewport(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _viewportList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.Viewport) _viewportList.elementAt(index); - } - //-- jalview.binding.Viewport getViewport(int) + } //-- jalview.binding.Viewport getViewport(int) /** * Method getViewport - * - * - * + * + * + * * @return Viewport */ - public jalview.binding.Viewport[] getViewport() { + public jalview.binding.Viewport[] getViewport() + { int size = _viewportList.size(); jalview.binding.Viewport[] mArray = new jalview.binding.Viewport[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.Viewport) _viewportList.elementAt(index); } - return mArray; - } - //-- jalview.binding.Viewport[] getViewport() + } //-- jalview.binding.Viewport[] getViewport() /** * Method getViewportCount - * - * - * + * + * + * * @return int */ - public int getViewportCount() { + public int getViewportCount() + { return _viewportList.size(); - } - //-- int getViewportCount() + } //-- int getViewportCount() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Method removeAllJGroup - * + * */ - public void removeAllJGroup() { + public void removeAllJGroup() + { _JGroupList.removeAllElements(); - } - //-- void removeAllJGroup() + } //-- void removeAllJGroup() /** * Method removeAllJSeq - * + * */ - public void removeAllJSeq() { + public void removeAllJSeq() + { _JSeqList.removeAllElements(); - } - //-- void removeAllJSeq() + } //-- void removeAllJSeq() + + /** + * Method removeAllTree + * + */ + public void removeAllTree() + { + _treeList.removeAllElements(); + } //-- void removeAllTree() /** * Method removeAllUserColours - * + * */ - public void removeAllUserColours() { + public void removeAllUserColours() + { _userColoursList.removeAllElements(); - } - //-- void removeAllUserColours() + } //-- void removeAllUserColours() /** * Method removeAllViewport - * + * */ - public void removeAllViewport() { + public void removeAllViewport() + { _viewportList.removeAllElements(); - } - //-- void removeAllViewport() + } //-- void removeAllViewport() /** * Method removeJGroup - * - * - * + * + * + * * @param index * @return JGroup */ - public jalview.binding.JGroup removeJGroup(int index) { + public jalview.binding.JGroup removeJGroup(int index) + { java.lang.Object obj = _JGroupList.elementAt(index); _JGroupList.removeElementAt(index); - return (jalview.binding.JGroup) obj; - } - //-- jalview.binding.JGroup removeJGroup(int) + } //-- jalview.binding.JGroup removeJGroup(int) /** * Method removeJSeq - * - * - * + * + * + * * @param index * @return JSeq */ - public jalview.binding.JSeq removeJSeq(int index) { + public jalview.binding.JSeq removeJSeq(int index) + { java.lang.Object obj = _JSeqList.elementAt(index); _JSeqList.removeElementAt(index); - return (jalview.binding.JSeq) obj; - } - //-- jalview.binding.JSeq removeJSeq(int) + } //-- jalview.binding.JSeq removeJSeq(int) + + /** + * Method removeTree + * + * + * + * @param index + * @return Tree + */ + public jalview.binding.Tree removeTree(int index) + { + java.lang.Object obj = _treeList.elementAt(index); + _treeList.removeElementAt(index); + return (jalview.binding.Tree) obj; + } //-- jalview.binding.Tree removeTree(int) /** * Method removeUserColours - * - * - * + * + * + * * @param index * @return UserColours */ - public jalview.binding.UserColours removeUserColours(int index) { + public jalview.binding.UserColours removeUserColours(int index) + { java.lang.Object obj = _userColoursList.elementAt(index); _userColoursList.removeElementAt(index); - return (jalview.binding.UserColours) obj; - } - //-- jalview.binding.UserColours removeUserColours(int) + } //-- jalview.binding.UserColours removeUserColours(int) /** * Method removeViewport - * - * - * + * + * + * * @param index * @return Viewport */ - public jalview.binding.Viewport removeViewport(int index) { + public jalview.binding.Viewport removeViewport(int index) + { java.lang.Object obj = _viewportList.elementAt(index); _viewportList.removeElementAt(index); - return (jalview.binding.Viewport) obj; - } - //-- jalview.binding.Viewport removeViewport(int) + } //-- jalview.binding.Viewport removeViewport(int) /** * Method setJGroup - * - * - * + * + * + * * @param index * @param vJGroup */ public void setJGroup(int index, jalview.binding.JGroup vJGroup) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _JGroupList.size())) { throw new IndexOutOfBoundsException(); } - _JGroupList.setElementAt(vJGroup, index); - } - //-- void setJGroup(int, jalview.binding.JGroup) + } //-- void setJGroup(int, jalview.binding.JGroup) /** * Method setJGroup - * - * - * + * + * + * * @param JGroupArray */ - public void setJGroup(jalview.binding.JGroup[] JGroupArray) { + public void setJGroup(jalview.binding.JGroup[] JGroupArray) + { //-- copy array _JGroupList.removeAllElements(); - for (int i = 0; i < JGroupArray.length; i++) { _JGroupList.addElement(JGroupArray[i]); } - } - //-- void setJGroup(jalview.binding.JGroup) + } //-- void setJGroup(jalview.binding.JGroup) /** * Method setJSeq - * - * - * + * + * + * * @param index * @param vJSeq */ public void setJSeq(int index, jalview.binding.JSeq vJSeq) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _JSeqList.size())) { throw new IndexOutOfBoundsException(); } - _JSeqList.setElementAt(vJSeq, index); - } - //-- void setJSeq(int, jalview.binding.JSeq) + } //-- void setJSeq(int, jalview.binding.JSeq) /** * Method setJSeq - * - * - * + * + * + * * @param JSeqArray */ - public void setJSeq(jalview.binding.JSeq[] JSeqArray) { + public void setJSeq(jalview.binding.JSeq[] JSeqArray) + { //-- copy array _JSeqList.removeAllElements(); - for (int i = 0; i < JSeqArray.length; i++) { _JSeqList.addElement(JSeqArray[i]); } - } - //-- void setJSeq(jalview.binding.JSeq) + } //-- void setJSeq(jalview.binding.JSeq) + + /** + * Method setTree + * + * + * + * @param index + * @param vTree + */ + public void setTree(int index, jalview.binding.Tree vTree) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _treeList.size())) { + throw new IndexOutOfBoundsException(); + } + _treeList.setElementAt(vTree, index); + } //-- void setTree(int, jalview.binding.Tree) + + /** + * Method setTree + * + * + * + * @param treeArray + */ + public void setTree(jalview.binding.Tree[] treeArray) + { + //-- copy array + _treeList.removeAllElements(); + for (int i = 0; i < treeArray.length; i++) { + _treeList.addElement(treeArray[i]); + } + } //-- void setTree(jalview.binding.Tree) /** * Method setUserColours - * - * - * + * + * + * * @param index * @param vUserColours */ - public void setUserColours(int index, - jalview.binding.UserColours vUserColours) - throws java.lang.IndexOutOfBoundsException { + public void setUserColours(int index, jalview.binding.UserColours vUserColours) + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _userColoursList.size())) { throw new IndexOutOfBoundsException(); } - _userColoursList.setElementAt(vUserColours, index); - } - //-- void setUserColours(int, jalview.binding.UserColours) + } //-- void setUserColours(int, jalview.binding.UserColours) /** * Method setUserColours - * - * - * + * + * + * * @param userColoursArray */ - public void setUserColours(jalview.binding.UserColours[] userColoursArray) { + public void setUserColours(jalview.binding.UserColours[] userColoursArray) + { //-- copy array _userColoursList.removeAllElements(); - for (int i = 0; i < userColoursArray.length; i++) { _userColoursList.addElement(userColoursArray[i]); } - } - //-- void setUserColours(jalview.binding.UserColours) + } //-- void setUserColours(jalview.binding.UserColours) /** * Method setViewport - * - * - * + * + * + * * @param index * @param vViewport */ public void setViewport(int index, jalview.binding.Viewport vViewport) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _viewportList.size())) { throw new IndexOutOfBoundsException(); } - _viewportList.setElementAt(vViewport, index); - } - //-- void setViewport(int, jalview.binding.Viewport) + } //-- void setViewport(int, jalview.binding.Viewport) /** * Method setViewport - * - * - * + * + * + * * @param viewportArray */ - public void setViewport(jalview.binding.Viewport[] viewportArray) { + public void setViewport(jalview.binding.Viewport[] viewportArray) + { //-- copy array _viewportList.removeAllElements(); - for (int i = 0; i < viewportArray.length; i++) { _viewportList.addElement(viewportArray[i]); } - } - //-- void setViewport(jalview.binding.Viewport) + } //-- void setViewport(jalview.binding.Viewport) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.JalviewModelSequence) Unmarshaller.unmarshal(jalview.binding.JalviewModelSequence.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.JalviewModelSequence) Unmarshaller.unmarshal(jalview.binding.JalviewModelSequence.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/JalviewModelSequence2.java b/src/jalview/binding/JalviewModelSequence2.java index add536e..36e5579 100755 --- a/src/jalview/binding/JalviewModelSequence2.java +++ b/src/jalview/binding/JalviewModelSequence2.java @@ -1,56 +1,38 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 JalviewModelSequence2. - * + * * @version $Revision$ $Date$ */ public class JalviewModelSequence2 implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -58,233 +40,235 @@ public class JalviewModelSequence2 implements java.io.Serializable { */ private java.util.Vector _items; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public JalviewModelSequence2() { super(); _items = new Vector(); - } - //-- jalview.binding.JalviewModelSequence2() - //-----------/ + } //-- jalview.binding.JalviewModelSequence2() + - public void addJalviewModelSequence2Item( - jalview.binding.JalviewModelSequence2Item vJalviewModelSequence2Item) - throws java.lang.IndexOutOfBoundsException { + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addJalviewModelSequence2Item + * + * + * + * @param vJalviewModelSequence2Item + */ + public void addJalviewModelSequence2Item(jalview.binding.JalviewModelSequence2Item vJalviewModelSequence2Item) + throws java.lang.IndexOutOfBoundsException + { _items.addElement(vJalviewModelSequence2Item); - } - //-- void addJalviewModelSequence2Item(jalview.binding.JalviewModelSequence2Item) + } //-- void addJalviewModelSequence2Item(jalview.binding.JalviewModelSequence2Item) /** * Method addJalviewModelSequence2Item - * - * - * + * + * + * * @param index * @param vJalviewModelSequence2Item */ - public void addJalviewModelSequence2Item(int index, - jalview.binding.JalviewModelSequence2Item vJalviewModelSequence2Item) - throws java.lang.IndexOutOfBoundsException { + public void addJalviewModelSequence2Item(int index, jalview.binding.JalviewModelSequence2Item vJalviewModelSequence2Item) + throws java.lang.IndexOutOfBoundsException + { _items.insertElementAt(vJalviewModelSequence2Item, index); - } - //-- void addJalviewModelSequence2Item(int, jalview.binding.JalviewModelSequence2Item) + } //-- void addJalviewModelSequence2Item(int, jalview.binding.JalviewModelSequence2Item) /** * Method enumerateJalviewModelSequence2Item - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateJalviewModelSequence2Item() { + public java.util.Enumeration enumerateJalviewModelSequence2Item() + { return _items.elements(); - } - //-- java.util.Enumeration enumerateJalviewModelSequence2Item() + } //-- java.util.Enumeration enumerateJalviewModelSequence2Item() /** * Method getJalviewModelSequence2Item - * - * - * + * + * + * * @param index * @return JalviewModelSequence2Item */ - public jalview.binding.JalviewModelSequence2Item getJalviewModelSequence2Item( - int index) throws java.lang.IndexOutOfBoundsException { + public jalview.binding.JalviewModelSequence2Item getJalviewModelSequence2Item(int index) + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _items.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.JalviewModelSequence2Item) _items.elementAt(index); - } - //-- jalview.binding.JalviewModelSequence2Item getJalviewModelSequence2Item(int) + } //-- jalview.binding.JalviewModelSequence2Item getJalviewModelSequence2Item(int) /** * Method getJalviewModelSequence2Item - * - * - * + * + * + * * @return JalviewModelSequence2Item */ - public jalview.binding.JalviewModelSequence2Item[] getJalviewModelSequence2Item() { + public jalview.binding.JalviewModelSequence2Item[] getJalviewModelSequence2Item() + { int size = _items.size(); jalview.binding.JalviewModelSequence2Item[] mArray = new jalview.binding.JalviewModelSequence2Item[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.JalviewModelSequence2Item) _items.elementAt(index); } - return mArray; - } - //-- jalview.binding.JalviewModelSequence2Item[] getJalviewModelSequence2Item() + } //-- jalview.binding.JalviewModelSequence2Item[] getJalviewModelSequence2Item() /** * Method getJalviewModelSequence2ItemCount - * - * - * + * + * + * * @return int */ - public int getJalviewModelSequence2ItemCount() { + public int getJalviewModelSequence2ItemCount() + { return _items.size(); - } - //-- int getJalviewModelSequence2ItemCount() + } //-- int getJalviewModelSequence2ItemCount() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Method removeAllJalviewModelSequence2Item - * + * */ - public void removeAllJalviewModelSequence2Item() { + public void removeAllJalviewModelSequence2Item() + { _items.removeAllElements(); - } - //-- void removeAllJalviewModelSequence2Item() + } //-- void removeAllJalviewModelSequence2Item() /** * Method removeJalviewModelSequence2Item - * - * - * + * + * + * * @param index * @return JalviewModelSequence2Item */ - public jalview.binding.JalviewModelSequence2Item removeJalviewModelSequence2Item( - int index) { + public jalview.binding.JalviewModelSequence2Item removeJalviewModelSequence2Item(int index) + { java.lang.Object obj = _items.elementAt(index); _items.removeElementAt(index); - return (jalview.binding.JalviewModelSequence2Item) obj; - } - //-- jalview.binding.JalviewModelSequence2Item removeJalviewModelSequence2Item(int) + } //-- jalview.binding.JalviewModelSequence2Item removeJalviewModelSequence2Item(int) /** * Method setJalviewModelSequence2Item - * - * - * + * + * + * * @param index * @param vJalviewModelSequence2Item */ - public void setJalviewModelSequence2Item(int index, - jalview.binding.JalviewModelSequence2Item vJalviewModelSequence2Item) - throws java.lang.IndexOutOfBoundsException { + public void setJalviewModelSequence2Item(int index, jalview.binding.JalviewModelSequence2Item vJalviewModelSequence2Item) + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _items.size())) { throw new IndexOutOfBoundsException(); } - _items.setElementAt(vJalviewModelSequence2Item, index); - } - //-- void setJalviewModelSequence2Item(int, jalview.binding.JalviewModelSequence2Item) + } //-- void setJalviewModelSequence2Item(int, jalview.binding.JalviewModelSequence2Item) /** * Method setJalviewModelSequence2Item - * - * - * + * + * + * * @param jalviewModelSequence2ItemArray */ - public void setJalviewModelSequence2Item( - jalview.binding.JalviewModelSequence2Item[] jalviewModelSequence2ItemArray) { + public void setJalviewModelSequence2Item(jalview.binding.JalviewModelSequence2Item[] jalviewModelSequence2ItemArray) + { //-- copy array _items.removeAllElements(); - for (int i = 0; i < jalviewModelSequence2ItemArray.length; i++) { _items.addElement(jalviewModelSequence2ItemArray[i]); } - } - //-- void setJalviewModelSequence2Item(jalview.binding.JalviewModelSequence2Item) + } //-- void setJalviewModelSequence2Item(jalview.binding.JalviewModelSequence2Item) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.JalviewModelSequence2) Unmarshaller.unmarshal(jalview.binding.JalviewModelSequence2.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.JalviewModelSequence2) Unmarshaller.unmarshal(jalview.binding.JalviewModelSequence2.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/JalviewModelSequence2Item.java b/src/jalview/binding/JalviewModelSequence2Item.java index 7998794..8678b09 100755 --- a/src/jalview/binding/JalviewModelSequence2Item.java +++ b/src/jalview/binding/JalviewModelSequence2Item.java @@ -1,49 +1,32 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ -import java.io.Serializable; +import java.io.Serializable; import java.util.Enumeration; import java.util.Vector; - +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; /** * Class JalviewModelSequence2Item. - * + * * @version $Revision$ $Date$ */ public class JalviewModelSequence2Item implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -51,160 +34,164 @@ public class JalviewModelSequence2Item implements java.io.Serializable { */ private java.util.Vector _userColourSchemeList; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public JalviewModelSequence2Item() { super(); _userColourSchemeList = new Vector(); - } - //-- jalview.binding.JalviewModelSequence2Item() - //-----------/ + } //-- jalview.binding.JalviewModelSequence2Item() + + + //-----------/ + //- Methods -/ + //-----------/ - public void addUserColourScheme( - jalview.binding.UserColourScheme vUserColourScheme) - throws java.lang.IndexOutOfBoundsException { + /** + * Method addUserColourScheme + * + * + * + * @param vUserColourScheme + */ + public void addUserColourScheme(jalview.binding.UserColourScheme vUserColourScheme) + throws java.lang.IndexOutOfBoundsException + { _userColourSchemeList.addElement(vUserColourScheme); - } - //-- void addUserColourScheme(jalview.binding.UserColourScheme) + } //-- void addUserColourScheme(jalview.binding.UserColourScheme) /** * Method addUserColourScheme - * - * - * + * + * + * * @param index * @param vUserColourScheme */ - public void addUserColourScheme(int index, - jalview.binding.UserColourScheme vUserColourScheme) - throws java.lang.IndexOutOfBoundsException { + public void addUserColourScheme(int index, jalview.binding.UserColourScheme vUserColourScheme) + throws java.lang.IndexOutOfBoundsException + { _userColourSchemeList.insertElementAt(vUserColourScheme, index); - } - //-- void addUserColourScheme(int, jalview.binding.UserColourScheme) + } //-- void addUserColourScheme(int, jalview.binding.UserColourScheme) /** * Method enumerateUserColourScheme - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateUserColourScheme() { + public java.util.Enumeration enumerateUserColourScheme() + { return _userColourSchemeList.elements(); - } - //-- java.util.Enumeration enumerateUserColourScheme() + } //-- java.util.Enumeration enumerateUserColourScheme() /** * Method getUserColourScheme - * - * - * + * + * + * * @param index * @return UserColourScheme */ public jalview.binding.UserColourScheme getUserColourScheme(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _userColourSchemeList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.UserColourScheme) _userColourSchemeList.elementAt(index); - } - //-- jalview.binding.UserColourScheme getUserColourScheme(int) + } //-- jalview.binding.UserColourScheme getUserColourScheme(int) /** * Method getUserColourScheme - * - * - * + * + * + * * @return UserColourScheme */ - public jalview.binding.UserColourScheme[] getUserColourScheme() { + public jalview.binding.UserColourScheme[] getUserColourScheme() + { int size = _userColourSchemeList.size(); jalview.binding.UserColourScheme[] mArray = new jalview.binding.UserColourScheme[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.UserColourScheme) _userColourSchemeList.elementAt(index); } - return mArray; - } - //-- jalview.binding.UserColourScheme[] getUserColourScheme() + } //-- jalview.binding.UserColourScheme[] getUserColourScheme() /** * Method getUserColourSchemeCount - * - * - * + * + * + * * @return int */ - public int getUserColourSchemeCount() { + public int getUserColourSchemeCount() + { return _userColourSchemeList.size(); - } - //-- int getUserColourSchemeCount() + } //-- int getUserColourSchemeCount() /** * Method removeAllUserColourScheme - * + * */ - public void removeAllUserColourScheme() { + public void removeAllUserColourScheme() + { _userColourSchemeList.removeAllElements(); - } - //-- void removeAllUserColourScheme() + } //-- void removeAllUserColourScheme() /** * Method removeUserColourScheme - * - * - * + * + * + * * @param index * @return UserColourScheme */ - public jalview.binding.UserColourScheme removeUserColourScheme(int index) { + public jalview.binding.UserColourScheme removeUserColourScheme(int index) + { java.lang.Object obj = _userColourSchemeList.elementAt(index); _userColourSchemeList.removeElementAt(index); - return (jalview.binding.UserColourScheme) obj; - } - //-- jalview.binding.UserColourScheme removeUserColourScheme(int) + } //-- jalview.binding.UserColourScheme removeUserColourScheme(int) /** * Method setUserColourScheme - * - * - * + * + * + * * @param index * @param vUserColourScheme */ - public void setUserColourScheme(int index, - jalview.binding.UserColourScheme vUserColourScheme) - throws java.lang.IndexOutOfBoundsException { + public void setUserColourScheme(int index, jalview.binding.UserColourScheme vUserColourScheme) + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _userColourSchemeList.size())) { throw new IndexOutOfBoundsException(); } - _userColourSchemeList.setElementAt(vUserColourScheme, index); - } - //-- void setUserColourScheme(int, jalview.binding.UserColourScheme) + } //-- void setUserColourScheme(int, jalview.binding.UserColourScheme) /** * Method setUserColourScheme - * - * - * + * + * + * * @param userColourSchemeArray */ - public void setUserColourScheme( - jalview.binding.UserColourScheme[] userColourSchemeArray) { + public void setUserColourScheme(jalview.binding.UserColourScheme[] userColourSchemeArray) + { //-- copy array _userColourSchemeList.removeAllElements(); - for (int i = 0; i < userColourSchemeArray.length; i++) { _userColourSchemeList.addElement(userColourSchemeArray[i]); } - } - //-- void setUserColourScheme(jalview.binding.UserColourScheme) + } //-- void setUserColourScheme(jalview.binding.UserColourScheme) + } diff --git a/src/jalview/binding/JalviewUserColours.java b/src/jalview/binding/JalviewUserColours.java index bbb1b97..676a623 100755 --- a/src/jalview/binding/JalviewUserColours.java +++ b/src/jalview/binding/JalviewUserColours.java @@ -1,56 +1,38 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 JalviewUserColours. - * + * * @version $Revision$ $Date$ */ public class JalviewUserColours implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -58,228 +40,235 @@ public class JalviewUserColours implements java.io.Serializable { */ private java.util.Vector _colourList; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public JalviewUserColours() { super(); _colourList = new Vector(); - } - //-- jalview.binding.JalviewUserColours() - //-----------/ + } //-- jalview.binding.JalviewUserColours() + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addColour + * + * + * + * @param vColour + */ public void addColour(jalview.binding.Colour vColour) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _colourList.addElement(vColour); - } - //-- void addColour(jalview.binding.Colour) + } //-- void addColour(jalview.binding.Colour) /** * Method addColour - * - * - * + * + * + * * @param index * @param vColour */ public void addColour(int index, jalview.binding.Colour vColour) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _colourList.insertElementAt(vColour, index); - } - //-- void addColour(int, jalview.binding.Colour) + } //-- void addColour(int, jalview.binding.Colour) /** * Method enumerateColour - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateColour() { + public java.util.Enumeration enumerateColour() + { return _colourList.elements(); - } - //-- java.util.Enumeration enumerateColour() + } //-- java.util.Enumeration enumerateColour() /** * Method getColour - * - * - * + * + * + * * @param index * @return Colour */ public jalview.binding.Colour getColour(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _colourList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.Colour) _colourList.elementAt(index); - } - //-- jalview.binding.Colour getColour(int) + } //-- jalview.binding.Colour getColour(int) /** * Method getColour - * - * - * + * + * + * * @return Colour */ - public jalview.binding.Colour[] getColour() { + public jalview.binding.Colour[] getColour() + { int size = _colourList.size(); jalview.binding.Colour[] mArray = new jalview.binding.Colour[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.Colour) _colourList.elementAt(index); } - return mArray; - } - //-- jalview.binding.Colour[] getColour() + } //-- jalview.binding.Colour[] getColour() /** * Method getColourCount - * - * - * + * + * + * * @return int */ - public int getColourCount() { + public int getColourCount() + { return _colourList.size(); - } - //-- int getColourCount() + } //-- int getColourCount() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Method removeAllColour - * + * */ - public void removeAllColour() { + public void removeAllColour() + { _colourList.removeAllElements(); - } - //-- void removeAllColour() + } //-- void removeAllColour() /** * Method removeColour - * - * - * + * + * + * * @param index * @return Colour */ - public jalview.binding.Colour removeColour(int index) { + public jalview.binding.Colour removeColour(int index) + { java.lang.Object obj = _colourList.elementAt(index); _colourList.removeElementAt(index); - return (jalview.binding.Colour) obj; - } - //-- jalview.binding.Colour removeColour(int) + } //-- jalview.binding.Colour removeColour(int) /** * Method setColour - * - * - * + * + * + * * @param index * @param vColour */ public void setColour(int index, jalview.binding.Colour vColour) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _colourList.size())) { throw new IndexOutOfBoundsException(); } - _colourList.setElementAt(vColour, index); - } - //-- void setColour(int, jalview.binding.Colour) + } //-- void setColour(int, jalview.binding.Colour) /** * Method setColour - * - * - * + * + * + * * @param colourArray */ - public void setColour(jalview.binding.Colour[] colourArray) { + public void setColour(jalview.binding.Colour[] colourArray) + { //-- copy array _colourList.removeAllElements(); - for (int i = 0; i < colourArray.length; i++) { _colourList.addElement(colourArray[i]); } - } - //-- void setColour(jalview.binding.Colour) + } //-- void setColour(jalview.binding.Colour) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.JalviewUserColours.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.JalviewUserColours.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/JalviewUserColoursItem.java b/src/jalview/binding/JalviewUserColoursItem.java index ae96562..ce6919c 100755 --- a/src/jalview/binding/JalviewUserColoursItem.java +++ b/src/jalview/binding/JalviewUserColoursItem.java @@ -1,46 +1,30 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ -import java.io.Serializable; +import java.io.Serializable; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; /** * Class JalviewUserColoursItem. - * + * * @version $Revision$ $Date$ */ public class JalviewUserColoursItem implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -48,27 +32,39 @@ public class JalviewUserColoursItem implements java.io.Serializable { */ private jalview.binding.Colour _colour; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public JalviewUserColoursItem() { super(); - } - //-- jalview.binding.JalviewUserColoursItem() - //-----------/ + } //-- jalview.binding.JalviewUserColoursItem() - public jalview.binding.Colour getColour() { + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Returns the value of field 'colour'. + * + * @return Colour + * @return the value of field 'colour'. + */ + public jalview.binding.Colour getColour() + { return this._colour; - } - //-- jalview.binding.Colour getColour() + } //-- jalview.binding.Colour getColour() /** * Sets the value of field 'colour'. - * + * * @param colour the value of field 'colour'. */ - public void setColour(jalview.binding.Colour colour) { + public void setColour(jalview.binding.Colour colour) + { this._colour = colour; - } - //-- void setColour(jalview.binding.Colour) + } //-- void setColour(jalview.binding.Colour) + } diff --git a/src/jalview/binding/Residue.java b/src/jalview/binding/Residue.java index ff0cb63..69e4312 100755 --- a/src/jalview/binding/Residue.java +++ b/src/jalview/binding/Residue.java @@ -1,53 +1,36 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 Residue. - * + * * @version $Revision$ $Date$ */ public class Residue implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -65,144 +48,153 @@ public class Residue implements java.io.Serializable { */ private boolean _has_RGB; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public Residue() { super(); - } - //-- jalview.binding.Residue() - //-----------/ + } //-- jalview.binding.Residue() - public void deleteRGB() { - this._has_RGB = false; - } - //-- void deleteRGB() + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteRGB + * + */ + public void deleteRGB() + { + this._has_RGB= false; + } //-- void deleteRGB() /** * Returns the value of field 'name'. - * + * * @return String * @return the value of field 'name'. */ - public java.lang.String getName() { + public java.lang.String getName() + { return this._name; - } - //-- java.lang.String getName() + } //-- java.lang.String getName() /** * Returns the value of field 'RGB'. - * + * * @return int * @return the value of field 'RGB'. */ - public int getRGB() { + public int getRGB() + { return this._RGB; - } - //-- int getRGB() + } //-- int getRGB() /** * Method hasRGB - * - * - * + * + * + * * @return boolean */ - public boolean hasRGB() { + public boolean hasRGB() + { return this._has_RGB; - } - //-- boolean hasRGB() + } //-- boolean hasRGB() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'name'. - * + * * @param name the value of field 'name'. */ - public void setName(java.lang.String name) { + public void setName(java.lang.String name) + { this._name = name; - } - //-- void setName(java.lang.String) + } //-- void setName(java.lang.String) /** * Sets the value of field 'RGB'. - * + * * @param RGB the value of field 'RGB'. */ - public void setRGB(int RGB) { + public void setRGB(int RGB) + { this._RGB = RGB; this._has_RGB = true; - } - //-- void setRGB(int) + } //-- void setRGB(int) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.Residue) Unmarshaller.unmarshal(jalview.binding.Residue.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.Residue) Unmarshaller.unmarshal(jalview.binding.Residue.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/Sequence.java b/src/jalview/binding/Sequence.java index 628e209..f3fd4e4 100755 --- a/src/jalview/binding/Sequence.java +++ b/src/jalview/binding/Sequence.java @@ -1,122 +1,118 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 SequenceType implements java.io.Serializable { - //----------------/ - //- Constructors -/ +public class Sequence extends SequenceType +implements java.io.Serializable +{ + + + //----------------/ + //- Constructors -/ //----------------/ + public Sequence() { super(); - } - //-- jalview.binding.Sequence() - //-----------/ + } //-- jalview.binding.Sequence() - public boolean isValid() { + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.Sequence) Unmarshaller.unmarshal(jalview.binding.Sequence.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.Sequence) Unmarshaller.unmarshal(jalview.binding.Sequence.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/SequenceSet.java b/src/jalview/binding/SequenceSet.java index 4300c39..7ed3b52 100755 --- a/src/jalview/binding/SequenceSet.java +++ b/src/jalview/binding/SequenceSet.java @@ -1,56 +1,38 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -78,443 +60,445 @@ public class SequenceSet implements java.io.Serializable { */ private java.util.Vector _annotationList; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public SequenceSet() { super(); _sequenceList = new Vector(); _annotationList = new Vector(); - } - //-- jalview.binding.SequenceSet() - //-----------/ + } //-- jalview.binding.SequenceSet() + + + //-----------/ + //- Methods -/ + //-----------/ + /** + * Method addAnnotation + * + * + * + * @param vAnnotation + */ public void addAnnotation(jalview.binding.Annotation vAnnotation) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _annotationList.addElement(vAnnotation); - } - //-- void addAnnotation(jalview.binding.Annotation) + } //-- void addAnnotation(jalview.binding.Annotation) /** * Method addAnnotation - * - * - * + * + * + * * @param index * @param vAnnotation */ public void addAnnotation(int index, jalview.binding.Annotation vAnnotation) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _annotationList.insertElementAt(vAnnotation, index); - } - //-- void addAnnotation(int, jalview.binding.Annotation) + } //-- void addAnnotation(int, jalview.binding.Annotation) /** * Method addSequence - * - * - * + * + * + * * @param vSequence */ public void addSequence(jalview.binding.Sequence vSequence) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _sequenceList.addElement(vSequence); - } - //-- void addSequence(jalview.binding.Sequence) + } //-- void addSequence(jalview.binding.Sequence) /** * Method addSequence - * - * - * + * + * + * * @param index * @param vSequence */ public void addSequence(int index, jalview.binding.Sequence vSequence) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _sequenceList.insertElementAt(vSequence, index); - } - //-- void addSequence(int, jalview.binding.Sequence) + } //-- void addSequence(int, jalview.binding.Sequence) /** * Method deleteAligned - * + * */ - public void deleteAligned() { - this._has_aligned = false; - } - //-- void deleteAligned() + public void deleteAligned() + { + this._has_aligned= false; + } //-- void deleteAligned() /** * Method enumerateAnnotation - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateAnnotation() { + public java.util.Enumeration enumerateAnnotation() + { return _annotationList.elements(); - } - //-- java.util.Enumeration enumerateAnnotation() + } //-- java.util.Enumeration enumerateAnnotation() /** * Method enumerateSequence - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateSequence() { + public java.util.Enumeration enumerateSequence() + { return _sequenceList.elements(); - } - //-- java.util.Enumeration enumerateSequence() + } //-- java.util.Enumeration enumerateSequence() /** * Returns the value of field 'aligned'. - * + * * @return boolean * @return the value of field 'aligned'. */ - public boolean getAligned() { + public boolean getAligned() + { return this._aligned; - } - //-- boolean getAligned() + } //-- boolean getAligned() /** * Method getAnnotation - * - * - * + * + * + * * @param index * @return Annotation */ public jalview.binding.Annotation getAnnotation(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _annotationList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.Annotation) _annotationList.elementAt(index); - } - //-- jalview.binding.Annotation getAnnotation(int) + } //-- jalview.binding.Annotation getAnnotation(int) /** * Method getAnnotation - * - * - * + * + * + * * @return Annotation */ - public jalview.binding.Annotation[] getAnnotation() { + public jalview.binding.Annotation[] getAnnotation() + { int size = _annotationList.size(); jalview.binding.Annotation[] mArray = new jalview.binding.Annotation[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.Annotation) _annotationList.elementAt(index); } - return mArray; - } - //-- jalview.binding.Annotation[] getAnnotation() + } //-- jalview.binding.Annotation[] getAnnotation() /** * Method getAnnotationCount - * - * - * + * + * + * * @return int */ - public int getAnnotationCount() { + public int getAnnotationCount() + { return _annotationList.size(); - } - //-- int getAnnotationCount() + } //-- int getAnnotationCount() /** * Returns the value of field 'gapChar'. - * + * * @return String * @return the value of field 'gapChar'. */ - public java.lang.String getGapChar() { + public java.lang.String getGapChar() + { return this._gapChar; - } - //-- java.lang.String getGapChar() + } //-- java.lang.String getGapChar() /** * Method getSequence - * - * - * + * + * + * * @param index * @return Sequence */ public jalview.binding.Sequence getSequence(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _sequenceList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.Sequence) _sequenceList.elementAt(index); - } - //-- jalview.binding.Sequence getSequence(int) + } //-- jalview.binding.Sequence getSequence(int) /** * Method getSequence - * - * - * + * + * + * * @return Sequence */ - public jalview.binding.Sequence[] getSequence() { + public jalview.binding.Sequence[] getSequence() + { int size = _sequenceList.size(); jalview.binding.Sequence[] mArray = new jalview.binding.Sequence[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.Sequence) _sequenceList.elementAt(index); } - return mArray; - } - //-- jalview.binding.Sequence[] getSequence() + } //-- jalview.binding.Sequence[] getSequence() /** * Method getSequenceCount - * - * - * + * + * + * * @return int */ - public int getSequenceCount() { + public int getSequenceCount() + { return _sequenceList.size(); - } - //-- int getSequenceCount() + } //-- int getSequenceCount() /** * Method hasAligned - * - * - * + * + * + * * @return boolean */ - public boolean hasAligned() { + public boolean hasAligned() + { return this._has_aligned; - } - //-- boolean hasAligned() + } //-- boolean hasAligned() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Method removeAllAnnotation - * + * */ - public void removeAllAnnotation() { + public void removeAllAnnotation() + { _annotationList.removeAllElements(); - } - //-- void removeAllAnnotation() + } //-- void removeAllAnnotation() /** * Method removeAllSequence - * + * */ - public void removeAllSequence() { + public void removeAllSequence() + { _sequenceList.removeAllElements(); - } - //-- void removeAllSequence() + } //-- void removeAllSequence() /** * Method removeAnnotation - * - * - * + * + * + * * @param index * @return Annotation */ - public jalview.binding.Annotation removeAnnotation(int index) { + public jalview.binding.Annotation removeAnnotation(int index) + { java.lang.Object obj = _annotationList.elementAt(index); _annotationList.removeElementAt(index); - return (jalview.binding.Annotation) obj; - } - //-- jalview.binding.Annotation removeAnnotation(int) + } //-- jalview.binding.Annotation removeAnnotation(int) /** * Method removeSequence - * - * - * + * + * + * * @param index * @return Sequence */ - public jalview.binding.Sequence removeSequence(int index) { + public jalview.binding.Sequence removeSequence(int index) + { java.lang.Object obj = _sequenceList.elementAt(index); _sequenceList.removeElementAt(index); - return (jalview.binding.Sequence) obj; - } - //-- jalview.binding.Sequence removeSequence(int) + } //-- jalview.binding.Sequence removeSequence(int) /** * Sets the value of field 'aligned'. - * + * * @param aligned the value of field 'aligned'. */ - public void setAligned(boolean aligned) { + public void setAligned(boolean aligned) + { this._aligned = aligned; this._has_aligned = true; - } - //-- void setAligned(boolean) + } //-- void setAligned(boolean) /** * Method setAnnotation - * - * - * + * + * + * * @param index * @param vAnnotation */ public void setAnnotation(int index, jalview.binding.Annotation vAnnotation) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _annotationList.size())) { throw new IndexOutOfBoundsException(); } - _annotationList.setElementAt(vAnnotation, index); - } - //-- void setAnnotation(int, jalview.binding.Annotation) + } //-- void setAnnotation(int, jalview.binding.Annotation) /** * Method setAnnotation - * - * - * + * + * + * * @param annotationArray */ - public void setAnnotation(jalview.binding.Annotation[] annotationArray) { + public void setAnnotation(jalview.binding.Annotation[] annotationArray) + { //-- copy array _annotationList.removeAllElements(); - for (int i = 0; i < annotationArray.length; i++) { _annotationList.addElement(annotationArray[i]); } - } - //-- void setAnnotation(jalview.binding.Annotation) + } //-- void setAnnotation(jalview.binding.Annotation) /** * Sets the value of field 'gapChar'. - * + * * @param gapChar the value of field 'gapChar'. */ - public void setGapChar(java.lang.String gapChar) { + public void setGapChar(java.lang.String gapChar) + { this._gapChar = gapChar; - } - //-- void setGapChar(java.lang.String) + } //-- void setGapChar(java.lang.String) /** * Method setSequence - * - * - * + * + * + * * @param index * @param vSequence */ public void setSequence(int index, jalview.binding.Sequence vSequence) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _sequenceList.size())) { throw new IndexOutOfBoundsException(); } - _sequenceList.setElementAt(vSequence, index); - } - //-- void setSequence(int, jalview.binding.Sequence) + } //-- void setSequence(int, jalview.binding.Sequence) /** * Method setSequence - * - * - * + * + * + * * @param sequenceArray */ - public void setSequence(jalview.binding.Sequence[] sequenceArray) { + public void setSequence(jalview.binding.Sequence[] sequenceArray) + { //-- copy array _sequenceList.removeAllElements(); - for (int i = 0; i < sequenceArray.length; i++) { _sequenceList.addElement(sequenceArray[i]); } - } - //-- void setSequence(jalview.binding.Sequence) + } //-- void setSequence(jalview.binding.Sequence) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.SequenceSet) Unmarshaller.unmarshal(jalview.binding.SequenceSet.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.SequenceSet) Unmarshaller.unmarshal(jalview.binding.SequenceSet.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/SequenceType.java b/src/jalview/binding/SequenceType.java index 6060e77..3a935e4 100755 --- a/src/jalview/binding/SequenceType.java +++ b/src/jalview/binding/SequenceType.java @@ -1,53 +1,36 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 SequenceType. - * + * * @version $Revision$ $Date$ */ public class SequenceType implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -65,141 +48,152 @@ public class SequenceType implements java.io.Serializable { */ private java.lang.String _name; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public SequenceType() { super(); - } - //-- jalview.binding.SequenceType() - //-----------/ + } //-- jalview.binding.SequenceType() + - public java.lang.String getId() { + //-----------/ + //- Methods -/ + //-----------/ + + /** + * 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() + } //-- java.lang.String getId() /** * Returns the value of field 'name'. - * + * * @return String * @return the value of field 'name'. */ - public java.lang.String getName() { + public java.lang.String getName() + { return this._name; - } - //-- java.lang.String getName() + } //-- java.lang.String getName() /** * Returns the value of field 'sequence'. - * + * * @return String * @return the value of field 'sequence'. */ - public java.lang.String getSequence() { + public java.lang.String getSequence() + { return this._sequence; - } - //-- java.lang.String getSequence() + } //-- java.lang.String getSequence() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'id'. - * + * * @param id the value of field 'id'. */ - public void setId(java.lang.String id) { + public void setId(java.lang.String id) + { this._id = id; - } - //-- void setId(java.lang.String) + } //-- void setId(java.lang.String) /** * Sets the value of field 'name'. - * + * * @param name the value of field 'name'. */ - public void setName(java.lang.String name) { + public void setName(java.lang.String name) + { this._name = name; - } - //-- void setName(java.lang.String) + } //-- 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) { + public void setSequence(java.lang.String sequence) + { this._sequence = sequence; - } - //-- void setSequence(java.lang.String) + } //-- void setSequence(java.lang.String) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.SequenceType) Unmarshaller.unmarshal(jalview.binding.SequenceType.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.SequenceType) Unmarshaller.unmarshal(jalview.binding.SequenceType.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/Tree.java b/src/jalview/binding/Tree.java new file mode 100755 index 0000000..2821029 --- /dev/null +++ b/src/jalview/binding/Tree.java @@ -0,0 +1,756 @@ +/* + * This class was automatically generated with + * Castor 0.9.6, using an XML + * Schema. + * $Id$ + */ + +package jalview.binding; + + //---------------------------------/ + //- 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 implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _title + */ + private java.lang.String _title; + + /** + * Field _currentTree + */ + private boolean _currentTree; + + /** + * keeps track of state for field: _currentTree + */ + private boolean _has_currentTree; + + /** + * Field _fitToWindow + */ + private boolean _fitToWindow; + + /** + * keeps track of state for field: _fitToWindow + */ + private boolean _has_fitToWindow; + + /** + * Field _showDistances + */ + private boolean _showDistances; + + /** + * keeps track of state for field: _showDistances + */ + private boolean _has_showDistances; + + /** + * Field _showBootstrap + */ + private boolean _showBootstrap; + + /** + * keeps track of state for field: _showBootstrap + */ + private boolean _has_showBootstrap; + + /** + * Field _markUnlinked + */ + private boolean _markUnlinked; + + /** + * keeps track of state for field: _markUnlinked + */ + private boolean _has_markUnlinked; + + /** + * Field _fontSize + */ + private int _fontSize; + + /** + * keeps track of state for field: _fontSize + */ + private boolean _has_fontSize; + + /** + * Field _threshold + */ + private float _threshold; + + /** + * keeps track of state for field: _threshold + */ + private boolean _has_threshold; + + /** + * Field _xpos + */ + private int _xpos; + + /** + * keeps track of state for field: _xpos + */ + private boolean _has_xpos; + + /** + * Field _ypos + */ + private int _ypos; + + /** + * keeps track of state for field: _ypos + */ + private boolean _has_ypos; + + /** + * Field _width + */ + private int _width; + + /** + * keeps track of state for field: _width + */ + private boolean _has_width; + + /** + * Field _height + */ + private int _height; + + /** + * keeps track of state for field: _height + */ + private boolean _has_height; + + /** + * Field _newick + */ + private java.lang.String _newick; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Tree() { + super(); + } //-- jalview.binding.Tree() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteCurrentTree + * + */ + public void deleteCurrentTree() + { + this._has_currentTree= false; + } //-- void deleteCurrentTree() + + /** + * Method deleteFitToWindow + * + */ + public void deleteFitToWindow() + { + this._has_fitToWindow= false; + } //-- void deleteFitToWindow() + + /** + * Method deleteFontSize + * + */ + public void deleteFontSize() + { + this._has_fontSize= false; + } //-- void deleteFontSize() + + /** + * Method deleteHeight + * + */ + public void deleteHeight() + { + this._has_height= false; + } //-- void deleteHeight() + + /** + * Method deleteMarkUnlinked + * + */ + public void deleteMarkUnlinked() + { + this._has_markUnlinked= false; + } //-- void deleteMarkUnlinked() + + /** + * Method deleteShowBootstrap + * + */ + public void deleteShowBootstrap() + { + this._has_showBootstrap= false; + } //-- void deleteShowBootstrap() + + /** + * Method deleteShowDistances + * + */ + public void deleteShowDistances() + { + this._has_showDistances= false; + } //-- void deleteShowDistances() + + /** + * Method deleteThreshold + * + */ + public void deleteThreshold() + { + this._has_threshold= false; + } //-- void deleteThreshold() + + /** + * Method deleteWidth + * + */ + public void deleteWidth() + { + this._has_width= false; + } //-- void deleteWidth() + + /** + * Method deleteXpos + * + */ + public void deleteXpos() + { + this._has_xpos= false; + } //-- void deleteXpos() + + /** + * Method deleteYpos + * + */ + public void deleteYpos() + { + this._has_ypos= false; + } //-- void deleteYpos() + + /** + * Returns the value of field 'currentTree'. + * + * @return boolean + * @return the value of field 'currentTree'. + */ + public boolean getCurrentTree() + { + return this._currentTree; + } //-- boolean getCurrentTree() + + /** + * Returns the value of field 'fitToWindow'. + * + * @return boolean + * @return the value of field 'fitToWindow'. + */ + public boolean getFitToWindow() + { + return this._fitToWindow; + } //-- boolean getFitToWindow() + + /** + * Returns the value of field 'fontSize'. + * + * @return int + * @return the value of field 'fontSize'. + */ + public int getFontSize() + { + return this._fontSize; + } //-- int getFontSize() + + /** + * Returns the value of field 'height'. + * + * @return int + * @return the value of field 'height'. + */ + public int getHeight() + { + return this._height; + } //-- int getHeight() + + /** + * Returns the value of field 'markUnlinked'. + * + * @return boolean + * @return the value of field 'markUnlinked'. + */ + public boolean getMarkUnlinked() + { + return this._markUnlinked; + } //-- boolean getMarkUnlinked() + + /** + * Returns the value of field 'newick'. + * + * @return String + * @return the value of field 'newick'. + */ + public java.lang.String getNewick() + { + return this._newick; + } //-- java.lang.String getNewick() + + /** + * Returns the value of field 'showBootstrap'. + * + * @return boolean + * @return the value of field 'showBootstrap'. + */ + public boolean getShowBootstrap() + { + return this._showBootstrap; + } //-- boolean getShowBootstrap() + + /** + * Returns the value of field 'showDistances'. + * + * @return boolean + * @return the value of field 'showDistances'. + */ + public boolean getShowDistances() + { + return this._showDistances; + } //-- boolean getShowDistances() + + /** + * Returns the value of field 'threshold'. + * + * @return float + * @return the value of field 'threshold'. + */ + public float getThreshold() + { + return this._threshold; + } //-- float getThreshold() + + /** + * Returns the value of field 'title'. + * + * @return String + * @return the value of field 'title'. + */ + public java.lang.String getTitle() + { + return this._title; + } //-- java.lang.String getTitle() + + /** + * Returns the value of field 'width'. + * + * @return int + * @return the value of field 'width'. + */ + public int getWidth() + { + return this._width; + } //-- int getWidth() + + /** + * Returns the value of field 'xpos'. + * + * @return int + * @return the value of field 'xpos'. + */ + public int getXpos() + { + return this._xpos; + } //-- int getXpos() + + /** + * Returns the value of field 'ypos'. + * + * @return int + * @return the value of field 'ypos'. + */ + public int getYpos() + { + return this._ypos; + } //-- int getYpos() + + /** + * Method hasCurrentTree + * + * + * + * @return boolean + */ + public boolean hasCurrentTree() + { + return this._has_currentTree; + } //-- boolean hasCurrentTree() + + /** + * Method hasFitToWindow + * + * + * + * @return boolean + */ + public boolean hasFitToWindow() + { + return this._has_fitToWindow; + } //-- boolean hasFitToWindow() + + /** + * Method hasFontSize + * + * + * + * @return boolean + */ + public boolean hasFontSize() + { + return this._has_fontSize; + } //-- boolean hasFontSize() + + /** + * Method hasHeight + * + * + * + * @return boolean + */ + public boolean hasHeight() + { + return this._has_height; + } //-- boolean hasHeight() + + /** + * Method hasMarkUnlinked + * + * + * + * @return boolean + */ + public boolean hasMarkUnlinked() + { + return this._has_markUnlinked; + } //-- boolean hasMarkUnlinked() + + /** + * Method hasShowBootstrap + * + * + * + * @return boolean + */ + public boolean hasShowBootstrap() + { + return this._has_showBootstrap; + } //-- boolean hasShowBootstrap() + + /** + * Method hasShowDistances + * + * + * + * @return boolean + */ + public boolean hasShowDistances() + { + return this._has_showDistances; + } //-- boolean hasShowDistances() + + /** + * Method hasThreshold + * + * + * + * @return boolean + */ + public boolean hasThreshold() + { + return this._has_threshold; + } //-- boolean hasThreshold() + + /** + * Method hasWidth + * + * + * + * @return boolean + */ + public boolean hasWidth() + { + return this._has_width; + } //-- boolean hasWidth() + + /** + * Method hasXpos + * + * + * + * @return boolean + */ + public boolean hasXpos() + { + return this._has_xpos; + } //-- boolean hasXpos() + + /** + * Method hasYpos + * + * + * + * @return boolean + */ + public boolean hasYpos() + { + return this._has_ypos; + } //-- boolean hasYpos() + + /** + * 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 'currentTree'. + * + * @param currentTree the value of field 'currentTree'. + */ + public void setCurrentTree(boolean currentTree) + { + this._currentTree = currentTree; + this._has_currentTree = true; + } //-- void setCurrentTree(boolean) + + /** + * Sets the value of field 'fitToWindow'. + * + * @param fitToWindow the value of field 'fitToWindow'. + */ + public void setFitToWindow(boolean fitToWindow) + { + this._fitToWindow = fitToWindow; + this._has_fitToWindow = true; + } //-- void setFitToWindow(boolean) + + /** + * Sets the value of field 'fontSize'. + * + * @param fontSize the value of field 'fontSize'. + */ + public void setFontSize(int fontSize) + { + this._fontSize = fontSize; + this._has_fontSize = true; + } //-- void setFontSize(int) + + /** + * Sets the value of field 'height'. + * + * @param height the value of field 'height'. + */ + public void setHeight(int height) + { + this._height = height; + this._has_height = true; + } //-- void setHeight(int) + + /** + * Sets the value of field 'markUnlinked'. + * + * @param markUnlinked the value of field 'markUnlinked'. + */ + public void setMarkUnlinked(boolean markUnlinked) + { + this._markUnlinked = markUnlinked; + this._has_markUnlinked = true; + } //-- void setMarkUnlinked(boolean) + + /** + * Sets the value of field 'newick'. + * + * @param newick the value of field 'newick'. + */ + public void setNewick(java.lang.String newick) + { + this._newick = newick; + } //-- void setNewick(java.lang.String) + + /** + * Sets the value of field 'showBootstrap'. + * + * @param showBootstrap the value of field 'showBootstrap'. + */ + public void setShowBootstrap(boolean showBootstrap) + { + this._showBootstrap = showBootstrap; + this._has_showBootstrap = true; + } //-- void setShowBootstrap(boolean) + + /** + * Sets the value of field 'showDistances'. + * + * @param showDistances the value of field 'showDistances'. + */ + public void setShowDistances(boolean showDistances) + { + this._showDistances = showDistances; + this._has_showDistances = true; + } //-- void setShowDistances(boolean) + + /** + * Sets the value of field 'threshold'. + * + * @param threshold the value of field 'threshold'. + */ + public void setThreshold(float threshold) + { + this._threshold = threshold; + this._has_threshold = true; + } //-- void setThreshold(float) + + /** + * Sets the value of field 'title'. + * + * @param title the value of field 'title'. + */ + public void setTitle(java.lang.String title) + { + this._title = title; + } //-- void setTitle(java.lang.String) + + /** + * Sets the value of field 'width'. + * + * @param width the value of field 'width'. + */ + public void setWidth(int width) + { + this._width = width; + this._has_width = true; + } //-- void setWidth(int) + + /** + * Sets the value of field 'xpos'. + * + * @param xpos the value of field 'xpos'. + */ + public void setXpos(int xpos) + { + this._xpos = xpos; + this._has_xpos = true; + } //-- void setXpos(int) + + /** + * Sets the value of field 'ypos'. + * + * @param ypos the value of field 'ypos'. + */ + public void setYpos(int ypos) + { + this._ypos = ypos; + this._has_ypos = true; + } //-- void setYpos(int) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Object + */ + public static java.lang.Object unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.Tree) Unmarshaller.unmarshal(jalview.binding.Tree.class, reader); + } //-- java.lang.Object 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/jalview/binding/UserColour.java b/src/jalview/binding/UserColour.java index 3ecb7bc..837d9af 100755 --- a/src/jalview/binding/UserColour.java +++ b/src/jalview/binding/UserColour.java @@ -1,53 +1,36 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 UserColour. - * + * * @version $Revision$ $Date$ */ public class UserColour implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -65,145 +48,153 @@ public class UserColour implements java.io.Serializable { */ private jalview.binding.UserColourScheme _userColourScheme; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public UserColour() { super(); - } - //-- jalview.binding.UserColour() - //-----------/ + } //-- jalview.binding.UserColour() - public void deleteId() { - this._has_id = false; - } - //-- void deleteId() + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteId + * + */ + public void deleteId() + { + this._has_id= false; + } //-- void deleteId() /** * Returns the value of field 'id'. - * + * * @return int * @return the value of field 'id'. */ - public int getId() { + public int getId() + { return this._id; - } - //-- int getId() + } //-- int getId() /** * Returns the value of field 'userColourScheme'. - * + * * @return UserColourScheme * @return the value of field 'userColourScheme'. */ - public jalview.binding.UserColourScheme getUserColourScheme() { + public jalview.binding.UserColourScheme getUserColourScheme() + { return this._userColourScheme; - } - //-- jalview.binding.UserColourScheme getUserColourScheme() + } //-- jalview.binding.UserColourScheme getUserColourScheme() /** * Method hasId - * - * - * + * + * + * * @return boolean */ - public boolean hasId() { + public boolean hasId() + { return this._has_id; - } - //-- boolean hasId() + } //-- boolean hasId() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'id'. - * + * * @param id the value of field 'id'. */ - public void setId(int id) { + public void setId(int id) + { this._id = id; this._has_id = true; - } - //-- void setId(int) + } //-- void setId(int) /** * Sets the value of field 'userColourScheme'. - * + * * @param userColourScheme the value of field 'userColourScheme' */ - public void setUserColourScheme( - jalview.binding.UserColourScheme userColourScheme) { + public void setUserColourScheme(jalview.binding.UserColourScheme userColourScheme) + { this._userColourScheme = userColourScheme; - } - //-- void setUserColourScheme(jalview.binding.UserColourScheme) + } //-- void setUserColourScheme(jalview.binding.UserColourScheme) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.UserColour) Unmarshaller.unmarshal(jalview.binding.UserColour.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.UserColour) Unmarshaller.unmarshal(jalview.binding.UserColour.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/UserColourScheme.java b/src/jalview/binding/UserColourScheme.java index e66e468..79ea637 100755 --- a/src/jalview/binding/UserColourScheme.java +++ b/src/jalview/binding/UserColourScheme.java @@ -1,123 +1,118 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 UserColourScheme. - * + * * @version $Revision$ $Date$ */ -public class UserColourScheme extends JalviewUserColours - implements java.io.Serializable { - //----------------/ - //- Constructors -/ +public class UserColourScheme extends JalviewUserColours +implements java.io.Serializable +{ + + + //----------------/ + //- Constructors -/ //----------------/ + public UserColourScheme() { super(); - } - //-- jalview.binding.UserColourScheme() - //-----------/ + } //-- jalview.binding.UserColourScheme() - public boolean isValid() { + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.UserColourScheme) Unmarshaller.unmarshal(jalview.binding.UserColourScheme.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.UserColourScheme) Unmarshaller.unmarshal(jalview.binding.UserColourScheme.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/UserColours.java b/src/jalview/binding/UserColours.java index 2dbffc1..241aaab 100755 --- a/src/jalview/binding/UserColours.java +++ b/src/jalview/binding/UserColours.java @@ -1,53 +1,36 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 UserColours. - * + * * @version $Revision$ $Date$ */ public class UserColours implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -60,121 +43,131 @@ public class UserColours implements java.io.Serializable { */ private jalview.binding.UserColourScheme _userColourScheme; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public UserColours() { super(); - } - //-- jalview.binding.UserColours() - //-----------/ + } //-- jalview.binding.UserColours() - public java.lang.String getId() { + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * 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() + } //-- java.lang.String getId() /** * Returns the value of field 'userColourScheme'. - * + * * @return UserColourScheme * @return the value of field 'userColourScheme'. */ - public jalview.binding.UserColourScheme getUserColourScheme() { + public jalview.binding.UserColourScheme getUserColourScheme() + { return this._userColourScheme; - } - //-- jalview.binding.UserColourScheme getUserColourScheme() + } //-- jalview.binding.UserColourScheme getUserColourScheme() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'id'. - * + * * @param id the value of field 'id'. */ - public void setId(java.lang.String id) { + public void setId(java.lang.String id) + { this._id = id; - } - //-- void setId(java.lang.String) + } //-- void setId(java.lang.String) /** * Sets the value of field 'userColourScheme'. - * + * * @param userColourScheme the value of field 'userColourScheme' */ - public void setUserColourScheme( - jalview.binding.UserColourScheme userColourScheme) { + public void setUserColourScheme(jalview.binding.UserColourScheme userColourScheme) + { this._userColourScheme = userColourScheme; - } - //-- void setUserColourScheme(jalview.binding.UserColourScheme) + } //-- void setUserColourScheme(jalview.binding.UserColourScheme) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.UserColours) Unmarshaller.unmarshal(jalview.binding.UserColours.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.UserColours) Unmarshaller.unmarshal(jalview.binding.UserColours.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/VAMSAS.java b/src/jalview/binding/VAMSAS.java index 5bc9b12..b4237b8 100755 --- a/src/jalview/binding/VAMSAS.java +++ b/src/jalview/binding/VAMSAS.java @@ -1,56 +1,38 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -68,532 +50,527 @@ public class VAMSAS implements java.io.Serializable { */ private java.util.Vector _sequenceSetList; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public VAMSAS() { super(); _alignmentList = new Vector(); _treeList = new Vector(); _sequenceSetList = new Vector(); - } - //-- jalview.binding.VAMSAS() - //-----------/ + } //-- jalview.binding.VAMSAS() + + + //-----------/ + //- Methods -/ + //-----------/ + /** + * Method addAlignment + * + * + * + * @param vAlignment + */ public void addAlignment(jalview.binding.Alignment vAlignment) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _alignmentList.addElement(vAlignment); - } - //-- void addAlignment(jalview.binding.Alignment) + } //-- void addAlignment(jalview.binding.Alignment) /** * Method addAlignment - * - * - * + * + * + * * @param index * @param vAlignment */ public void addAlignment(int index, jalview.binding.Alignment vAlignment) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _alignmentList.insertElementAt(vAlignment, index); - } - //-- void addAlignment(int, jalview.binding.Alignment) + } //-- void addAlignment(int, jalview.binding.Alignment) /** * Method addSequenceSet - * - * - * + * + * + * * @param vSequenceSet */ public void addSequenceSet(jalview.binding.SequenceSet vSequenceSet) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _sequenceSetList.addElement(vSequenceSet); - } - //-- void addSequenceSet(jalview.binding.SequenceSet) + } //-- void addSequenceSet(jalview.binding.SequenceSet) /** * Method addSequenceSet - * - * - * + * + * + * * @param index * @param vSequenceSet */ - public void addSequenceSet(int index, - jalview.binding.SequenceSet vSequenceSet) - throws java.lang.IndexOutOfBoundsException { + public void addSequenceSet(int index, jalview.binding.SequenceSet vSequenceSet) + throws java.lang.IndexOutOfBoundsException + { _sequenceSetList.insertElementAt(vSequenceSet, index); - } - //-- void addSequenceSet(int, jalview.binding.SequenceSet) + } //-- void addSequenceSet(int, jalview.binding.SequenceSet) /** * Method addTree - * - * - * + * + * + * * @param vTree */ public void addTree(java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _treeList.addElement(vTree); - } - //-- void addTree(java.lang.String) + } //-- void addTree(java.lang.String) /** * Method addTree - * - * - * + * + * + * * @param index * @param vTree */ public void addTree(int index, java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { _treeList.insertElementAt(vTree, index); - } - //-- void addTree(int, java.lang.String) + } //-- void addTree(int, java.lang.String) /** * Method enumerateAlignment - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateAlignment() { + public java.util.Enumeration enumerateAlignment() + { return _alignmentList.elements(); - } - //-- java.util.Enumeration enumerateAlignment() + } //-- java.util.Enumeration enumerateAlignment() /** * Method enumerateSequenceSet - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateSequenceSet() { + public java.util.Enumeration enumerateSequenceSet() + { return _sequenceSetList.elements(); - } - //-- java.util.Enumeration enumerateSequenceSet() + } //-- java.util.Enumeration enumerateSequenceSet() /** * Method enumerateTree - * - * - * + * + * + * * @return Enumeration */ - public java.util.Enumeration enumerateTree() { + public java.util.Enumeration enumerateTree() + { return _treeList.elements(); - } - //-- java.util.Enumeration enumerateTree() + } //-- java.util.Enumeration enumerateTree() /** * Method getAlignment - * - * - * + * + * + * * @param index * @return Alignment */ public jalview.binding.Alignment getAlignment(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _alignmentList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.Alignment) _alignmentList.elementAt(index); - } - //-- jalview.binding.Alignment getAlignment(int) + } //-- jalview.binding.Alignment getAlignment(int) /** * Method getAlignment - * - * - * + * + * + * * @return Alignment */ - public jalview.binding.Alignment[] getAlignment() { + public jalview.binding.Alignment[] getAlignment() + { int size = _alignmentList.size(); jalview.binding.Alignment[] mArray = new jalview.binding.Alignment[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.Alignment) _alignmentList.elementAt(index); } - return mArray; - } - //-- jalview.binding.Alignment[] getAlignment() + } //-- jalview.binding.Alignment[] getAlignment() /** * Method getAlignmentCount - * - * - * + * + * + * * @return int */ - public int getAlignmentCount() { + public int getAlignmentCount() + { return _alignmentList.size(); - } - //-- int getAlignmentCount() + } //-- int getAlignmentCount() /** * Method getSequenceSet - * - * - * + * + * + * * @param index * @return SequenceSet */ public jalview.binding.SequenceSet getSequenceSet(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _sequenceSetList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.SequenceSet) _sequenceSetList.elementAt(index); - } - //-- jalview.binding.SequenceSet getSequenceSet(int) + } //-- jalview.binding.SequenceSet getSequenceSet(int) /** * Method getSequenceSet - * - * - * + * + * + * * @return SequenceSet */ - public jalview.binding.SequenceSet[] getSequenceSet() { + public jalview.binding.SequenceSet[] getSequenceSet() + { int size = _sequenceSetList.size(); jalview.binding.SequenceSet[] mArray = new jalview.binding.SequenceSet[size]; - for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.SequenceSet) _sequenceSetList.elementAt(index); } - return mArray; - } - //-- jalview.binding.SequenceSet[] getSequenceSet() + } //-- jalview.binding.SequenceSet[] getSequenceSet() /** * Method getSequenceSetCount - * - * - * + * + * + * * @return int */ - public int getSequenceSetCount() { + public int getSequenceSetCount() + { return _sequenceSetList.size(); - } - //-- int getSequenceSetCount() + } //-- int getSequenceSetCount() /** * Method getTree - * - * - * + * + * + * * @param index * @return String */ public java.lang.String getTree(int index) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _treeList.size())) { throw new IndexOutOfBoundsException(); } - - return (String) _treeList.elementAt(index); - } - //-- java.lang.String getTree(int) + + return (String)_treeList.elementAt(index); + } //-- java.lang.String getTree(int) /** * Method getTree - * - * - * + * + * + * * @return String */ - public java.lang.String[] getTree() { + 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); + mArray[index] = (String)_treeList.elementAt(index); } - return mArray; - } - //-- java.lang.String[] getTree() + } //-- java.lang.String[] getTree() /** * Method getTreeCount - * - * - * + * + * + * * @return int */ - public int getTreeCount() { + public int getTreeCount() + { return _treeList.size(); - } - //-- int getTreeCount() + } //-- int getTreeCount() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Method removeAlignment - * - * - * + * + * + * * @param index * @return Alignment */ - public jalview.binding.Alignment removeAlignment(int index) { + public jalview.binding.Alignment removeAlignment(int index) + { java.lang.Object obj = _alignmentList.elementAt(index); _alignmentList.removeElementAt(index); - return (jalview.binding.Alignment) obj; - } - //-- jalview.binding.Alignment removeAlignment(int) + } //-- jalview.binding.Alignment removeAlignment(int) /** * Method removeAllAlignment - * + * */ - public void removeAllAlignment() { + public void removeAllAlignment() + { _alignmentList.removeAllElements(); - } - //-- void removeAllAlignment() + } //-- void removeAllAlignment() /** * Method removeAllSequenceSet - * + * */ - public void removeAllSequenceSet() { + public void removeAllSequenceSet() + { _sequenceSetList.removeAllElements(); - } - //-- void removeAllSequenceSet() + } //-- void removeAllSequenceSet() /** * Method removeAllTree - * + * */ - public void removeAllTree() { + public void removeAllTree() + { _treeList.removeAllElements(); - } - //-- void removeAllTree() + } //-- void removeAllTree() /** * Method removeSequenceSet - * - * - * + * + * + * * @param index * @return SequenceSet */ - public jalview.binding.SequenceSet removeSequenceSet(int index) { + public jalview.binding.SequenceSet removeSequenceSet(int index) + { java.lang.Object obj = _sequenceSetList.elementAt(index); _sequenceSetList.removeElementAt(index); - return (jalview.binding.SequenceSet) obj; - } - //-- jalview.binding.SequenceSet removeSequenceSet(int) + } //-- jalview.binding.SequenceSet removeSequenceSet(int) /** * Method removeTree - * - * - * + * + * + * * @param index * @return String */ - public java.lang.String removeTree(int index) { + 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) + return (String)obj; + } //-- java.lang.String removeTree(int) /** * Method setAlignment - * - * - * + * + * + * * @param index * @param vAlignment */ public void setAlignment(int index, jalview.binding.Alignment vAlignment) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _alignmentList.size())) { throw new IndexOutOfBoundsException(); } - _alignmentList.setElementAt(vAlignment, index); - } - //-- void setAlignment(int, jalview.binding.Alignment) + } //-- void setAlignment(int, jalview.binding.Alignment) /** * Method setAlignment - * - * - * + * + * + * * @param alignmentArray */ - public void setAlignment(jalview.binding.Alignment[] alignmentArray) { + public void setAlignment(jalview.binding.Alignment[] alignmentArray) + { //-- copy array _alignmentList.removeAllElements(); - for (int i = 0; i < alignmentArray.length; i++) { _alignmentList.addElement(alignmentArray[i]); } - } - //-- void setAlignment(jalview.binding.Alignment) + } //-- void setAlignment(jalview.binding.Alignment) /** * Method setSequenceSet - * - * - * + * + * + * * @param index * @param vSequenceSet */ - public void setSequenceSet(int index, - jalview.binding.SequenceSet vSequenceSet) - throws java.lang.IndexOutOfBoundsException { + public void setSequenceSet(int index, jalview.binding.SequenceSet vSequenceSet) + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _sequenceSetList.size())) { throw new IndexOutOfBoundsException(); } - _sequenceSetList.setElementAt(vSequenceSet, index); - } - //-- void setSequenceSet(int, jalview.binding.SequenceSet) + } //-- void setSequenceSet(int, jalview.binding.SequenceSet) /** * Method setSequenceSet - * - * - * + * + * + * * @param sequenceSetArray */ - public void setSequenceSet(jalview.binding.SequenceSet[] sequenceSetArray) { + public void setSequenceSet(jalview.binding.SequenceSet[] sequenceSetArray) + { //-- copy array _sequenceSetList.removeAllElements(); - for (int i = 0; i < sequenceSetArray.length; i++) { _sequenceSetList.addElement(sequenceSetArray[i]); } - } - //-- void setSequenceSet(jalview.binding.SequenceSet) + } //-- void setSequenceSet(jalview.binding.SequenceSet) /** * Method setTree - * - * - * + * + * + * * @param index * @param vTree */ public void setTree(int index, java.lang.String vTree) - throws java.lang.IndexOutOfBoundsException { + throws java.lang.IndexOutOfBoundsException + { //-- check bounds for index if ((index < 0) || (index > _treeList.size())) { throw new IndexOutOfBoundsException(); } - _treeList.setElementAt(vTree, index); - } - //-- void setTree(int, java.lang.String) + } //-- void setTree(int, java.lang.String) /** * Method setTree - * - * - * + * + * + * * @param treeArray */ - public void setTree(java.lang.String[] 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) + } //-- void setTree(java.lang.String) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(jalview.binding.VAMSAS.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.VAMSAS) Unmarshaller.unmarshal(jalview.binding.VAMSAS.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/VamsasModel.java b/src/jalview/binding/VamsasModel.java index f802039..a4d4362 100755 --- a/src/jalview/binding/VamsasModel.java +++ b/src/jalview/binding/VamsasModel.java @@ -1,122 +1,118 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -/* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 VamsasModel. - * + * * @version $Revision$ $Date$ */ -public class VamsasModel extends VAMSAS implements java.io.Serializable { - //----------------/ - //- Constructors -/ +public class VamsasModel extends VAMSAS +implements java.io.Serializable +{ + + + //----------------/ + //- Constructors -/ //----------------/ + public VamsasModel() { super(); - } - //-- jalview.binding.VamsasModel() - //-----------/ + } //-- jalview.binding.VamsasModel() - public boolean isValid() { + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.VamsasModel) Unmarshaller.unmarshal(jalview.binding.VamsasModel.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.VamsasModel) Unmarshaller.unmarshal(jalview.binding.VamsasModel.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } diff --git a/src/jalview/binding/Viewport.java b/src/jalview/binding/Viewport.java index 8bdee5d..911061b 100755 --- a/src/jalview/binding/Viewport.java +++ b/src/jalview/binding/Viewport.java @@ -1,53 +1,36 @@ /* -* Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ -/* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -package jalview.binding; - -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; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- 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 Viewport. - * + * * @version $Revision$ $Date$ */ public class Viewport implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** @@ -295,1134 +278,1143 @@ public class Viewport implements java.io.Serializable { */ private boolean _has_fontStyle; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ + public Viewport() { super(); - } - //-- jalview.binding.Viewport() - //-----------/ + } //-- jalview.binding.Viewport() - public void deleteConsThreshold() { - this._has_consThreshold = false; - } - //-- void deleteConsThreshold() + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteConsThreshold + * + */ + public void deleteConsThreshold() + { + this._has_consThreshold= false; + } //-- void deleteConsThreshold() /** * Method deleteConservationSelected - * + * */ - public void deleteConservationSelected() { - this._has_conservationSelected = false; - } - //-- void deleteConservationSelected() + public void deleteConservationSelected() + { + this._has_conservationSelected= false; + } //-- void deleteConservationSelected() /** * Method deleteFontSize - * + * */ - public void deleteFontSize() { - this._has_fontSize = false; - } - //-- void deleteFontSize() + public void deleteFontSize() + { + this._has_fontSize= false; + } //-- void deleteFontSize() /** * Method deleteFontStyle - * + * */ - public void deleteFontStyle() { - this._has_fontStyle = false; - } - //-- void deleteFontStyle() + public void deleteFontStyle() + { + this._has_fontStyle= false; + } //-- void deleteFontStyle() /** * Method deleteHeight - * + * */ - public void deleteHeight() { - this._has_height = false; - } - //-- void deleteHeight() + public void deleteHeight() + { + this._has_height= false; + } //-- void deleteHeight() /** * Method deletePidSelected - * + * */ - public void deletePidSelected() { - this._has_pidSelected = false; - } - //-- void deletePidSelected() + public void deletePidSelected() + { + this._has_pidSelected= false; + } //-- void deletePidSelected() /** * Method deletePidThreshold - * + * */ - public void deletePidThreshold() { - this._has_pidThreshold = false; - } - //-- void deletePidThreshold() + public void deletePidThreshold() + { + this._has_pidThreshold= false; + } //-- void deletePidThreshold() /** * Method deleteRenderGaps - * + * */ - public void deleteRenderGaps() { - this._has_renderGaps = false; - } - //-- void deleteRenderGaps() + public void deleteRenderGaps() + { + this._has_renderGaps= false; + } //-- void deleteRenderGaps() /** * Method deleteShowAnnotation - * + * */ - public void deleteShowAnnotation() { - this._has_showAnnotation = false; - } - //-- void deleteShowAnnotation() + public void deleteShowAnnotation() + { + this._has_showAnnotation= false; + } //-- void deleteShowAnnotation() /** * Method deleteShowBoxes - * + * */ - public void deleteShowBoxes() { - this._has_showBoxes = false; - } - //-- void deleteShowBoxes() + public void deleteShowBoxes() + { + this._has_showBoxes= false; + } //-- void deleteShowBoxes() /** * Method deleteShowColourText - * + * */ - public void deleteShowColourText() { - this._has_showColourText = false; - } - //-- void deleteShowColourText() + public void deleteShowColourText() + { + this._has_showColourText= false; + } //-- void deleteShowColourText() /** * Method deleteShowConservation - * + * */ - public void deleteShowConservation() { - this._has_showConservation = false; - } - //-- void deleteShowConservation() + public void deleteShowConservation() + { + this._has_showConservation= false; + } //-- void deleteShowConservation() /** * Method deleteShowFullId - * + * */ - public void deleteShowFullId() { - this._has_showFullId = false; - } - //-- void deleteShowFullId() + public void deleteShowFullId() + { + this._has_showFullId= false; + } //-- void deleteShowFullId() /** * Method deleteShowIdentity - * + * */ - public void deleteShowIdentity() { - this._has_showIdentity = false; - } - //-- void deleteShowIdentity() + public void deleteShowIdentity() + { + this._has_showIdentity= false; + } //-- void deleteShowIdentity() /** * Method deleteShowQuality - * + * */ - public void deleteShowQuality() { - this._has_showQuality = false; - } - //-- void deleteShowQuality() + public void deleteShowQuality() + { + this._has_showQuality= false; + } //-- void deleteShowQuality() /** * Method deleteShowSequenceFeatures - * + * */ - public void deleteShowSequenceFeatures() { - this._has_showSequenceFeatures = false; - } - //-- void deleteShowSequenceFeatures() + public void deleteShowSequenceFeatures() + { + this._has_showSequenceFeatures= false; + } //-- void deleteShowSequenceFeatures() /** * Method deleteShowText - * + * */ - public void deleteShowText() { - this._has_showText = false; - } - //-- void deleteShowText() + public void deleteShowText() + { + this._has_showText= false; + } //-- void deleteShowText() /** * Method deleteStartRes - * + * */ - public void deleteStartRes() { - this._has_startRes = false; - } - //-- void deleteStartRes() + public void deleteStartRes() + { + this._has_startRes= false; + } //-- void deleteStartRes() /** * Method deleteStartSeq - * + * */ - public void deleteStartSeq() { - this._has_startSeq = false; - } - //-- void deleteStartSeq() + public void deleteStartSeq() + { + this._has_startSeq= false; + } //-- void deleteStartSeq() /** * Method deleteWidth - * + * */ - public void deleteWidth() { - this._has_width = false; - } - //-- void deleteWidth() + public void deleteWidth() + { + this._has_width= false; + } //-- void deleteWidth() /** * Method deleteWrapAlignment - * + * */ - public void deleteWrapAlignment() { - this._has_wrapAlignment = false; - } - //-- void deleteWrapAlignment() + public void deleteWrapAlignment() + { + this._has_wrapAlignment= false; + } //-- void deleteWrapAlignment() /** * Method deleteXpos - * + * */ - public void deleteXpos() { - this._has_xpos = false; - } - //-- void deleteXpos() + public void deleteXpos() + { + this._has_xpos= false; + } //-- void deleteXpos() /** * Method deleteYpos - * + * */ - public void deleteYpos() { - this._has_ypos = false; - } - //-- void deleteYpos() + public void deleteYpos() + { + this._has_ypos= false; + } //-- void deleteYpos() /** * Returns the value of field 'bgColour'. - * + * * @return String * @return the value of field 'bgColour'. */ - public java.lang.String getBgColour() { + public java.lang.String getBgColour() + { return this._bgColour; - } - //-- java.lang.String getBgColour() + } //-- java.lang.String getBgColour() /** * Returns the value of field 'consThreshold'. - * + * * @return int * @return the value of field 'consThreshold'. */ - public int getConsThreshold() { + public int getConsThreshold() + { return this._consThreshold; - } - //-- int getConsThreshold() + } //-- int getConsThreshold() /** * Returns the value of field 'conservationSelected'. - * + * * @return boolean * @return the value of field 'conservationSelected'. */ - public boolean getConservationSelected() { + public boolean getConservationSelected() + { return this._conservationSelected; - } - //-- boolean getConservationSelected() + } //-- boolean getConservationSelected() /** * Returns the value of field 'fontName'. - * + * * @return String * @return the value of field 'fontName'. */ - public java.lang.String getFontName() { + public java.lang.String getFontName() + { return this._fontName; - } - //-- java.lang.String getFontName() + } //-- java.lang.String getFontName() /** * Returns the value of field 'fontSize'. - * + * * @return int * @return the value of field 'fontSize'. */ - public int getFontSize() { + public int getFontSize() + { return this._fontSize; - } - //-- int getFontSize() + } //-- int getFontSize() /** * Returns the value of field 'fontStyle'. - * + * * @return int * @return the value of field 'fontStyle'. */ - public int getFontStyle() { + public int getFontStyle() + { return this._fontStyle; - } - //-- int getFontStyle() + } //-- int getFontStyle() /** * Returns the value of field 'height'. - * + * * @return int * @return the value of field 'height'. */ - public int getHeight() { + public int getHeight() + { return this._height; - } - //-- int getHeight() + } //-- int getHeight() /** * Returns the value of field 'pidSelected'. - * + * * @return boolean * @return the value of field 'pidSelected'. */ - public boolean getPidSelected() { + public boolean getPidSelected() + { return this._pidSelected; - } - //-- boolean getPidSelected() + } //-- boolean getPidSelected() /** * Returns the value of field 'pidThreshold'. - * + * * @return int * @return the value of field 'pidThreshold'. */ - public int getPidThreshold() { + public int getPidThreshold() + { return this._pidThreshold; - } - //-- int getPidThreshold() + } //-- int getPidThreshold() /** * Returns the value of field 'renderGaps'. - * + * * @return boolean * @return the value of field 'renderGaps'. */ - public boolean getRenderGaps() { + public boolean getRenderGaps() + { return this._renderGaps; - } - //-- boolean getRenderGaps() + } //-- boolean getRenderGaps() /** * Returns the value of field 'showAnnotation'. - * + * * @return boolean * @return the value of field 'showAnnotation'. */ - public boolean getShowAnnotation() { + public boolean getShowAnnotation() + { return this._showAnnotation; - } - //-- boolean getShowAnnotation() + } //-- boolean getShowAnnotation() /** * Returns the value of field 'showBoxes'. - * + * * @return boolean * @return the value of field 'showBoxes'. */ - public boolean getShowBoxes() { + public boolean getShowBoxes() + { return this._showBoxes; - } - //-- boolean getShowBoxes() + } //-- boolean getShowBoxes() /** * Returns the value of field 'showColourText'. - * + * * @return boolean * @return the value of field 'showColourText'. */ - public boolean getShowColourText() { + public boolean getShowColourText() + { return this._showColourText; - } - //-- boolean getShowColourText() + } //-- boolean getShowColourText() /** * Returns the value of field 'showConservation'. - * + * * @return boolean * @return the value of field 'showConservation'. */ - public boolean getShowConservation() { + public boolean getShowConservation() + { return this._showConservation; - } - //-- boolean getShowConservation() + } //-- boolean getShowConservation() /** * Returns the value of field 'showFullId'. - * + * * @return boolean * @return the value of field 'showFullId'. */ - public boolean getShowFullId() { + public boolean getShowFullId() + { return this._showFullId; - } - //-- boolean getShowFullId() + } //-- boolean getShowFullId() /** * Returns the value of field 'showIdentity'. - * + * * @return boolean * @return the value of field 'showIdentity'. */ - public boolean getShowIdentity() { + public boolean getShowIdentity() + { return this._showIdentity; - } - //-- boolean getShowIdentity() + } //-- boolean getShowIdentity() /** * Returns the value of field 'showQuality'. - * + * * @return boolean * @return the value of field 'showQuality'. */ - public boolean getShowQuality() { + public boolean getShowQuality() + { return this._showQuality; - } - //-- boolean getShowQuality() + } //-- boolean getShowQuality() /** * Returns the value of field 'showSequenceFeatures'. - * + * * @return boolean * @return the value of field 'showSequenceFeatures'. */ - public boolean getShowSequenceFeatures() { + public boolean getShowSequenceFeatures() + { return this._showSequenceFeatures; - } - //-- boolean getShowSequenceFeatures() + } //-- boolean getShowSequenceFeatures() /** * Returns the value of field 'showText'. - * + * * @return boolean * @return the value of field 'showText'. */ - public boolean getShowText() { + public boolean getShowText() + { return this._showText; - } - //-- boolean getShowText() + } //-- boolean getShowText() /** * Returns the value of field 'startRes'. - * + * * @return int * @return the value of field 'startRes'. */ - public int getStartRes() { + public int getStartRes() + { return this._startRes; - } - //-- int getStartRes() + } //-- int getStartRes() /** * Returns the value of field 'startSeq'. - * + * * @return int * @return the value of field 'startSeq'. */ - public int getStartSeq() { + public int getStartSeq() + { return this._startSeq; - } - //-- int getStartSeq() + } //-- int getStartSeq() /** * Returns the value of field 'title'. - * + * * @return String * @return the value of field 'title'. */ - public java.lang.String getTitle() { + public java.lang.String getTitle() + { return this._title; - } - //-- java.lang.String getTitle() + } //-- java.lang.String getTitle() /** * Returns the value of field 'width'. - * + * * @return int * @return the value of field 'width'. */ - public int getWidth() { + public int getWidth() + { return this._width; - } - //-- int getWidth() + } //-- int getWidth() /** * Returns the value of field 'wrapAlignment'. - * + * * @return boolean * @return the value of field 'wrapAlignment'. */ - public boolean getWrapAlignment() { + public boolean getWrapAlignment() + { return this._wrapAlignment; - } - //-- boolean getWrapAlignment() + } //-- boolean getWrapAlignment() /** * Returns the value of field 'xpos'. - * + * * @return int * @return the value of field 'xpos'. */ - public int getXpos() { + public int getXpos() + { return this._xpos; - } - //-- int getXpos() + } //-- int getXpos() /** * Returns the value of field 'ypos'. - * + * * @return int * @return the value of field 'ypos'. */ - public int getYpos() { + public int getYpos() + { return this._ypos; - } - //-- int getYpos() + } //-- int getYpos() /** * Method hasConsThreshold - * - * - * + * + * + * * @return boolean */ - public boolean hasConsThreshold() { + public boolean hasConsThreshold() + { return this._has_consThreshold; - } - //-- boolean hasConsThreshold() + } //-- boolean hasConsThreshold() /** * Method hasConservationSelected - * - * - * + * + * + * * @return boolean */ - public boolean hasConservationSelected() { + public boolean hasConservationSelected() + { return this._has_conservationSelected; - } - //-- boolean hasConservationSelected() + } //-- boolean hasConservationSelected() /** * Method hasFontSize - * - * - * + * + * + * * @return boolean */ - public boolean hasFontSize() { + public boolean hasFontSize() + { return this._has_fontSize; - } - //-- boolean hasFontSize() + } //-- boolean hasFontSize() /** * Method hasFontStyle - * - * - * + * + * + * * @return boolean */ - public boolean hasFontStyle() { + public boolean hasFontStyle() + { return this._has_fontStyle; - } - //-- boolean hasFontStyle() + } //-- boolean hasFontStyle() /** * Method hasHeight - * - * - * + * + * + * * @return boolean */ - public boolean hasHeight() { + public boolean hasHeight() + { return this._has_height; - } - //-- boolean hasHeight() + } //-- boolean hasHeight() /** * Method hasPidSelected - * - * - * + * + * + * * @return boolean */ - public boolean hasPidSelected() { + public boolean hasPidSelected() + { return this._has_pidSelected; - } - //-- boolean hasPidSelected() + } //-- boolean hasPidSelected() /** * Method hasPidThreshold - * - * - * + * + * + * * @return boolean */ - public boolean hasPidThreshold() { + public boolean hasPidThreshold() + { return this._has_pidThreshold; - } - //-- boolean hasPidThreshold() + } //-- boolean hasPidThreshold() /** * Method hasRenderGaps - * - * - * + * + * + * * @return boolean */ - public boolean hasRenderGaps() { + public boolean hasRenderGaps() + { return this._has_renderGaps; - } - //-- boolean hasRenderGaps() + } //-- boolean hasRenderGaps() /** * Method hasShowAnnotation - * - * - * + * + * + * * @return boolean */ - public boolean hasShowAnnotation() { + public boolean hasShowAnnotation() + { return this._has_showAnnotation; - } - //-- boolean hasShowAnnotation() + } //-- boolean hasShowAnnotation() /** * Method hasShowBoxes - * - * - * + * + * + * * @return boolean */ - public boolean hasShowBoxes() { + public boolean hasShowBoxes() + { return this._has_showBoxes; - } - //-- boolean hasShowBoxes() + } //-- boolean hasShowBoxes() /** * Method hasShowColourText - * - * - * + * + * + * * @return boolean */ - public boolean hasShowColourText() { + public boolean hasShowColourText() + { return this._has_showColourText; - } - //-- boolean hasShowColourText() + } //-- boolean hasShowColourText() /** * Method hasShowConservation - * - * - * + * + * + * * @return boolean */ - public boolean hasShowConservation() { + public boolean hasShowConservation() + { return this._has_showConservation; - } - //-- boolean hasShowConservation() + } //-- boolean hasShowConservation() /** * Method hasShowFullId - * - * - * + * + * + * * @return boolean */ - public boolean hasShowFullId() { + public boolean hasShowFullId() + { return this._has_showFullId; - } - //-- boolean hasShowFullId() + } //-- boolean hasShowFullId() /** * Method hasShowIdentity - * - * - * + * + * + * * @return boolean */ - public boolean hasShowIdentity() { + public boolean hasShowIdentity() + { return this._has_showIdentity; - } - //-- boolean hasShowIdentity() + } //-- boolean hasShowIdentity() /** * Method hasShowQuality - * - * - * + * + * + * * @return boolean */ - public boolean hasShowQuality() { + public boolean hasShowQuality() + { return this._has_showQuality; - } - //-- boolean hasShowQuality() + } //-- boolean hasShowQuality() /** * Method hasShowSequenceFeatures - * - * - * + * + * + * * @return boolean */ - public boolean hasShowSequenceFeatures() { + public boolean hasShowSequenceFeatures() + { return this._has_showSequenceFeatures; - } - //-- boolean hasShowSequenceFeatures() + } //-- boolean hasShowSequenceFeatures() /** * Method hasShowText - * - * - * + * + * + * * @return boolean */ - public boolean hasShowText() { + public boolean hasShowText() + { return this._has_showText; - } - //-- boolean hasShowText() + } //-- boolean hasShowText() /** * Method hasStartRes - * - * - * + * + * + * * @return boolean */ - public boolean hasStartRes() { + public boolean hasStartRes() + { return this._has_startRes; - } - //-- boolean hasStartRes() + } //-- boolean hasStartRes() /** * Method hasStartSeq - * - * - * + * + * + * * @return boolean */ - public boolean hasStartSeq() { + public boolean hasStartSeq() + { return this._has_startSeq; - } - //-- boolean hasStartSeq() + } //-- boolean hasStartSeq() /** * Method hasWidth - * - * - * + * + * + * * @return boolean */ - public boolean hasWidth() { + public boolean hasWidth() + { return this._has_width; - } - //-- boolean hasWidth() + } //-- boolean hasWidth() /** * Method hasWrapAlignment - * - * - * + * + * + * * @return boolean */ - public boolean hasWrapAlignment() { + public boolean hasWrapAlignment() + { return this._has_wrapAlignment; - } - //-- boolean hasWrapAlignment() + } //-- boolean hasWrapAlignment() /** * Method hasXpos - * - * - * + * + * + * * @return boolean */ - public boolean hasXpos() { + public boolean hasXpos() + { return this._has_xpos; - } - //-- boolean hasXpos() + } //-- boolean hasXpos() /** * Method hasYpos - * - * - * + * + * + * * @return boolean */ - public boolean hasYpos() { + public boolean hasYpos() + { return this._has_ypos; - } - //-- boolean hasYpos() + } //-- boolean hasYpos() /** * Method isValid - * - * - * + * + * + * * @return boolean */ - public boolean isValid() { + public boolean isValid() + { try { validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { + } + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Sets the value of field 'bgColour'. - * + * * @param bgColour the value of field 'bgColour'. */ - public void setBgColour(java.lang.String bgColour) { + public void setBgColour(java.lang.String bgColour) + { this._bgColour = bgColour; - } - //-- void setBgColour(java.lang.String) + } //-- void setBgColour(java.lang.String) /** * Sets the value of field 'consThreshold'. - * + * * @param consThreshold the value of field 'consThreshold'. */ - public void setConsThreshold(int consThreshold) { + public void setConsThreshold(int consThreshold) + { this._consThreshold = consThreshold; this._has_consThreshold = true; - } - //-- void setConsThreshold(int) + } //-- void setConsThreshold(int) /** * Sets the value of field 'conservationSelected'. - * + * * @param conservationSelected the value of field * 'conservationSelected'. */ - public void setConservationSelected(boolean conservationSelected) { + public void setConservationSelected(boolean conservationSelected) + { this._conservationSelected = conservationSelected; this._has_conservationSelected = true; - } - //-- void setConservationSelected(boolean) + } //-- void setConservationSelected(boolean) /** * Sets the value of field 'fontName'. - * + * * @param fontName the value of field 'fontName'. */ - public void setFontName(java.lang.String fontName) { + public void setFontName(java.lang.String fontName) + { this._fontName = fontName; - } - //-- void setFontName(java.lang.String) + } //-- void setFontName(java.lang.String) /** * Sets the value of field 'fontSize'. - * + * * @param fontSize the value of field 'fontSize'. */ - public void setFontSize(int fontSize) { + public void setFontSize(int fontSize) + { this._fontSize = fontSize; this._has_fontSize = true; - } - //-- void setFontSize(int) + } //-- void setFontSize(int) /** * Sets the value of field 'fontStyle'. - * + * * @param fontStyle the value of field 'fontStyle'. */ - public void setFontStyle(int fontStyle) { + public void setFontStyle(int fontStyle) + { this._fontStyle = fontStyle; this._has_fontStyle = true; - } - //-- void setFontStyle(int) + } //-- void setFontStyle(int) /** * Sets the value of field 'height'. - * + * * @param height the value of field 'height'. */ - public void setHeight(int height) { + public void setHeight(int height) + { this._height = height; this._has_height = true; - } - //-- void setHeight(int) + } //-- void setHeight(int) /** * Sets the value of field 'pidSelected'. - * + * * @param pidSelected the value of field 'pidSelected'. */ - public void setPidSelected(boolean pidSelected) { + public void setPidSelected(boolean pidSelected) + { this._pidSelected = pidSelected; this._has_pidSelected = true; - } - //-- void setPidSelected(boolean) + } //-- void setPidSelected(boolean) /** * Sets the value of field 'pidThreshold'. - * + * * @param pidThreshold the value of field 'pidThreshold'. */ - public void setPidThreshold(int pidThreshold) { + public void setPidThreshold(int pidThreshold) + { this._pidThreshold = pidThreshold; this._has_pidThreshold = true; - } - //-- void setPidThreshold(int) + } //-- void setPidThreshold(int) /** * Sets the value of field 'renderGaps'. - * + * * @param renderGaps the value of field 'renderGaps'. */ - public void setRenderGaps(boolean renderGaps) { + public void setRenderGaps(boolean renderGaps) + { this._renderGaps = renderGaps; this._has_renderGaps = true; - } - //-- void setRenderGaps(boolean) + } //-- void setRenderGaps(boolean) /** * Sets the value of field 'showAnnotation'. - * + * * @param showAnnotation the value of field 'showAnnotation'. */ - public void setShowAnnotation(boolean showAnnotation) { + public void setShowAnnotation(boolean showAnnotation) + { this._showAnnotation = showAnnotation; this._has_showAnnotation = true; - } - //-- void setShowAnnotation(boolean) + } //-- void setShowAnnotation(boolean) /** * Sets the value of field 'showBoxes'. - * + * * @param showBoxes the value of field 'showBoxes'. */ - public void setShowBoxes(boolean showBoxes) { + public void setShowBoxes(boolean showBoxes) + { this._showBoxes = showBoxes; this._has_showBoxes = true; - } - //-- void setShowBoxes(boolean) + } //-- void setShowBoxes(boolean) /** * Sets the value of field 'showColourText'. - * + * * @param showColourText the value of field 'showColourText'. */ - public void setShowColourText(boolean showColourText) { + public void setShowColourText(boolean showColourText) + { this._showColourText = showColourText; this._has_showColourText = true; - } - //-- void setShowColourText(boolean) + } //-- void setShowColourText(boolean) /** * Sets the value of field 'showConservation'. - * + * * @param showConservation the value of field 'showConservation' */ - public void setShowConservation(boolean showConservation) { + public void setShowConservation(boolean showConservation) + { this._showConservation = showConservation; this._has_showConservation = true; - } - //-- void setShowConservation(boolean) + } //-- void setShowConservation(boolean) /** * Sets the value of field 'showFullId'. - * + * * @param showFullId the value of field 'showFullId'. */ - public void setShowFullId(boolean showFullId) { + public void setShowFullId(boolean showFullId) + { this._showFullId = showFullId; this._has_showFullId = true; - } - //-- void setShowFullId(boolean) + } //-- void setShowFullId(boolean) /** * Sets the value of field 'showIdentity'. - * + * * @param showIdentity the value of field 'showIdentity'. */ - public void setShowIdentity(boolean showIdentity) { + public void setShowIdentity(boolean showIdentity) + { this._showIdentity = showIdentity; this._has_showIdentity = true; - } - //-- void setShowIdentity(boolean) + } //-- void setShowIdentity(boolean) /** * Sets the value of field 'showQuality'. - * + * * @param showQuality the value of field 'showQuality'. */ - public void setShowQuality(boolean showQuality) { + public void setShowQuality(boolean showQuality) + { this._showQuality = showQuality; this._has_showQuality = true; - } - //-- void setShowQuality(boolean) + } //-- void setShowQuality(boolean) /** * Sets the value of field 'showSequenceFeatures'. - * + * * @param showSequenceFeatures the value of field * 'showSequenceFeatures'. */ - public void setShowSequenceFeatures(boolean showSequenceFeatures) { + public void setShowSequenceFeatures(boolean showSequenceFeatures) + { this._showSequenceFeatures = showSequenceFeatures; this._has_showSequenceFeatures = true; - } - //-- void setShowSequenceFeatures(boolean) + } //-- void setShowSequenceFeatures(boolean) /** * Sets the value of field 'showText'. - * + * * @param showText the value of field 'showText'. */ - public void setShowText(boolean showText) { + public void setShowText(boolean showText) + { this._showText = showText; this._has_showText = true; - } - //-- void setShowText(boolean) + } //-- void setShowText(boolean) /** * Sets the value of field 'startRes'. - * + * * @param startRes the value of field 'startRes'. */ - public void setStartRes(int startRes) { + public void setStartRes(int startRes) + { this._startRes = startRes; this._has_startRes = true; - } - //-- void setStartRes(int) + } //-- void setStartRes(int) /** * Sets the value of field 'startSeq'. - * + * * @param startSeq the value of field 'startSeq'. */ - public void setStartSeq(int startSeq) { + public void setStartSeq(int startSeq) + { this._startSeq = startSeq; this._has_startSeq = true; - } - //-- void setStartSeq(int) + } //-- void setStartSeq(int) /** * Sets the value of field 'title'. - * + * * @param title the value of field 'title'. */ - public void setTitle(java.lang.String title) { + public void setTitle(java.lang.String title) + { this._title = title; - } - //-- void setTitle(java.lang.String) + } //-- void setTitle(java.lang.String) /** * Sets the value of field 'width'. - * + * * @param width the value of field 'width'. */ - public void setWidth(int width) { + public void setWidth(int width) + { this._width = width; this._has_width = true; - } - //-- void setWidth(int) + } //-- void setWidth(int) /** * Sets the value of field 'wrapAlignment'. - * + * * @param wrapAlignment the value of field 'wrapAlignment'. */ - public void setWrapAlignment(boolean wrapAlignment) { + public void setWrapAlignment(boolean wrapAlignment) + { this._wrapAlignment = wrapAlignment; this._has_wrapAlignment = true; - } - //-- void setWrapAlignment(boolean) + } //-- void setWrapAlignment(boolean) /** * Sets the value of field 'xpos'. - * + * * @param xpos the value of field 'xpos'. */ - public void setXpos(int xpos) { + public void setXpos(int xpos) + { this._xpos = xpos; this._has_xpos = true; - } - //-- void setXpos(int) + } //-- void setXpos(int) /** * Sets the value of field 'ypos'. - * + * * @param ypos the value of field 'ypos'. */ - public void setYpos(int ypos) { + public void setYpos(int ypos) + { this._ypos = ypos; this._has_ypos = true; - } - //-- void setYpos(int) + } //-- void setYpos(int) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - return (jalview.binding.Viewport) Unmarshaller.unmarshal(jalview.binding.Viewport.class, - reader); - } - //-- java.lang.Object unmarshal(java.io.Reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (jalview.binding.Viewport) Unmarshaller.unmarshal(jalview.binding.Viewport.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException { + public void validate() + throws org.exolab.castor.xml.ValidationException + { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } - //-- void validate() + } //-- void validate() + } -- 1.7.10.2