removed after schema modification,
[vamsas.git] / src / org / vamsas / objects / core / AnnotationElementDescriptor.java
index 419388a..943bb99 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This class was automatically generated with 
- * <a href="http://www.castor.org">Castor 0.9.9M1</a>, using an XML
+ * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
  * Schema.
  * $Id$
  */
@@ -104,10 +104,44 @@ public class AnnotationElementDescriptor extends org.exolab.castor.xml.util.XMLC
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
         fieldValidator.setMinOccurs(1);
         { //-- local scope
-            IntegerValidator typeValidator= new IntegerValidator();
+            IntegerValidator typeValidator = new IntegerValidator();
             fieldValidator.setValidator(typeValidator);
         }
         desc.setValidator(fieldValidator);
+        //-- _id
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
+        this.identity = desc;
+        handler = new org.exolab.castor.xml.XMLFieldHandler() {
+            public java.lang.Object getValue( java.lang.Object object ) 
+                throws IllegalStateException
+            {
+                AnnotationElement target = (AnnotationElement) object;
+                return target.getId();
+            }
+            public void setValue( java.lang.Object object, java.lang.Object value) 
+                throws IllegalStateException, IllegalArgumentException
+            {
+                try {
+                    AnnotationElement target = (AnnotationElement) object;
+                    target.setId( (java.lang.String) value);
+                }
+                catch (java.lang.Exception ex) {
+                    throw new IllegalStateException(ex.toString());
+                }
+            }
+            public java.lang.Object newInstance( java.lang.Object parent ) {
+                return new java.lang.String();
+            }
+        };
+        desc.setHandler(handler);
+        desc.setMultivalued(false);
+        addFieldDescriptor(desc);
+        
+        //-- validation code for: _id
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();
+        { //-- local scope
+        }
+        desc.setValidator(fieldValidator);
         //-- initialize element descriptors
         
         //-- _displayCharacter
@@ -137,13 +171,11 @@ public class AnnotationElementDescriptor extends org.exolab.castor.xml.util.XMLC
         };
         desc.setHandler(handler);
         desc.setNameSpaceURI("http://www.vamsas.org");
-        desc.setRequired(true);
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
         //-- validation code for: _displayCharacter
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        fieldValidator.setMinOccurs(1);
         { //-- local scope
             StringValidator typeValidator = new StringValidator();
             typeValidator.setWhiteSpace("preserve");
@@ -177,13 +209,11 @@ public class AnnotationElementDescriptor extends org.exolab.castor.xml.util.XMLC
         };
         desc.setHandler(handler);
         desc.setNameSpaceURI("http://www.vamsas.org");
-        desc.setRequired(true);
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
         //-- validation code for: _description
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        fieldValidator.setMinOccurs(1);
         { //-- local scope
             StringValidator typeValidator = new StringValidator();
             typeValidator.setWhiteSpace("preserve");
@@ -217,13 +247,11 @@ public class AnnotationElementDescriptor extends org.exolab.castor.xml.util.XMLC
         };
         desc.setHandler(handler);
         desc.setNameSpaceURI("http://www.vamsas.org");
-        desc.setRequired(true);
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
         //-- validation code for: _secondaryStructure
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        fieldValidator.setMinOccurs(1);
         { //-- local scope
             StringValidator typeValidator = new StringValidator();
             typeValidator.setLength(1);
@@ -247,9 +275,11 @@ public class AnnotationElementDescriptor extends org.exolab.castor.xml.util.XMLC
             {
                 try {
                     AnnotationElement target = (AnnotationElement) object;
-                    // ignore null values for non optional primitives
-                    if (value == null) return;
-                    
+                    // if null, use delete method for optional primitives 
+                    if (value == null) {
+                        target.deleteValue();
+                        return;
+                    }
                     target.setValue( ((java.lang.Float)value).floatValue());
                 }
                 catch (java.lang.Exception ex) {
@@ -262,13 +292,11 @@ public class AnnotationElementDescriptor extends org.exolab.castor.xml.util.XMLC
         };
         desc.setHandler(handler);
         desc.setNameSpaceURI("http://www.vamsas.org");
-        desc.setRequired(true);
         desc.setMultivalued(false);
         addFieldDescriptor(desc);
         
         //-- validation code for: _value
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
-        fieldValidator.setMinOccurs(1);
         { //-- local scope
             FloatValidator typeValidator = new FloatValidator();
             fieldValidator.setValidator(typeValidator);