X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbinding%2FUserColour.java;h=1d274518e4d895bda8878e08e7d0af72a43dbe6c;hb=d4b1e4d0c74b1c6d0f3c3556b10be91a6aaea475;hp=3ecb7bcd10f51cea8cd1541af32a89851bb5862d;hpb=588042b69abf8e60bcc950b24c283933c7dd422f;p=jalview.git diff --git a/src/jalview/binding/UserColour.java b/src/jalview/binding/UserColour.java index 3ecb7bc..1d27451 100755 --- a/src/jalview/binding/UserColour.java +++ b/src/jalview/binding/UserColour.java @@ -4,206 +4,197 @@ * 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 -/ //---------------------------------/ -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; +import org.exolab.castor.xml.*; /** * Class UserColour. * * @version $Revision$ $Date$ */ -public class UserColour implements java.io.Serializable { - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _id - */ - private int _id; - - /** - * keeps track of state for field: _id - */ - private boolean _has_id; - - /** - * Field _userColourScheme - */ - private jalview.binding.UserColourScheme _userColourScheme; - - //----------------/ - //- Constructors -/ - //----------------/ - public UserColour() { - super(); - } - //-- jalview.binding.UserColour() - //-----------/ - - 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() { - return this._id; - } - //-- int getId() - - /** - * Returns the value of field 'userColourScheme'. - * - * @return UserColourScheme - * @return the value of field 'userColourScheme'. - */ - public jalview.binding.UserColourScheme getUserColourScheme() { - return this._userColourScheme; +public class UserColour + implements java.io.Serializable +{ + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _id + */ + private int _id; + + /** + * keeps track of state for field: _id + */ + private boolean _has_id; + + /** + * Field _userColourScheme + */ + private jalview.binding.UserColourScheme _userColourScheme; + + //----------------/ + //- Constructors -/ + //----------------/ + + public UserColour() + { + super(); + } //-- jalview.binding.UserColour() + + //-----------/ + //- 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() + { + return this._id; + } //-- int getId() + + /** + * Returns the value of field 'userColourScheme'. + * + * @return UserColourScheme + * @return the value of field 'userColourScheme'. + */ + public jalview.binding.UserColourScheme getUserColourScheme() + { + return this._userColourScheme; + } //-- jalview.binding.UserColourScheme getUserColourScheme() + + /** + * Method hasId + * + * + * + * @return boolean + */ + public boolean hasId() + { + return this._has_id; + } //-- boolean hasId() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try + { + validate(); } - //-- jalview.binding.UserColourScheme getUserColourScheme() - - /** - * Method hasId - * - * - * - * @return boolean - */ - public boolean hasId() { - return this._has_id; + catch (org.exolab.castor.xml.ValidationException vex) + { + return false; } - //-- boolean hasId() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() { - try { - validate(); - } catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - - return true; - } - //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, out); - } - //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { - Marshaller.marshal(this, handler); - } - //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'id'. - * - * @param id the value of field 'id'. - */ - public void setId(int id) { - this._id = id; - this._has_id = true; - } - //-- void setId(int) - - /** - * Sets the value of field 'userColourScheme'. - * - * @param userColourScheme the value of field 'userColourScheme' - */ - public void setUserColourScheme( - jalview.binding.UserColourScheme userColourScheme) { - this._userColourScheme = 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) - - /** - * 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() + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, + org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'id'. + * + * @param id the value of field 'id'. + */ + public void setId(int id) + { + this._id = id; + this._has_id = true; + } //-- void setId(int) + + /** + * Sets the value of field 'userColourScheme'. + * + * @param userColourScheme the value of field 'userColourScheme' + */ + public void setUserColourScheme(jalview.binding.UserColourScheme + userColourScheme) + { + this._userColourScheme = 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) + + /** + * 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() + }