X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbinding%2FAlignment.java;h=78fff89dc2a6285df130e8bda1f746824356d1c4;hb=258c0056231d8a97c1d40dd665260e7814d11206;hp=093ae6f690f7379868433291a6f80c8574d2720d;hpb=588042b69abf8e60bcc950b24c283933c7dd422f;p=jalview.git diff --git a/src/jalview/binding/Alignment.java b/src/jalview/binding/Alignment.java index 093ae6f..78fff89 100755 --- a/src/jalview/binding/Alignment.java +++ b/src/jalview/binding/Alignment.java @@ -4,24 +4,6 @@ * 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; @@ -45,7 +27,8 @@ import java.io.Writer; * * @version $Revision$ $Date$ */ -public class Alignment implements java.io.Serializable { +public class Alignment implements java.io.Serializable +{ //--------------------------/ //- Class/Member Variables -/ //--------------------------/ @@ -63,16 +46,25 @@ public class Alignment implements java.io.Serializable { //----------------/ //- Constructors -/ //----------------/ - public Alignment() { + public Alignment() + { super(); } - //-- jalview.binding.Alignment() - //-----------/ - public jalview.binding.Annotation getAnnotation() { + //-- jalview.binding.Alignment() + //-----------/ + + /** + * DOCUMENT ME! + * + * @return DOCUMENT ME! + */ + public jalview.binding.Annotation getAnnotation() + { return this._annotation; } - //-- jalview.binding.Annotation getAnnotation() + + //-- jalview.binding.Annotation getAnnotation() /** * Returns the value of field 'sequenceSet'. @@ -80,10 +72,12 @@ public class Alignment implements java.io.Serializable { * @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 @@ -92,16 +86,21 @@ public class Alignment implements java.io.Serializable { * * @return boolean */ - public boolean isValid() { - try { + 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 @@ -112,10 +111,12 @@ public class Alignment implements java.io.Serializable { */ public void marshal(java.io.Writer out) throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.ValidationException + { Marshaller.marshal(this, out); } - //-- void marshal(java.io.Writer) + + //-- void marshal(java.io.Writer) /** * Method marshal @@ -126,30 +127,36 @@ public class Alignment implements java.io.Serializable { */ public void marshal(org.xml.sax.ContentHandler handler) throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + 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 @@ -161,19 +168,23 @@ public class Alignment implements java.io.Serializable { */ public static java.lang.Object unmarshal(java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException { + org.exolab.castor.xml.ValidationException + { return (jalview.binding.Alignment) Unmarshaller.unmarshal(jalview.binding.Alignment.class, reader); } - //-- java.lang.Object unmarshal(java.io.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() }