2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
\r
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
\r
5 * This file is part of Jalview.
\r
7 * Jalview is free software: you can redistribute it and/or
\r
8 * modify it under the terms of the GNU General Public License
\r
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
\r
11 * Jalview is distributed in the hope that it will be useful, but
\r
12 * WITHOUT ANY WARRANTY; without even the implied warranty
\r
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
\r
14 * PURPOSE. See the GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
\r
18 package jalview.schemabinding.version2;
\r
20 //---------------------------------/
\r
21 //- Imported classes and packages -/
\r
22 //---------------------------------/
\r
24 import org.exolab.castor.xml.Marshaller;
\r
25 import org.exolab.castor.xml.Unmarshaller;
\r
30 * @version $Revision$ $Date$
\r
32 public class OtherData implements java.io.Serializable
\r
35 // --------------------------/
\r
36 // - Class/Member Variables -/
\r
37 // --------------------------/
\r
42 private java.lang.String _key;
\r
47 private java.lang.String _value;
\r
49 // ----------------/
\r
50 // - Constructors -/
\r
51 // ----------------/
\r
63 * Returns the value of field 'key'.
\r
65 * @return the value of field 'Key'.
\r
67 public java.lang.String getKey()
\r
73 * Returns the value of field 'value'.
\r
75 * @return the value of field 'Value'.
\r
77 public java.lang.String getValue()
\r
85 * @return true if this object is valid according to the schema
\r
87 public boolean isValid()
\r
92 } catch (org.exolab.castor.xml.ValidationException vex)
\r
103 * @throws org.exolab.castor.xml.MarshalException
\r
104 * if object is null or if any SAXException is thrown during
\r
106 * @throws org.exolab.castor.xml.ValidationException
\r
107 * if this object is an invalid instance according to the schema
\r
109 public void marshal(final java.io.Writer out)
\r
110 throws org.exolab.castor.xml.MarshalException,
\r
111 org.exolab.castor.xml.ValidationException
\r
113 Marshaller.marshal(this, out);
\r
120 * @throws java.io.IOException
\r
121 * if an IOException occurs during marshaling
\r
122 * @throws org.exolab.castor.xml.ValidationException
\r
123 * if this object is an invalid instance according to the schema
\r
124 * @throws org.exolab.castor.xml.MarshalException
\r
125 * if object is null or if any SAXException is thrown during
\r
128 public void marshal(final org.xml.sax.ContentHandler handler)
\r
129 throws java.io.IOException,
\r
130 org.exolab.castor.xml.MarshalException,
\r
131 org.exolab.castor.xml.ValidationException
\r
133 Marshaller.marshal(this, handler);
\r
137 * Sets the value of field 'key'.
\r
140 * the value of field 'key'.
\r
142 public void setKey(final java.lang.String key)
\r
148 * Sets the value of field 'value'.
\r
151 * the value of field 'value'.
\r
153 public void setValue(final java.lang.String value)
\r
155 this._value = value;
\r
159 * Method unmarshal.
\r
162 * @throws org.exolab.castor.xml.MarshalException
\r
163 * if object is null or if any SAXException is thrown during
\r
165 * @throws org.exolab.castor.xml.ValidationException
\r
166 * if this object is an invalid instance according to the schema
\r
167 * @return the unmarshaled jalview.schemabinding.version2.OtherData
\r
169 public static jalview.schemabinding.version2.OtherData unmarshal(
\r
170 final java.io.Reader reader)
\r
171 throws org.exolab.castor.xml.MarshalException,
\r
172 org.exolab.castor.xml.ValidationException
\r
174 return (jalview.schemabinding.version2.OtherData) Unmarshaller
\r
175 .unmarshal(jalview.schemabinding.version2.OtherData.class,
\r
182 * @throws org.exolab.castor.xml.ValidationException
\r
183 * if this object is an invalid instance according to the schema
\r
185 public void validate() throws org.exolab.castor.xml.ValidationException
\r
187 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
188 validator.validate(this);
\r