X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbinding%2FVamsasModel.java;h=74aa86ec57762dd8fbf2943ad99d7cff9d29dd18;hb=b8d09897dacc7b0ad203982b4578e2c1d8929142;hp=f8020396e6832d05dc10761a05a87ebfc993e7f9;hpb=588042b69abf8e60bcc950b24c283933c7dd422f;p=jalview.git diff --git a/src/jalview/binding/VamsasModel.java b/src/jalview/binding/VamsasModel.java index f802039..74aa86e 100755 --- a/src/jalview/binding/VamsasModel.java +++ b/src/jalview/binding/VamsasModel.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,26 +27,39 @@ import java.io.Writer; * * @version $Revision$ $Date$ */ -public class VamsasModel extends VAMSAS implements java.io.Serializable { +public class VamsasModel extends VAMSAS implements java.io.Serializable +{ //----------------/ //- Constructors -/ //----------------/ - public VamsasModel() { + public VamsasModel() + { super(); } - //-- jalview.binding.VamsasModel() - //-----------/ - public boolean isValid() { - try { + //-- jalview.binding.VamsasModel() + //-----------/ + + /** + * DOCUMENT ME! + * + * @return DOCUMENT ME! + */ + 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 @@ -75,10 +70,12 @@ public class VamsasModel extends VAMSAS 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 @@ -89,10 +86,12 @@ public class VamsasModel extends VAMSAS 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) /** * Method unmarshal @@ -104,19 +103,23 @@ public class VamsasModel extends VAMSAS 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.VamsasModel) Unmarshaller.unmarshal(jalview.binding.VamsasModel.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() }