2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
8 package org.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.xml.TypeValidator;
16 import org.exolab.castor.xml.XMLFieldDescriptor;
17 import org.exolab.castor.xml.validators.*;
20 * Class PosDescriptor.
22 * @version $Revision$ $Date$
24 public class PosDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
27 //--------------------------/
28 //- Class/Member Variables -/
29 //--------------------------/
34 private java.lang.String nsPrefix;
39 private java.lang.String nsURI;
44 private java.lang.String xmlName;
49 private org.exolab.castor.xml.XMLFieldDescriptor identity;
56 public PosDescriptor()
59 nsURI = "http://www.vamsas.org";
61 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
62 org.exolab.castor.mapping.FieldHandler handler = null;
63 org.exolab.castor.xml.FieldValidator fieldValidator = null;
64 //-- initialize attribute descriptors
67 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_i", "i", org.exolab.castor.xml.NodeType.Attribute);
68 handler = new org.exolab.castor.xml.XMLFieldHandler() {
69 public java.lang.Object getValue( java.lang.Object object )
70 throws IllegalStateException
72 Pos target = (Pos) object;
75 return new java.lang.Integer(target.getI());
77 public void setValue( java.lang.Object object, java.lang.Object value)
78 throws IllegalStateException, IllegalArgumentException
81 Pos target = (Pos) object;
82 // ignore null values for non optional primitives
83 if (value == null) return;
85 target.setI( ((java.lang.Integer)value).intValue());
87 catch (java.lang.Exception ex) {
88 throw new IllegalStateException(ex.toString());
91 public java.lang.Object newInstance( java.lang.Object parent ) {
95 desc.setHandler(handler);
96 desc.setRequired(true);
97 desc.setMultivalued(false);
98 addFieldDescriptor(desc);
100 //-- validation code for: _i
101 fieldValidator = new org.exolab.castor.xml.FieldValidator();
102 fieldValidator.setMinOccurs(1);
104 IntegerValidator typeValidator= new IntegerValidator();
105 fieldValidator.setValidator(typeValidator);
107 desc.setValidator(fieldValidator);
108 //-- initialize element descriptors
110 } //-- org.vamsas.objects.core.PosDescriptor()
118 * Method getAccessMode
124 public org.exolab.castor.mapping.AccessMode getAccessMode()
127 } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
134 * @return ClassDescriptor
136 public org.exolab.castor.mapping.ClassDescriptor getExtends()
139 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
146 * @return FieldDescriptor
148 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
151 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
154 * Method getJavaClass
160 public java.lang.Class getJavaClass()
162 return org.vamsas.objects.core.Pos.class;
163 } //-- java.lang.Class getJavaClass()
166 * Method getNameSpacePrefix
172 public java.lang.String getNameSpacePrefix()
175 } //-- java.lang.String getNameSpacePrefix()
178 * Method getNameSpaceURI
184 public java.lang.String getNameSpaceURI()
187 } //-- java.lang.String getNameSpaceURI()
190 * Method getValidator
194 * @return TypeValidator
196 public org.exolab.castor.xml.TypeValidator getValidator()
199 } //-- org.exolab.castor.xml.TypeValidator getValidator()
208 public java.lang.String getXMLName()
211 } //-- java.lang.String getXMLName()