2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2.descriptors;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import jalview.schemabinding.version2.SeqPointMax;
17 * Class SeqPointMaxDescriptor.
19 * @version $Revision$ $Date$
21 public class SeqPointMaxDescriptor
22 extends org.exolab.castor.xml.util.XMLClassDescriptorImpl
25 // --------------------------/
26 // - Class/Member Variables -/
27 // --------------------------/
30 * Field _elementDefinition.
32 private boolean _elementDefinition;
37 private java.lang.String _nsPrefix;
42 private java.lang.String _nsURI;
47 private java.lang.String _xmlName;
53 public SeqPointMaxDescriptor()
56 _nsURI = "www.jalview.org";
57 _xmlName = "seqPointMax";
58 _elementDefinition = true;
59 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
60 org.exolab.castor.mapping.FieldHandler handler = null;
61 org.exolab.castor.xml.FieldValidator fieldValidator = null;
62 // -- initialize attribute descriptors
65 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66 java.lang.Float.TYPE, "_xPos", "xPos",
67 org.exolab.castor.xml.NodeType.Attribute);
68 handler = new org.exolab.castor.xml.XMLFieldHandler()
70 public java.lang.Object getValue(java.lang.Object object)
71 throws IllegalStateException
73 SeqPointMax target = (SeqPointMax) object;
74 if (!target.hasXPos())
78 return new java.lang.Float(target.getXPos());
81 public void setValue(java.lang.Object object, java.lang.Object value)
82 throws IllegalStateException, IllegalArgumentException
86 SeqPointMax target = (SeqPointMax) object;
87 // if null, use delete method for optional primitives
93 target.setXPos(((java.lang.Float) value).floatValue());
94 } catch (java.lang.Exception ex)
96 throw new IllegalStateException(ex.toString());
100 public java.lang.Object newInstance(java.lang.Object parent)
105 desc.setHandler(handler);
106 desc.setMultivalued(false);
107 addFieldDescriptor(desc);
109 // -- validation code for: _xPos
110 fieldValidator = new org.exolab.castor.xml.FieldValidator();
112 org.exolab.castor.xml.validators.FloatValidator typeValidator;
113 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
114 fieldValidator.setValidator(typeValidator);
115 typeValidator.setMinInclusive((float) -3.4028235E38);
116 typeValidator.setMaxInclusive((float) 3.4028235E38);
118 desc.setValidator(fieldValidator);
120 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
121 java.lang.Float.TYPE, "_yPos", "yPos",
122 org.exolab.castor.xml.NodeType.Attribute);
123 handler = new org.exolab.castor.xml.XMLFieldHandler()
125 public java.lang.Object getValue(java.lang.Object object)
126 throws IllegalStateException
128 SeqPointMax target = (SeqPointMax) object;
129 if (!target.hasYPos())
133 return new java.lang.Float(target.getYPos());
136 public void setValue(java.lang.Object object, java.lang.Object value)
137 throws IllegalStateException, IllegalArgumentException
141 SeqPointMax target = (SeqPointMax) object;
142 // if null, use delete method for optional primitives
148 target.setYPos(((java.lang.Float) value).floatValue());
149 } catch (java.lang.Exception ex)
151 throw new IllegalStateException(ex.toString());
155 public java.lang.Object newInstance(java.lang.Object parent)
160 desc.setHandler(handler);
161 desc.setMultivalued(false);
162 addFieldDescriptor(desc);
164 // -- validation code for: _yPos
165 fieldValidator = new org.exolab.castor.xml.FieldValidator();
167 org.exolab.castor.xml.validators.FloatValidator typeValidator;
168 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
169 fieldValidator.setValidator(typeValidator);
170 typeValidator.setMinInclusive((float) -3.4028235E38);
171 typeValidator.setMaxInclusive((float) 3.4028235E38);
173 desc.setValidator(fieldValidator);
175 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
176 java.lang.Float.TYPE, "_zPos", "zPos",
177 org.exolab.castor.xml.NodeType.Attribute);
178 handler = new org.exolab.castor.xml.XMLFieldHandler()
180 public java.lang.Object getValue(java.lang.Object object)
181 throws IllegalStateException
183 SeqPointMax target = (SeqPointMax) object;
184 if (!target.hasZPos())
188 return new java.lang.Float(target.getZPos());
191 public void setValue(java.lang.Object object, java.lang.Object value)
192 throws IllegalStateException, IllegalArgumentException
196 SeqPointMax target = (SeqPointMax) object;
197 // if null, use delete method for optional primitives
203 target.setZPos(((java.lang.Float) value).floatValue());
204 } catch (java.lang.Exception ex)
206 throw new IllegalStateException(ex.toString());
210 public java.lang.Object newInstance(java.lang.Object parent)
215 desc.setHandler(handler);
216 desc.setMultivalued(false);
217 addFieldDescriptor(desc);
219 // -- validation code for: _zPos
220 fieldValidator = new org.exolab.castor.xml.FieldValidator();
222 org.exolab.castor.xml.validators.FloatValidator typeValidator;
223 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
224 fieldValidator.setValidator(typeValidator);
225 typeValidator.setMinInclusive((float) -3.4028235E38);
226 typeValidator.setMaxInclusive((float) 3.4028235E38);
228 desc.setValidator(fieldValidator);
229 // -- initialize element descriptors
238 * Method getAccessMode.
240 * @return the access mode specified for this class.
242 public org.exolab.castor.mapping.AccessMode getAccessMode()
248 * Method getIdentity.
250 * @return the identity field, null if this class has no identity.
252 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
254 return super.getIdentity();
258 * Method getJavaClass.
260 * @return the Java class represented by this descriptor.
262 public java.lang.Class getJavaClass()
264 return jalview.schemabinding.version2.SeqPointMax.class;
268 * Method getNameSpacePrefix.
270 * @return the namespace prefix to use when marshaling as XML.
272 public java.lang.String getNameSpacePrefix()
278 * Method getNameSpaceURI.
280 * @return the namespace URI used when marshaling and unmarshaling as XML.
282 public java.lang.String getNameSpaceURI()
288 * Method getValidator.
290 * @return a specific validator for the class described by this
293 public org.exolab.castor.xml.TypeValidator getValidator()
301 * @return the XML Name for the Class being described.
303 public java.lang.String getXMLName()
309 * Method isElementDefinition.
311 * @return true if XML schema definition of this Class is that of a global
312 * element or element with anonymous type definition.
314 public boolean isElementDefinition()
316 return _elementDefinition;