/*\r
- * This class was automatically generated with \r
- * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
- * Schema.\r
- * $Id$\r
+ * This file is part of the Vamsas Client version 0.1. \r
+ * Copyright 2009 by Jim Procter, Iain Milne, Pierre Marguerite, \r
+ * Andrew Waterhouse and Dominik Lindner.\r
+ * \r
+ * Earlier versions have also been incorporated into Jalview version 2.4 \r
+ * since 2008, and TOPALi version 2 since 2007.\r
+ * \r
+ * The Vamsas Client is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU Lesser General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ * \r
+ * The Vamsas Client is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU Lesser General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU Lesser General Public License\r
+ * along with the Vamsas Client. If not, see <http://www.gnu.org/licenses/>.\r
*/\r
-\r
package uk.ac.vamsas.objects.core;\r
\r
- //---------------------------------/\r
- //- Imported classes and packages -/\r
+//---------------------------------/\r
+//- Imported classes and packages -/\r
//---------------------------------/\r
\r
import org.exolab.castor.xml.Marshaller;\r
* \r
* @version $Revision$ $Date$\r
*/\r
-public class Range extends uk.ac.vamsas.client.Vobject \r
-implements java.io.Serializable\r
-{\r
-\r
-\r
- //--------------------------/\r
- //- Class/Member Variables -/\r
- //--------------------------/\r
-\r
- /**\r
- * Field _seqAStart.\r
- */\r
- private int _seqAStart;\r
-\r
- /**\r
- * keeps track of state for field: _seqAStart\r
- */\r
- private boolean _has_seqAStart;\r
-\r
- /**\r
- * Field _seqAEnd.\r
- */\r
- private int _seqAEnd;\r
-\r
- /**\r
- * keeps track of state for field: _seqAEnd\r
- */\r
- private boolean _has_seqAEnd;\r
-\r
- /**\r
- * Field _seqBStart.\r
- */\r
- private int _seqBStart;\r
-\r
- /**\r
- * keeps track of state for field: _seqBStart\r
- */\r
- private boolean _has_seqBStart;\r
-\r
- /**\r
- * Field _seqBEnd.\r
- */\r
- private int _seqBEnd;\r
-\r
- /**\r
- * keeps track of state for field: _seqBEnd\r
- */\r
- private boolean _has_seqBEnd;\r
-\r
-\r
- //----------------/\r
- //- Constructors -/\r
- //----------------/\r
-\r
- public Range() {\r
- super();\r
- }\r
-\r
-\r
- //-----------/\r
- //- Methods -/\r
- //-----------/\r
-\r
- /**\r
+public class Range extends uk.ac.vamsas.client.Vobject implements\r
+ java.io.Serializable {\r
+\r
+ // --------------------------/\r
+ // - Class/Member Variables -/\r
+ // --------------------------/\r
+\r
+ /**\r
+ * Field _seqAStart.\r
+ */\r
+ private int _seqAStart;\r
+\r
+ /**\r
+ * keeps track of state for field: _seqAStart\r
+ */\r
+ private boolean _has_seqAStart;\r
+\r
+ /**\r
+ * Field _seqAEnd.\r
+ */\r
+ private int _seqAEnd;\r
+\r
+ /**\r
+ * keeps track of state for field: _seqAEnd\r
+ */\r
+ private boolean _has_seqAEnd;\r
+\r
+ /**\r
+ * Field _seqBStart.\r
+ */\r
+ private int _seqBStart;\r
+\r
+ /**\r
+ * keeps track of state for field: _seqBStart\r
+ */\r
+ private boolean _has_seqBStart;\r
+\r
+ /**\r
+ * Field _seqBEnd.\r
+ */\r
+ private int _seqBEnd;\r
+\r
+ /**\r
+ * keeps track of state for field: _seqBEnd\r
+ */\r
+ private boolean _has_seqBEnd;\r
+\r
+ // ----------------/\r
+ // - Constructors -/\r
+ // ----------------/\r
+\r
+ public Range() {\r
+ super();\r
+ }\r
+\r
+ // -----------/\r
+ // - Methods -/\r
+ // -----------/\r
+\r
+ /**\r
*/\r
- public void deleteSeqAEnd(\r
- ) {\r
- this._has_seqAEnd= false;\r
- }\r
-\r
- /**\r
- */\r
- public void deleteSeqAStart(\r
- ) {\r
- this._has_seqAStart= false;\r
- }\r
+ public void deleteSeqAEnd() {\r
+ this._has_seqAEnd = false;\r
+ }\r
\r
- /**\r
+ /**\r
*/\r
- public void deleteSeqBEnd(\r
- ) {\r
- this._has_seqBEnd= false;\r
- }\r
+ public void deleteSeqAStart() {\r
+ this._has_seqAStart = false;\r
+ }\r
\r
- /**\r
+ /**\r
*/\r
- public void deleteSeqBStart(\r
- ) {\r
- this._has_seqBStart= false;\r
- }\r
+ public void deleteSeqBEnd() {\r
+ this._has_seqBEnd = false;\r
+ }\r
\r
- /**\r
- * Overrides the java.lang.Object.equals method.\r
- * \r
- * @param obj\r
- * @return true if the objects are equal.\r
+ /**\r
*/\r
- public boolean equals(\r
- final java.lang.Object obj) {\r
- if ( this == obj )\r
- return true;\r
- \r
- if (super.equals(obj)==false)\r
- return false;\r
- \r
- if (obj instanceof Range) {\r
- \r
- Range temp = (Range)obj;\r
- if (this._seqAStart != temp._seqAStart)\r
- return false;\r
- if (this._has_seqAStart != temp._has_seqAStart)\r
- return false;\r
- if (this._seqAEnd != temp._seqAEnd)\r
- return false;\r
- if (this._has_seqAEnd != temp._has_seqAEnd)\r
- return false;\r
- if (this._seqBStart != temp._seqBStart)\r
- return false;\r
- if (this._has_seqBStart != temp._has_seqBStart)\r
- return false;\r
- if (this._seqBEnd != temp._seqBEnd)\r
- return false;\r
- if (this._has_seqBEnd != temp._has_seqBEnd)\r
- return false;\r
- return true;\r
- }\r
+ public void deleteSeqBStart() {\r
+ this._has_seqBStart = false;\r
+ }\r
+\r
+ /**\r
+ * Overrides the java.lang.Object.equals method.\r
+ * \r
+ * @param obj\r
+ * @return true if the objects are equal.\r
+ */\r
+ public boolean equals(final java.lang.Object obj) {\r
+ if (this == obj)\r
+ return true;\r
+\r
+ if (super.equals(obj) == false)\r
+ return false;\r
+\r
+ if (obj instanceof Range) {\r
+\r
+ Range temp = (Range) obj;\r
+ if (this._seqAStart != temp._seqAStart)\r
return false;\r
+ if (this._has_seqAStart != temp._has_seqAStart)\r
+ return false;\r
+ if (this._seqAEnd != temp._seqAEnd)\r
+ return false;\r
+ if (this._has_seqAEnd != temp._has_seqAEnd)\r
+ return false;\r
+ if (this._seqBStart != temp._seqBStart)\r
+ return false;\r
+ if (this._has_seqBStart != temp._has_seqBStart)\r
+ return false;\r
+ if (this._seqBEnd != temp._seqBEnd)\r
+ return false;\r
+ if (this._has_seqBEnd != temp._has_seqBEnd)\r
+ return false;\r
+ return true;\r
}\r
-\r
- /**\r
- * Returns the value of field 'seqAEnd'.\r
- * \r
- * @return the value of field 'SeqAEnd'.\r
- */\r
- public int getSeqAEnd(\r
- ) {\r
- return this._seqAEnd;\r
- }\r
-\r
- /**\r
- * Returns the value of field 'seqAStart'.\r
- * \r
- * @return the value of field 'SeqAStart'.\r
- */\r
- public int getSeqAStart(\r
- ) {\r
- return this._seqAStart;\r
- }\r
-\r
- /**\r
- * Returns the value of field 'seqBEnd'.\r
- * \r
- * @return the value of field 'SeqBEnd'.\r
- */\r
- public int getSeqBEnd(\r
- ) {\r
- return this._seqBEnd;\r
- }\r
-\r
- /**\r
- * Returns the value of field 'seqBStart'.\r
- * \r
- * @return the value of field 'SeqBStart'.\r
- */\r
- public int getSeqBStart(\r
- ) {\r
- return this._seqBStart;\r
- }\r
-\r
- /**\r
- * Method hasSeqAEnd.\r
- * \r
- * @return true if at least one SeqAEnd has been added\r
- */\r
- public boolean hasSeqAEnd(\r
- ) {\r
- return this._has_seqAEnd;\r
- }\r
-\r
- /**\r
- * Method hasSeqAStart.\r
- * \r
- * @return true if at least one SeqAStart has been added\r
- */\r
- public boolean hasSeqAStart(\r
- ) {\r
- return this._has_seqAStart;\r
- }\r
-\r
- /**\r
- * Method hasSeqBEnd.\r
- * \r
- * @return true if at least one SeqBEnd has been added\r
- */\r
- public boolean hasSeqBEnd(\r
- ) {\r
- return this._has_seqBEnd;\r
- }\r
-\r
- /**\r
- * Method hasSeqBStart.\r
- * \r
- * @return true if at least one SeqBStart has been added\r
- */\r
- public boolean hasSeqBStart(\r
- ) {\r
- return this._has_seqBStart;\r
- }\r
-\r
- /**\r
- * Overrides the java.lang.Object.hashCode method.\r
- * <p>\r
- * The following steps came from <b>Effective Java Programming\r
- * Language Guide</b> by Joshua Bloch, Chapter 3\r
- * \r
- * @return a hash code value for the object.\r
- */\r
- public int hashCode(\r
- ) {\r
- int result = super.hashCode();\r
- \r
- long tmp;\r
- result = 37 * result + _seqAStart;\r
- result = 37 * result + _seqAEnd;\r
- result = 37 * result + _seqBStart;\r
- result = 37 * result + _seqBEnd;\r
- \r
- return result;\r
- }\r
-\r
- /**\r
- * Method isValid.\r
- * \r
- * @return true if this object is valid according to the schema\r
- */\r
- public boolean isValid(\r
- ) {\r
- try {\r
- validate();\r
- } catch (org.exolab.castor.xml.ValidationException vex) {\r
- return false;\r
- }\r
- return true;\r
- }\r
-\r
- /**\r
- * \r
- * \r
- * @param out\r
- * @throws org.exolab.castor.xml.MarshalException if object is\r
- * null or if any SAXException is thrown during marshaling\r
- * @throws org.exolab.castor.xml.ValidationException if this\r
- * object is an invalid instance according to the schema\r
- */\r
- public void marshal(\r
- final java.io.Writer out)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
- Marshaller.marshal(this, out);\r
- }\r
-\r
- /**\r
- * \r
- * \r
- * @param handler\r
- * @throws java.io.IOException if an IOException occurs during\r
- * marshaling\r
- * @throws org.exolab.castor.xml.ValidationException if this\r
- * object is an invalid instance according to the schema\r
- * @throws org.exolab.castor.xml.MarshalException if object is\r
- * null or if any SAXException is thrown during marshaling\r
- */\r
- public void marshal(\r
- final org.xml.sax.ContentHandler handler)\r
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
- Marshaller.marshal(this, handler);\r
- }\r
-\r
- /**\r
- * Sets the value of field 'seqAEnd'.\r
- * \r
- * @param seqAEnd the value of field 'seqAEnd'.\r
- */\r
- public void setSeqAEnd(\r
- final int seqAEnd) {\r
- this._seqAEnd = seqAEnd;\r
- this._has_seqAEnd = true;\r
- }\r
-\r
- /**\r
- * Sets the value of field 'seqAStart'.\r
- * \r
- * @param seqAStart the value of field 'seqAStart'.\r
- */\r
- public void setSeqAStart(\r
- final int seqAStart) {\r
- this._seqAStart = seqAStart;\r
- this._has_seqAStart = true;\r
- }\r
-\r
- /**\r
- * Sets the value of field 'seqBEnd'.\r
- * \r
- * @param seqBEnd the value of field 'seqBEnd'.\r
- */\r
- public void setSeqBEnd(\r
- final int seqBEnd) {\r
- this._seqBEnd = seqBEnd;\r
- this._has_seqBEnd = true;\r
- }\r
-\r
- /**\r
- * Sets the value of field 'seqBStart'.\r
- * \r
- * @param seqBStart the value of field 'seqBStart'.\r
- */\r
- public void setSeqBStart(\r
- final int seqBStart) {\r
- this._seqBStart = seqBStart;\r
- this._has_seqBStart = true;\r
- }\r
-\r
- /**\r
- * Method unmarshal.\r
- * \r
- * @param reader\r
- * @throws org.exolab.castor.xml.MarshalException if object is\r
- * null or if any SAXException is thrown during marshaling\r
- * @throws org.exolab.castor.xml.ValidationException if this\r
- * object is an invalid instance according to the schema\r
- * @return the unmarshaled uk.ac.vamsas.objects.core.Range\r
- */\r
- public static uk.ac.vamsas.objects.core.Range unmarshal(\r
- final java.io.Reader reader)\r
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
- return (uk.ac.vamsas.objects.core.Range) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Range.class, reader);\r
- }\r
-\r
- /**\r
- * \r
- * \r
- * @throws org.exolab.castor.xml.ValidationException if this\r
- * object is an invalid instance according to the schema\r
- */\r
- public void validate(\r
- )\r
- throws org.exolab.castor.xml.ValidationException {\r
- org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
- validator.validate(this);\r
+ return false;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'seqAEnd'.\r
+ * \r
+ * @return the value of field 'SeqAEnd'.\r
+ */\r
+ public int getSeqAEnd() {\r
+ return this._seqAEnd;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'seqAStart'.\r
+ * \r
+ * @return the value of field 'SeqAStart'.\r
+ */\r
+ public int getSeqAStart() {\r
+ return this._seqAStart;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'seqBEnd'.\r
+ * \r
+ * @return the value of field 'SeqBEnd'.\r
+ */\r
+ public int getSeqBEnd() {\r
+ return this._seqBEnd;\r
+ }\r
+\r
+ /**\r
+ * Returns the value of field 'seqBStart'.\r
+ * \r
+ * @return the value of field 'SeqBStart'.\r
+ */\r
+ public int getSeqBStart() {\r
+ return this._seqBStart;\r
+ }\r
+\r
+ /**\r
+ * Method hasSeqAEnd.\r
+ * \r
+ * @return true if at least one SeqAEnd has been added\r
+ */\r
+ public boolean hasSeqAEnd() {\r
+ return this._has_seqAEnd;\r
+ }\r
+\r
+ /**\r
+ * Method hasSeqAStart.\r
+ * \r
+ * @return true if at least one SeqAStart has been added\r
+ */\r
+ public boolean hasSeqAStart() {\r
+ return this._has_seqAStart;\r
+ }\r
+\r
+ /**\r
+ * Method hasSeqBEnd.\r
+ * \r
+ * @return true if at least one SeqBEnd has been added\r
+ */\r
+ public boolean hasSeqBEnd() {\r
+ return this._has_seqBEnd;\r
+ }\r
+\r
+ /**\r
+ * Method hasSeqBStart.\r
+ * \r
+ * @return true if at least one SeqBStart has been added\r
+ */\r
+ public boolean hasSeqBStart() {\r
+ return this._has_seqBStart;\r
+ }\r
+\r
+ /**\r
+ * Overrides the java.lang.Object.hashCode method.\r
+ * <p>\r
+ * The following steps came from <b>Effective Java Programming Language\r
+ * Guide</b> by Joshua Bloch, Chapter 3\r
+ * \r
+ * @return a hash code value for the object.\r
+ */\r
+ public int hashCode() {\r
+ int result = super.hashCode();\r
+\r
+ long tmp;\r
+ result = 37 * result + _seqAStart;\r
+ result = 37 * result + _seqAEnd;\r
+ result = 37 * result + _seqBStart;\r
+ result = 37 * result + _seqBEnd;\r
+\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Method isValid.\r
+ * \r
+ * @return true if this object is valid according to the schema\r
+ */\r
+ public boolean isValid() {\r
+ try {\r
+ validate();\r
+ } catch (org.exolab.castor.xml.ValidationException vex) {\r
+ return false;\r
}\r
+ return true;\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param out\r
+ * @throws org.exolab.castor.xml.MarshalException\r
+ * if object is null or if any SAXException is thrown during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException\r
+ * if this object is an invalid instance according to the schema\r
+ */\r
+ public void marshal(final java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException,\r
+ org.exolab.castor.xml.ValidationException {\r
+ Marshaller.marshal(this, out);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @param handler\r
+ * @throws java.io.IOException\r
+ * if an IOException occurs during marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException\r
+ * if this object is an invalid instance according to the schema\r
+ * @throws org.exolab.castor.xml.MarshalException\r
+ * if object is null or if any SAXException is thrown during\r
+ * marshaling\r
+ */\r
+ public void marshal(final org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException,\r
+ org.exolab.castor.xml.ValidationException {\r
+ Marshaller.marshal(this, handler);\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'seqAEnd'.\r
+ * \r
+ * @param seqAEnd\r
+ * the value of field 'seqAEnd'.\r
+ */\r
+ public void setSeqAEnd(final int seqAEnd) {\r
+ this._seqAEnd = seqAEnd;\r
+ this._has_seqAEnd = true;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'seqAStart'.\r
+ * \r
+ * @param seqAStart\r
+ * the value of field 'seqAStart'.\r
+ */\r
+ public void setSeqAStart(final int seqAStart) {\r
+ this._seqAStart = seqAStart;\r
+ this._has_seqAStart = true;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'seqBEnd'.\r
+ * \r
+ * @param seqBEnd\r
+ * the value of field 'seqBEnd'.\r
+ */\r
+ public void setSeqBEnd(final int seqBEnd) {\r
+ this._seqBEnd = seqBEnd;\r
+ this._has_seqBEnd = true;\r
+ }\r
+\r
+ /**\r
+ * Sets the value of field 'seqBStart'.\r
+ * \r
+ * @param seqBStart\r
+ * the value of field 'seqBStart'.\r
+ */\r
+ public void setSeqBStart(final int seqBStart) {\r
+ this._seqBStart = seqBStart;\r
+ this._has_seqBStart = true;\r
+ }\r
+\r
+ /**\r
+ * Method unmarshal.\r
+ * \r
+ * @param reader\r
+ * @throws org.exolab.castor.xml.MarshalException\r
+ * if object is null or if any SAXException is thrown during\r
+ * marshaling\r
+ * @throws org.exolab.castor.xml.ValidationException\r
+ * if this object is an invalid instance according to the schema\r
+ * @return the unmarshaled uk.ac.vamsas.objects.core.Range\r
+ */\r
+ public static uk.ac.vamsas.objects.core.Range unmarshal(\r
+ final java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException,\r
+ org.exolab.castor.xml.ValidationException {\r
+ return (uk.ac.vamsas.objects.core.Range) Unmarshaller.unmarshal(\r
+ uk.ac.vamsas.objects.core.Range.class, reader);\r
+ }\r
+\r
+ /**\r
+ * \r
+ * \r
+ * @throws org.exolab.castor.xml.ValidationException\r
+ * if this object is an invalid instance according to the schema\r
+ */\r
+ public void validate() throws org.exolab.castor.xml.ValidationException {\r
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+ validator.validate(this);\r
+ }\r
\r
}\r