f71c8730fdaea6d810562b243e9cce4a07b79f18
[jalview.git] / src / jalview / schemabinding / version2 / Group.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
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.
10  *  
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.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  
17  * If not, see <http://www.gnu.org/licenses/>.
18  * The Jalview Authors are detailed in the 'AUTHORS' file.
19  ******************************************************************************/
20 /*
21  * This class was automatically generated with 
22  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
23  * Schema.
24  * $Id$
25  */
26
27 package jalview.schemabinding.version2;
28
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
32
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
35
36 /**
37  * Class Group.
38  * 
39  * @version $Revision$ $Date$
40  */
41 public class Group implements java.io.Serializable
42 {
43
44   // --------------------------/
45   // - Class/Member Variables -/
46   // --------------------------/
47
48   /**
49    * Field _name.
50    */
51   private java.lang.String _name;
52
53   /**
54    * Field _display.
55    */
56   private boolean _display;
57
58   /**
59    * keeps track of state for field: _display
60    */
61   private boolean _has_display;
62
63   // ----------------/
64   // - Constructors -/
65   // ----------------/
66
67   public Group()
68   {
69     super();
70   }
71
72   // -----------/
73   // - Methods -/
74   // -----------/
75
76   /**
77      */
78   public void deleteDisplay()
79   {
80     this._has_display = false;
81   }
82
83   /**
84    * Returns the value of field 'display'.
85    * 
86    * @return the value of field 'Display'.
87    */
88   public boolean getDisplay()
89   {
90     return this._display;
91   }
92
93   /**
94    * Returns the value of field 'name'.
95    * 
96    * @return the value of field 'Name'.
97    */
98   public java.lang.String getName()
99   {
100     return this._name;
101   }
102
103   /**
104    * Method hasDisplay.
105    * 
106    * @return true if at least one Display has been added
107    */
108   public boolean hasDisplay()
109   {
110     return this._has_display;
111   }
112
113   /**
114    * Returns the value of field 'display'.
115    * 
116    * @return the value of field 'Display'.
117    */
118   public boolean isDisplay()
119   {
120     return this._display;
121   }
122
123   /**
124    * Method isValid.
125    * 
126    * @return true if this object is valid according to the schema
127    */
128   public boolean isValid()
129   {
130     try
131     {
132       validate();
133     } catch (org.exolab.castor.xml.ValidationException vex)
134     {
135       return false;
136     }
137     return true;
138   }
139
140   /**
141    * 
142    * 
143    * @param out
144    * @throws org.exolab.castor.xml.MarshalException
145    *           if object is null or if any SAXException is thrown during
146    *           marshaling
147    * @throws org.exolab.castor.xml.ValidationException
148    *           if this object is an invalid instance according to the schema
149    */
150   public void marshal(final java.io.Writer out)
151           throws org.exolab.castor.xml.MarshalException,
152           org.exolab.castor.xml.ValidationException
153   {
154     Marshaller.marshal(this, out);
155   }
156
157   /**
158    * 
159    * 
160    * @param handler
161    * @throws java.io.IOException
162    *           if an IOException occurs during marshaling
163    * @throws org.exolab.castor.xml.ValidationException
164    *           if this object is an invalid instance according to the schema
165    * @throws org.exolab.castor.xml.MarshalException
166    *           if object is null or if any SAXException is thrown during
167    *           marshaling
168    */
169   public void marshal(final org.xml.sax.ContentHandler handler)
170           throws java.io.IOException,
171           org.exolab.castor.xml.MarshalException,
172           org.exolab.castor.xml.ValidationException
173   {
174     Marshaller.marshal(this, handler);
175   }
176
177   /**
178    * Sets the value of field 'display'.
179    * 
180    * @param display
181    *          the value of field 'display'.
182    */
183   public void setDisplay(final boolean display)
184   {
185     this._display = display;
186     this._has_display = true;
187   }
188
189   /**
190    * Sets the value of field 'name'.
191    * 
192    * @param name
193    *          the value of field 'name'.
194    */
195   public void setName(final java.lang.String name)
196   {
197     this._name = name;
198   }
199
200   /**
201    * Method unmarshal.
202    * 
203    * @param reader
204    * @throws org.exolab.castor.xml.MarshalException
205    *           if object is null or if any SAXException is thrown during
206    *           marshaling
207    * @throws org.exolab.castor.xml.ValidationException
208    *           if this object is an invalid instance according to the schema
209    * @return the unmarshaled jalview.schemabinding.version2.Group
210    */
211   public static jalview.schemabinding.version2.Group unmarshal(
212           final java.io.Reader reader)
213           throws org.exolab.castor.xml.MarshalException,
214           org.exolab.castor.xml.ValidationException
215   {
216     return (jalview.schemabinding.version2.Group) Unmarshaller.unmarshal(
217             jalview.schemabinding.version2.Group.class, reader);
218   }
219
220   /**
221    * 
222    * 
223    * @throws org.exolab.castor.xml.ValidationException
224    *           if this object is an invalid instance according to the schema
225    */
226   public void validate() throws org.exolab.castor.xml.ValidationException
227   {
228     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
229     validator.validate(this);
230   }
231
232 }