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.DoubleVector;
17 * Class DoubleVectorDescriptor.
19 * @version $Revision$ $Date$
21 public class DoubleVectorDescriptor
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 DoubleVectorDescriptor()
56 _nsURI = "www.jalview.org";
57 _xmlName = "DoubleVector";
58 _elementDefinition = false;
60 // -- set grouping compositor
61 setCompositorAsSequence();
62 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63 org.exolab.castor.mapping.FieldHandler handler = null;
64 org.exolab.castor.xml.FieldValidator fieldValidator = null;
65 // -- initialize attribute descriptors
67 // -- initialize element descriptors
70 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
71 java.lang.Double.TYPE, "_vList", "v",
72 org.exolab.castor.xml.NodeType.Element);
73 handler = new org.exolab.castor.xml.XMLFieldHandler()
75 public java.lang.Object getValue(java.lang.Object object)
76 throws IllegalStateException
78 DoubleVector target = (DoubleVector) object;
82 public void setValue(java.lang.Object object, java.lang.Object value)
83 throws IllegalStateException, IllegalArgumentException
87 DoubleVector target = (DoubleVector) object;
88 // ignore null values for non optional primitives
94 target.addV(((java.lang.Double) value).doubleValue());
95 } catch (java.lang.Exception ex)
97 throw new IllegalStateException(ex.toString());
101 public void resetValue(Object object)
102 throws IllegalStateException, IllegalArgumentException
106 DoubleVector target = (DoubleVector) object;
108 } catch (java.lang.Exception ex)
110 throw new IllegalStateException(ex.toString());
114 public java.lang.Object newInstance(java.lang.Object parent)
119 desc.setHandler(handler);
120 desc.setNameSpaceURI("www.jalview.org");
121 desc.setMultivalued(true);
122 addFieldDescriptor(desc);
124 // -- validation code for: _vList
125 fieldValidator = new org.exolab.castor.xml.FieldValidator();
126 fieldValidator.setMinOccurs(0);
128 org.exolab.castor.xml.validators.DoubleValidator typeValidator;
129 typeValidator = new org.exolab.castor.xml.validators.DoubleValidator();
130 fieldValidator.setValidator(typeValidator);
131 typeValidator.setMinInclusive(-1.7976931348623157E308);
132 typeValidator.setMaxInclusive(1.7976931348623157E308);
134 desc.setValidator(fieldValidator);
142 * Method getAccessMode.
144 * @return the access mode specified for this class.
146 public org.exolab.castor.mapping.AccessMode getAccessMode()
152 * Method getIdentity.
154 * @return the identity field, null if this class has no identity.
156 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
158 return super.getIdentity();
162 * Method getJavaClass.
164 * @return the Java class represented by this descriptor.
166 public java.lang.Class getJavaClass()
168 return jalview.schemabinding.version2.DoubleVector.class;
172 * Method getNameSpacePrefix.
174 * @return the namespace prefix to use when marshaling as XML.
176 public java.lang.String getNameSpacePrefix()
182 * Method getNameSpaceURI.
184 * @return the namespace URI used when marshaling and unmarshaling as XML.
186 public java.lang.String getNameSpaceURI()
192 * Method getValidator.
194 * @return a specific validator for the class described by this
197 public org.exolab.castor.xml.TypeValidator getValidator()
205 * @return the XML Name for the Class being described.
207 public java.lang.String getXMLName()
213 * Method isElementDefinition.
215 * @return true if XML schema definition of this Class is that of a global
216 * element or element with anonymous type definition.
218 public boolean isElementDefinition()
220 return _elementDefinition;