2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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/>.
18 package jalview.schemabinding.version2;
20 //---------------------------------/
21 //- Imported classes and packages -/
22 //---------------------------------/
24 import org.exolab.castor.xml.Marshaller;
25 import org.exolab.castor.xml.Unmarshaller;
30 * @version $Revision$ $Date$
32 public class Group implements java.io.Serializable
35 // --------------------------/
36 // - Class/Member Variables -/
37 // --------------------------/
42 private java.lang.String _name;
47 private boolean _display;
50 * keeps track of state for field: _display
52 private boolean _has_display;
69 public void deleteDisplay()
71 this._has_display = false;
75 * Returns the value of field 'display'.
77 * @return the value of field 'Display'.
79 public boolean getDisplay()
85 * Returns the value of field 'name'.
87 * @return the value of field 'Name'.
89 public java.lang.String getName()
97 * @return true if at least one Display has been added
99 public boolean hasDisplay()
101 return this._has_display;
105 * Returns the value of field 'display'.
107 * @return the value of field 'Display'.
109 public boolean isDisplay()
111 return this._display;
117 * @return true if this object is valid according to the schema
119 public boolean isValid()
124 } catch (org.exolab.castor.xml.ValidationException vex)
135 * @throws org.exolab.castor.xml.MarshalException
136 * if object is null or if any SAXException is thrown during
138 * @throws org.exolab.castor.xml.ValidationException
139 * if this object is an invalid instance according to the schema
141 public void marshal(final java.io.Writer out)
142 throws org.exolab.castor.xml.MarshalException,
143 org.exolab.castor.xml.ValidationException
145 Marshaller.marshal(this, out);
152 * @throws java.io.IOException
153 * if an IOException occurs during marshaling
154 * @throws org.exolab.castor.xml.ValidationException
155 * if this object is an invalid instance according to the schema
156 * @throws org.exolab.castor.xml.MarshalException
157 * if object is null or if any SAXException is thrown during
160 public void marshal(final org.xml.sax.ContentHandler handler)
161 throws java.io.IOException,
162 org.exolab.castor.xml.MarshalException,
163 org.exolab.castor.xml.ValidationException
165 Marshaller.marshal(this, handler);
169 * Sets the value of field 'display'.
172 * the value of field 'display'.
174 public void setDisplay(final boolean display)
176 this._display = display;
177 this._has_display = true;
181 * Sets the value of field 'name'.
184 * the value of field 'name'.
186 public void setName(final java.lang.String name)
195 * @throws org.exolab.castor.xml.MarshalException
196 * if object is null or if any SAXException is thrown during
198 * @throws org.exolab.castor.xml.ValidationException
199 * if this object is an invalid instance according to the schema
200 * @return the unmarshaled jalview.schemabinding.version2.Group
202 public static jalview.schemabinding.version2.Group unmarshal(
203 final java.io.Reader reader)
204 throws org.exolab.castor.xml.MarshalException,
205 org.exolab.castor.xml.ValidationException
207 return (jalview.schemabinding.version2.Group) Unmarshaller.unmarshal(
208 jalview.schemabinding.version2.Group.class, reader);
214 * @throws org.exolab.castor.xml.ValidationException
215 * if this object is an invalid instance according to the schema
217 public void validate() throws org.exolab.castor.xml.ValidationException
219 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
220 validator.validate(this);