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.SequencePoint;
17 * Class SequencePointDescriptor.
19 * @version $Revision$ $Date$
21 public class SequencePointDescriptor
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 SequencePointDescriptor()
56 _nsURI = "www.jalview.org";
57 _xmlName = "sequencePoint";
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.String.class, "_sequenceRef", "sequenceRef",
67 org.exolab.castor.xml.NodeType.Attribute);
68 desc.setImmutable(true);
69 handler = new org.exolab.castor.xml.XMLFieldHandler()
71 public java.lang.Object getValue(java.lang.Object object)
72 throws IllegalStateException
74 SequencePoint target = (SequencePoint) object;
75 return target.getSequenceRef();
78 public void setValue(java.lang.Object object, java.lang.Object value)
79 throws IllegalStateException, IllegalArgumentException
83 SequencePoint target = (SequencePoint) object;
84 target.setSequenceRef((java.lang.String) value);
85 } catch (java.lang.Exception ex)
87 throw new IllegalStateException(ex.toString());
91 public java.lang.Object newInstance(java.lang.Object parent)
96 desc.setHandler(handler);
97 desc.setMultivalued(false);
98 addFieldDescriptor(desc);
100 // -- validation code for: _sequenceRef
101 fieldValidator = new org.exolab.castor.xml.FieldValidator();
103 org.exolab.castor.xml.validators.StringValidator typeValidator;
104 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
105 fieldValidator.setValidator(typeValidator);
106 typeValidator.setWhiteSpace("preserve");
108 desc.setValidator(fieldValidator);
110 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
111 java.lang.Float.TYPE, "_xPos", "xPos",
112 org.exolab.castor.xml.NodeType.Attribute);
113 handler = new org.exolab.castor.xml.XMLFieldHandler()
115 public java.lang.Object getValue(java.lang.Object object)
116 throws IllegalStateException
118 SequencePoint target = (SequencePoint) object;
119 if (!target.hasXPos())
123 return new java.lang.Float(target.getXPos());
126 public void setValue(java.lang.Object object, java.lang.Object value)
127 throws IllegalStateException, IllegalArgumentException
131 SequencePoint target = (SequencePoint) object;
132 // if null, use delete method for optional primitives
138 target.setXPos(((java.lang.Float) value).floatValue());
139 } catch (java.lang.Exception ex)
141 throw new IllegalStateException(ex.toString());
145 public java.lang.Object newInstance(java.lang.Object parent)
150 desc.setHandler(handler);
151 desc.setMultivalued(false);
152 addFieldDescriptor(desc);
154 // -- validation code for: _xPos
155 fieldValidator = new org.exolab.castor.xml.FieldValidator();
157 org.exolab.castor.xml.validators.FloatValidator typeValidator;
158 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
159 fieldValidator.setValidator(typeValidator);
160 typeValidator.setMinInclusive((float) -3.4028235E38);
161 typeValidator.setMaxInclusive((float) 3.4028235E38);
163 desc.setValidator(fieldValidator);
165 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
166 java.lang.Float.TYPE, "_yPos", "yPos",
167 org.exolab.castor.xml.NodeType.Attribute);
168 handler = new org.exolab.castor.xml.XMLFieldHandler()
170 public java.lang.Object getValue(java.lang.Object object)
171 throws IllegalStateException
173 SequencePoint target = (SequencePoint) object;
174 if (!target.hasYPos())
178 return new java.lang.Float(target.getYPos());
181 public void setValue(java.lang.Object object, java.lang.Object value)
182 throws IllegalStateException, IllegalArgumentException
186 SequencePoint target = (SequencePoint) object;
187 // if null, use delete method for optional primitives
193 target.setYPos(((java.lang.Float) value).floatValue());
194 } catch (java.lang.Exception ex)
196 throw new IllegalStateException(ex.toString());
200 public java.lang.Object newInstance(java.lang.Object parent)
205 desc.setHandler(handler);
206 desc.setMultivalued(false);
207 addFieldDescriptor(desc);
209 // -- validation code for: _yPos
210 fieldValidator = new org.exolab.castor.xml.FieldValidator();
212 org.exolab.castor.xml.validators.FloatValidator typeValidator;
213 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
214 fieldValidator.setValidator(typeValidator);
215 typeValidator.setMinInclusive((float) -3.4028235E38);
216 typeValidator.setMaxInclusive((float) 3.4028235E38);
218 desc.setValidator(fieldValidator);
220 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
221 java.lang.Float.TYPE, "_zPos", "zPos",
222 org.exolab.castor.xml.NodeType.Attribute);
223 handler = new org.exolab.castor.xml.XMLFieldHandler()
225 public java.lang.Object getValue(java.lang.Object object)
226 throws IllegalStateException
228 SequencePoint target = (SequencePoint) object;
229 if (!target.hasZPos())
233 return new java.lang.Float(target.getZPos());
236 public void setValue(java.lang.Object object, java.lang.Object value)
237 throws IllegalStateException, IllegalArgumentException
241 SequencePoint target = (SequencePoint) object;
242 // if null, use delete method for optional primitives
248 target.setZPos(((java.lang.Float) value).floatValue());
249 } catch (java.lang.Exception ex)
251 throw new IllegalStateException(ex.toString());
255 public java.lang.Object newInstance(java.lang.Object parent)
260 desc.setHandler(handler);
261 desc.setMultivalued(false);
262 addFieldDescriptor(desc);
264 // -- validation code for: _zPos
265 fieldValidator = new org.exolab.castor.xml.FieldValidator();
267 org.exolab.castor.xml.validators.FloatValidator typeValidator;
268 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
269 fieldValidator.setValidator(typeValidator);
270 typeValidator.setMinInclusive((float) -3.4028235E38);
271 typeValidator.setMaxInclusive((float) 3.4028235E38);
273 desc.setValidator(fieldValidator);
274 // -- initialize element descriptors
283 * Method getAccessMode.
285 * @return the access mode specified for this class.
287 public org.exolab.castor.mapping.AccessMode getAccessMode()
293 * Method getIdentity.
295 * @return the identity field, null if this class has no identity.
297 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
299 return super.getIdentity();
303 * Method getJavaClass.
305 * @return the Java class represented by this descriptor.
307 public java.lang.Class getJavaClass()
309 return jalview.schemabinding.version2.SequencePoint.class;
313 * Method getNameSpacePrefix.
315 * @return the namespace prefix to use when marshaling as XML.
317 public java.lang.String getNameSpacePrefix()
323 * Method getNameSpaceURI.
325 * @return the namespace URI used when marshaling and unmarshaling as XML.
327 public java.lang.String getNameSpaceURI()
333 * Method getValidator.
335 * @return a specific validator for the class described by this
338 public org.exolab.castor.xml.TypeValidator getValidator()
346 * @return the XML Name for the Class being described.
348 public java.lang.String getXMLName()
354 * Method isElementDefinition.
356 * @return true if XML schema definition of this Class is that of a global
357 * element or element with anonymous type definition.
359 public boolean isElementDefinition()
361 return _elementDefinition;