sequence mappings and DbRef mapping objects unified and source binding for castor...
[vamsas.git] / src / uk / ac / vamsas / objects / core / descriptors / TreeDescriptor.java
index 364fdfe..19f0b42 100644 (file)
@@ -45,11 +45,6 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -70,7 +65,7 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto
         \r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -224,6 +219,48 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto
         { //-- local scope\r
         }\r
         desc.setValidator(fieldValidator);\r
+        //-- _treenodeList\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Treenode.class, "_treenodeList", "treenode", org.exolab.castor.xml.NodeType.Element);\r
+        handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                Tree target = (Tree) object;\r
+                return target.getTreenode();\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    Tree target = (Tree) object;\r
+                    target.addTreenode( (uk.ac.vamsas.objects.core.Treenode) value);\r
+                } catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
+                try {\r
+                    Tree target = (Tree) object;\r
+                    target.removeAllTreenode();\r
+                } catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance(java.lang.Object parent) {\r
+                return new uk.ac.vamsas.objects.core.Treenode();\r
+            }\r
+        };\r
+        desc.setHandler(handler);\r
+        desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+        desc.setMultivalued(true);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _treenodeList\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        fieldValidator.setMinOccurs(0);\r
+        { //-- local scope\r
+        }\r
+        desc.setValidator(fieldValidator);\r
         //-- _propertyList\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
@@ -326,7 +363,7 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r