JAL-1767 schema and Castor changes for Save PCA in project
[jalview.git] / src / jalview / schemabinding / version2 / Axis.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * endpoints of X, Y and Z axes in that order
19  * 
20  * 
21  * @version $Revision$ $Date$
22  */
23 public class Axis implements java.io.Serializable
24 {
25
26   // --------------------------/
27   // - Class/Member Variables -/
28   // --------------------------/
29
30   /**
31    * Field _xPos.
32    */
33   private float _xPos;
34
35   /**
36    * keeps track of state for field: _xPos
37    */
38   private boolean _has_xPos;
39
40   /**
41    * Field _yPos.
42    */
43   private float _yPos;
44
45   /**
46    * keeps track of state for field: _yPos
47    */
48   private boolean _has_yPos;
49
50   /**
51    * Field _zPos.
52    */
53   private float _zPos;
54
55   /**
56    * keeps track of state for field: _zPos
57    */
58   private boolean _has_zPos;
59
60   // ----------------/
61   // - Constructors -/
62   // ----------------/
63
64   public Axis()
65   {
66     super();
67   }
68
69   // -----------/
70   // - Methods -/
71   // -----------/
72
73   /**
74    */
75   public void deleteXPos()
76   {
77     this._has_xPos = false;
78   }
79
80   /**
81    */
82   public void deleteYPos()
83   {
84     this._has_yPos = false;
85   }
86
87   /**
88    */
89   public void deleteZPos()
90   {
91     this._has_zPos = false;
92   }
93
94   /**
95    * Returns the value of field 'xPos'.
96    * 
97    * @return the value of field 'XPos'.
98    */
99   public float getXPos()
100   {
101     return this._xPos;
102   }
103
104   /**
105    * Returns the value of field 'yPos'.
106    * 
107    * @return the value of field 'YPos'.
108    */
109   public float getYPos()
110   {
111     return this._yPos;
112   }
113
114   /**
115    * Returns the value of field 'zPos'.
116    * 
117    * @return the value of field 'ZPos'.
118    */
119   public float getZPos()
120   {
121     return this._zPos;
122   }
123
124   /**
125    * Method hasXPos.
126    * 
127    * @return true if at least one XPos has been added
128    */
129   public boolean hasXPos()
130   {
131     return this._has_xPos;
132   }
133
134   /**
135    * Method hasYPos.
136    * 
137    * @return true if at least one YPos has been added
138    */
139   public boolean hasYPos()
140   {
141     return this._has_yPos;
142   }
143
144   /**
145    * Method hasZPos.
146    * 
147    * @return true if at least one ZPos has been added
148    */
149   public boolean hasZPos()
150   {
151     return this._has_zPos;
152   }
153
154   /**
155    * Method isValid.
156    * 
157    * @return true if this object is valid according to the schema
158    */
159   public boolean isValid()
160   {
161     try
162     {
163       validate();
164     } catch (org.exolab.castor.xml.ValidationException vex)
165     {
166       return false;
167     }
168     return true;
169   }
170
171   /**
172    * 
173    * 
174    * @param out
175    * @throws org.exolab.castor.xml.MarshalException
176    *           if object is null or if any SAXException is thrown during
177    *           marshaling
178    * @throws org.exolab.castor.xml.ValidationException
179    *           if this object is an invalid instance according to the schema
180    */
181   public void marshal(final java.io.Writer out)
182           throws org.exolab.castor.xml.MarshalException,
183           org.exolab.castor.xml.ValidationException
184   {
185     Marshaller.marshal(this, out);
186   }
187
188   /**
189    * 
190    * 
191    * @param handler
192    * @throws java.io.IOException
193    *           if an IOException occurs during marshaling
194    * @throws org.exolab.castor.xml.ValidationException
195    *           if this object is an invalid instance according to the schema
196    * @throws org.exolab.castor.xml.MarshalException
197    *           if object is null or if any SAXException is thrown during
198    *           marshaling
199    */
200   public void marshal(final org.xml.sax.ContentHandler handler)
201           throws java.io.IOException,
202           org.exolab.castor.xml.MarshalException,
203           org.exolab.castor.xml.ValidationException
204   {
205     Marshaller.marshal(this, handler);
206   }
207
208   /**
209    * Sets the value of field 'xPos'.
210    * 
211    * @param xPos
212    *          the value of field 'xPos'.
213    */
214   public void setXPos(final float xPos)
215   {
216     this._xPos = xPos;
217     this._has_xPos = true;
218   }
219
220   /**
221    * Sets the value of field 'yPos'.
222    * 
223    * @param yPos
224    *          the value of field 'yPos'.
225    */
226   public void setYPos(final float yPos)
227   {
228     this._yPos = yPos;
229     this._has_yPos = true;
230   }
231
232   /**
233    * Sets the value of field 'zPos'.
234    * 
235    * @param zPos
236    *          the value of field 'zPos'.
237    */
238   public void setZPos(final float zPos)
239   {
240     this._zPos = zPos;
241     this._has_zPos = true;
242   }
243
244   /**
245    * Method unmarshal.
246    * 
247    * @param reader
248    * @throws org.exolab.castor.xml.MarshalException
249    *           if object is null or if any SAXException is thrown during
250    *           marshaling
251    * @throws org.exolab.castor.xml.ValidationException
252    *           if this object is an invalid instance according to the schema
253    * @return the unmarshaled jalview.schemabinding.version2.Axis
254    */
255   public static jalview.schemabinding.version2.Axis unmarshal(
256           final java.io.Reader reader)
257           throws org.exolab.castor.xml.MarshalException,
258           org.exolab.castor.xml.ValidationException
259   {
260     return (jalview.schemabinding.version2.Axis) Unmarshaller
261             .unmarshal(jalview.schemabinding.version2.Axis.class, reader);
262   }
263
264   /**
265    * 
266    * 
267    * @throws org.exolab.castor.xml.ValidationException
268    *           if this object is an invalid instance according to the schema
269    */
270   public void validate() throws org.exolab.castor.xml.ValidationException
271   {
272     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
273     validator.validate(this);
274   }
275
276 }