2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package jalview.binding;
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
31 * @version $Revision$ $Date$
33 public class Property implements java.io.Serializable
36 // --------------------------/
37 // - Class/Member Variables -/
38 // --------------------------/
43 private java.lang.String _name;
48 private java.lang.String _value;
64 * Returns the value of field 'name'.
66 * @return the value of field 'Name'.
68 public java.lang.String getName()
74 * Returns the value of field 'value'.
76 * @return the value of field 'Value'.
78 public java.lang.String getValue()
86 * @return true if this object is valid according to the schema
88 public boolean isValid()
93 } catch (org.exolab.castor.xml.ValidationException vex)
104 * @throws org.exolab.castor.xml.MarshalException
105 * if object is null or if any SAXException is thrown during
107 * @throws org.exolab.castor.xml.ValidationException
108 * if this object is an invalid instance according to the schema
110 public void marshal(final java.io.Writer out)
111 throws org.exolab.castor.xml.MarshalException,
112 org.exolab.castor.xml.ValidationException
114 Marshaller.marshal(this, out);
121 * @throws java.io.IOException
122 * if an IOException occurs during marshaling
123 * @throws org.exolab.castor.xml.ValidationException
124 * if this object is an invalid instance according to the schema
125 * @throws org.exolab.castor.xml.MarshalException
126 * if object is null or if any SAXException is thrown during
129 public void marshal(final org.xml.sax.ContentHandler handler)
130 throws java.io.IOException,
131 org.exolab.castor.xml.MarshalException,
132 org.exolab.castor.xml.ValidationException
134 Marshaller.marshal(this, handler);
138 * Sets the value of field 'name'.
141 * the value of field 'name'.
143 public void setName(final java.lang.String name)
149 * Sets the value of field 'value'.
152 * the value of field 'value'.
154 public void setValue(final java.lang.String value)
163 * @throws org.exolab.castor.xml.MarshalException
164 * if object is null or if any SAXException is thrown during
166 * @throws org.exolab.castor.xml.ValidationException
167 * if this object is an invalid instance according to the schema
168 * @return the unmarshaled jalview.binding.Property
170 public static jalview.binding.Property unmarshal(
171 final java.io.Reader reader)
172 throws org.exolab.castor.xml.MarshalException,
173 org.exolab.castor.xml.ValidationException
175 return (jalview.binding.Property) Unmarshaller.unmarshal(
176 jalview.binding.Property.class, reader);
182 * @throws org.exolab.castor.xml.ValidationException
183 * if this object is an invalid instance according to the schema
185 public void validate() throws org.exolab.castor.xml.ValidationException
187 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
188 validator.validate(this);