X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fuk%2Fac%2Fvamsas%2Fobjects%2Fcore%2FAppData.java;h=85ba4d1f81c384633888029577f59194aeb1b9ed;hb=1eea4b639911330e7cd65e17c5421cc584f0d22e;hp=d54bca73111cae0d8c2bf215a5d1a68f988314c9;hpb=1890f014c0a312a7a2203c878e4802e3eb914e47;p=vamsas.git
diff --git a/src/uk/ac/vamsas/objects/core/AppData.java b/src/uk/ac/vamsas/objects/core/AppData.java
index d54bca7..85ba4d1 100644
--- a/src/uk/ac/vamsas/objects/core/AppData.java
+++ b/src/uk/ac/vamsas/objects/core/AppData.java
@@ -1,14 +1,28 @@
/*
- * This class was automatically generated with
- * Castor 1.1, using an XML
- * Schema.
- * $Id$
+ * This file is part of the Vamsas Client version 0.2.
+ * Copyright 2010 by Jim Procter, Iain Milne, Pierre Marguerite,
+ * Andrew Waterhouse and Dominik Lindner.
+ *
+ * Earlier versions have also been incorporated into Jalview version 2.4
+ * since 2008, and TOPALi version 2 since 2007.
+ *
+ * The Vamsas Client is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * The Vamsas Client 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with the Vamsas Client. If not, see .
*/
-
package uk.ac.vamsas.objects.core;
- //---------------------------------/
- //- Imported classes and packages -/
+//---------------------------------/
+//- Imported classes and packages -/
//---------------------------------/
import org.exolab.castor.xml.Marshaller;
@@ -19,294 +33,320 @@ import org.exolab.castor.xml.Unmarshaller;
*
* @version $Revision$ $Date$
*/
-public class AppData extends uk.ac.vamsas.client.Vobject
-implements java.io.Serializable
-{
+public class AppData extends uk.ac.vamsas.client.Vobject implements
+ java.io.Serializable {
+ // --------------------------/
+ // - Class/Member Variables -/
+ // --------------------------/
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
+ /**
+ * Internal choice value storage
+ */
+ private java.lang.Object _choiceValue;
- /**
- * Internal choice value storage
- */
- private java.lang.Object _choiceValue;
+ /**
+ * Field _data.
+ */
+ private byte[] _data;
- /**
- * Field _data.
- */
- private byte[] _data;
+ /**
+ * Field _dataReference.
+ */
+ private java.lang.String _dataReference;
- /**
- * Field _dataReference.
- */
- private java.lang.String _dataReference;
+ // ----------------/
+ // - Constructors -/
+ // ----------------/
+ public AppData() {
+ super();
+ }
- //----------------/
- //- Constructors -/
- //----------------/
+ // -----------/
+ // - Methods -/
+ // -----------/
- public AppData() {
- super();
- }
+ /**
+ * Overrides the java.lang.Object.equals method.
+ *
+ * @param obj
+ * @return true if the objects are equal.
+ */
+ public boolean equals(final java.lang.Object obj) {
+ if (this == obj)
+ return true;
+ if (super.equals(obj) == false)
+ return false;
- //-----------/
- //- Methods -/
- //-----------/
+ if (obj instanceof AppData) {
- /**
- * Overrides the java.lang.Object.equals method.
- *
- * @param obj
- * @return true if the objects are equal.
- */
- public boolean equals(
- final java.lang.Object obj) {
- if ( this == obj )
- return true;
-
- if (super.equals(obj)==false)
+ AppData temp = (AppData) obj;
+ boolean thcycle;
+ boolean tmcycle;
+ if (this._choiceValue != null) {
+ if (temp._choiceValue == null)
+ return false;
+ if (this._choiceValue != temp._choiceValue) {
+ thcycle = org.castor.util.CycleBreaker
+ .startingToCycle(this._choiceValue);
+ tmcycle = org.castor.util.CycleBreaker
+ .startingToCycle(temp._choiceValue);
+ if (thcycle != tmcycle) {
+ if (!thcycle) {
+ org.castor.util.CycleBreaker
+ .releaseCycleHandle(this._choiceValue);
+ }
+ ;
+ if (!tmcycle) {
+ org.castor.util.CycleBreaker
+ .releaseCycleHandle(temp._choiceValue);
+ }
+ ;
return false;
-
- if (obj instanceof AppData) {
-
- AppData temp = (AppData)obj;
- boolean thcycle;
- boolean tmcycle;
- if (this._choiceValue != null) {
- if (temp._choiceValue == null) return false;
- if (this._choiceValue != temp._choiceValue) {
- thcycle=org.castor.util.CycleBreaker.startingToCycle(this._choiceValue);
- tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._choiceValue);
- if (thcycle!=tmcycle) {
- if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._choiceValue); };
- if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._choiceValue); };
- return false;
- }
- if (!thcycle) {
- if (!this._choiceValue.equals(temp._choiceValue)) {
- org.castor.util.CycleBreaker.releaseCycleHandle(this._choiceValue);
- org.castor.util.CycleBreaker.releaseCycleHandle(temp._choiceValue);
- return false;
- }
- org.castor.util.CycleBreaker.releaseCycleHandle(this._choiceValue);
- org.castor.util.CycleBreaker.releaseCycleHandle(temp._choiceValue);
- }
- }
- } else if (temp._choiceValue != null)
- return false;
- if (this._data != null) {
- if (temp._data == null) return false;
- if (this._data != temp._data) {
- thcycle=org.castor.util.CycleBreaker.startingToCycle(this._data);
- tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._data);
- if (thcycle!=tmcycle) {
- if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._data); };
- if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._data); };
- return false;
- }
- if (!thcycle) {
- if (!java.util.Arrays.equals(this._data, temp._data)) {
- org.castor.util.CycleBreaker.releaseCycleHandle(this._data);
- org.castor.util.CycleBreaker.releaseCycleHandle(temp._data);
- return false;
- }
- org.castor.util.CycleBreaker.releaseCycleHandle(this._data);
- org.castor.util.CycleBreaker.releaseCycleHandle(temp._data);
- }
- }
- } else if (temp._data != null)
- return false;
- if (this._dataReference != null) {
- if (temp._dataReference == null) return false;
- if (this._dataReference != temp._dataReference) {
- thcycle=org.castor.util.CycleBreaker.startingToCycle(this._dataReference);
- tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._dataReference);
- if (thcycle!=tmcycle) {
- if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._dataReference); };
- if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataReference); };
- return false;
- }
- if (!thcycle) {
- if (!this._dataReference.equals(temp._dataReference)) {
- org.castor.util.CycleBreaker.releaseCycleHandle(this._dataReference);
- org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataReference);
- return false;
- }
- org.castor.util.CycleBreaker.releaseCycleHandle(this._dataReference);
- org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataReference);
- }
- }
- } else if (temp._dataReference != null)
- return false;
- return true;
+ }
+ if (!thcycle) {
+ if (!this._choiceValue.equals(temp._choiceValue)) {
+ org.castor.util.CycleBreaker
+ .releaseCycleHandle(this._choiceValue);
+ org.castor.util.CycleBreaker
+ .releaseCycleHandle(temp._choiceValue);
+ return false;
+ }
+ org.castor.util.CycleBreaker.releaseCycleHandle(this._choiceValue);
+ org.castor.util.CycleBreaker.releaseCycleHandle(temp._choiceValue);
+ }
}
+ } else if (temp._choiceValue != null)
return false;
+ if (this._data != null) {
+ if (temp._data == null)
+ return false;
+ if (this._data != temp._data) {
+ thcycle = org.castor.util.CycleBreaker.startingToCycle(this._data);
+ tmcycle = org.castor.util.CycleBreaker.startingToCycle(temp._data);
+ if (thcycle != tmcycle) {
+ if (!thcycle) {
+ org.castor.util.CycleBreaker.releaseCycleHandle(this._data);
+ }
+ ;
+ if (!tmcycle) {
+ org.castor.util.CycleBreaker.releaseCycleHandle(temp._data);
+ }
+ ;
+ return false;
+ }
+ if (!thcycle) {
+ if (!java.util.Arrays.equals(this._data, temp._data)) {
+ org.castor.util.CycleBreaker.releaseCycleHandle(this._data);
+ org.castor.util.CycleBreaker.releaseCycleHandle(temp._data);
+ return false;
+ }
+ org.castor.util.CycleBreaker.releaseCycleHandle(this._data);
+ org.castor.util.CycleBreaker.releaseCycleHandle(temp._data);
+ }
+ }
+ } else if (temp._data != null)
+ return false;
+ if (this._dataReference != null) {
+ if (temp._dataReference == null)
+ return false;
+ if (this._dataReference != temp._dataReference) {
+ thcycle = org.castor.util.CycleBreaker
+ .startingToCycle(this._dataReference);
+ tmcycle = org.castor.util.CycleBreaker
+ .startingToCycle(temp._dataReference);
+ if (thcycle != tmcycle) {
+ if (!thcycle) {
+ org.castor.util.CycleBreaker
+ .releaseCycleHandle(this._dataReference);
+ }
+ ;
+ if (!tmcycle) {
+ org.castor.util.CycleBreaker
+ .releaseCycleHandle(temp._dataReference);
+ }
+ ;
+ return false;
+ }
+ if (!thcycle) {
+ if (!this._dataReference.equals(temp._dataReference)) {
+ org.castor.util.CycleBreaker
+ .releaseCycleHandle(this._dataReference);
+ org.castor.util.CycleBreaker
+ .releaseCycleHandle(temp._dataReference);
+ return false;
+ }
+ org.castor.util.CycleBreaker
+ .releaseCycleHandle(this._dataReference);
+ org.castor.util.CycleBreaker
+ .releaseCycleHandle(temp._dataReference);
+ }
+ }
+ } else if (temp._dataReference != null)
+ return false;
+ return true;
}
+ return false;
+ }
- /**
- * Returns the value of field 'choiceValue'. The field
- * 'choiceValue' has the following description: Internal choice
- * value storage
- *
- * @return the value of field 'ChoiceValue'.
- */
- public java.lang.Object getChoiceValue(
- ) {
- return this._choiceValue;
- }
+ /**
+ * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
+ * following description: Internal choice value storage
+ *
+ * @return the value of field 'ChoiceValue'.
+ */
+ public java.lang.Object getChoiceValue() {
+ return this._choiceValue;
+ }
- /**
- * Returns the value of field 'data'.
- *
- * @return the value of field 'Data'.
- */
- public byte[] getData(
- ) {
- return this._data;
- }
+ /**
+ * Returns the value of field 'data'.
+ *
+ * @return the value of field 'Data'.
+ */
+ public byte[] getData() {
+ return this._data;
+ }
- /**
- * Returns the value of field 'dataReference'.
- *
- * @return the value of field 'DataReference'.
- */
- public java.lang.String getDataReference(
- ) {
- return this._dataReference;
- }
+ /**
+ * Returns the value of field 'dataReference'.
+ *
+ * @return the value of field 'DataReference'.
+ */
+ public java.lang.String getDataReference() {
+ return this._dataReference;
+ }
- /**
- * Overrides the java.lang.Object.hashCode method.
- *
- * The following steps came from Effective Java Programming
- * Language Guide by Joshua Bloch, Chapter 3
- *
- * @return a hash code value for the object.
- */
- public int hashCode(
- ) {
- int result = super.hashCode();
-
- long tmp;
- if (_choiceValue != null
- && !org.castor.util.CycleBreaker.startingToCycle(_choiceValue)) {
- result = 37 * result + _choiceValue.hashCode();
- org.castor.util.CycleBreaker.releaseCycleHandle(_choiceValue);
- }
- if (_data != null
- && !org.castor.util.CycleBreaker.startingToCycle(_data)) {
- result = 37 * result + _data.hashCode();
- org.castor.util.CycleBreaker.releaseCycleHandle(_data);
- }
- if (_dataReference != null
- && !org.castor.util.CycleBreaker.startingToCycle(_dataReference)) {
- result = 37 * result + _dataReference.hashCode();
- org.castor.util.CycleBreaker.releaseCycleHandle(_dataReference);
- }
-
- return result;
- }
+ /**
+ * Overrides the java.lang.Object.hashCode method.
+ *
+ * The following steps came from Effective Java Programming Language
+ * Guide by Joshua Bloch, Chapter 3
+ *
+ * @return a hash code value for the object.
+ */
+ public int hashCode() {
+ int result = super.hashCode();
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
- return false;
- }
- return true;
+ long tmp;
+ if (_choiceValue != null
+ && !org.castor.util.CycleBreaker.startingToCycle(_choiceValue)) {
+ result = 37 * result + _choiceValue.hashCode();
+ org.castor.util.CycleBreaker.releaseCycleHandle(_choiceValue);
}
-
- /**
- *
- *
- * @param out
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void marshal(
- final java.io.Writer out)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, out);
+ if (_data != null && !org.castor.util.CycleBreaker.startingToCycle(_data)) {
+ result = 37 * result + _data.hashCode();
+ org.castor.util.CycleBreaker.releaseCycleHandle(_data);
}
-
- /**
- *
- *
- * @param handler
- * @throws java.io.IOException if an IOException occurs during
- * marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- */
- public void marshal(
- final org.xml.sax.ContentHandler handler)
- throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- Marshaller.marshal(this, handler);
+ if (_dataReference != null
+ && !org.castor.util.CycleBreaker.startingToCycle(_dataReference)) {
+ result = 37 * result + _dataReference.hashCode();
+ org.castor.util.CycleBreaker.releaseCycleHandle(_dataReference);
}
- /**
- * Sets the value of field 'data'.
- *
- * @param data the value of field 'data'.
- */
- public void setData(
- final byte[] data) {
- this._data = data;
- this._choiceValue = data;
- }
+ return result;
+ }
- /**
- * Sets the value of field 'dataReference'.
- *
- * @param dataReference the value of field 'dataReference'.
- */
- public void setDataReference(
- final java.lang.String dataReference) {
- this._dataReference = dataReference;
- this._choiceValue = dataReference;
+ /**
+ * Method isValid.
+ *
+ * @return true if this object is valid according to the schema
+ */
+ public boolean isValid() {
+ try {
+ validate();
+ } catch (org.exolab.castor.xml.ValidationException vex) {
+ return false;
}
+ return true;
+ }
- /**
- * Method unmarshal.
- *
- * @param reader
- * @throws org.exolab.castor.xml.MarshalException if object is
- * null or if any SAXException is thrown during marshaling
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- * @return the unmarshaled uk.ac.vamsas.objects.core.AppData
- */
- public static uk.ac.vamsas.objects.core.AppData unmarshal(
- final java.io.Reader reader)
- throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
- return (uk.ac.vamsas.objects.core.AppData) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.AppData.class, reader);
- }
+ /**
+ *
+ *
+ * @param out
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void marshal(final java.io.Writer out)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException {
+ Marshaller.marshal(this, out);
+ }
- /**
- *
- *
- * @throws org.exolab.castor.xml.ValidationException if this
- * object is an invalid instance according to the schema
- */
- public void validate(
- )
- throws org.exolab.castor.xml.ValidationException {
- org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
- validator.validate(this);
- }
+ /**
+ *
+ *
+ * @param handler
+ * @throws java.io.IOException
+ * if an IOException occurs during marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ */
+ public void marshal(final org.xml.sax.ContentHandler handler)
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException {
+ Marshaller.marshal(this, handler);
+ }
+
+ /**
+ * Sets the value of field 'data'.
+ *
+ * @param data
+ * the value of field 'data'.
+ */
+ public void setData(final byte[] data) {
+ this._data = data;
+ this._choiceValue = data;
+ }
+
+ /**
+ * Sets the value of field 'dataReference'.
+ *
+ * @param dataReference
+ * the value of field 'dataReference'.
+ */
+ public void setDataReference(final java.lang.String dataReference) {
+ this._dataReference = dataReference;
+ this._choiceValue = dataReference;
+ }
+
+ /**
+ * Method unmarshal.
+ *
+ * @param reader
+ * @throws org.exolab.castor.xml.MarshalException
+ * if object is null or if any SAXException is thrown during
+ * marshaling
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ * @return the unmarshaled uk.ac.vamsas.objects.core.AppData
+ */
+ public static uk.ac.vamsas.objects.core.AppData unmarshal(
+ final java.io.Reader reader)
+ throws org.exolab.castor.xml.MarshalException,
+ org.exolab.castor.xml.ValidationException {
+ return (uk.ac.vamsas.objects.core.AppData) Unmarshaller.unmarshal(
+ uk.ac.vamsas.objects.core.AppData.class, reader);
+ }
+
+ /**
+ *
+ *
+ * @throws org.exolab.castor.xml.ValidationException
+ * if this object is an invalid instance according to the schema
+ */
+ public void validate() throws org.exolab.castor.xml.ValidationException {
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
+ validator.validate(this);
+ }
}