View Javadoc
1 /* 2 * This class was automatically generated with 3 * <a href="http://castor.exolab.org">Castor 0.9.4</a>, using an 4 * XML Schema. 5 * $Id$ 6 */ 7 8 package org.enableit.db.beans; 9 10 //---------------------------------/ 11 //- Imported classes and packages -/ 12 //---------------------------------/ 13 14 import org.exolab.castor.mapping.AccessMode; 15 import org.exolab.castor.mapping.ClassDescriptor; 16 import org.exolab.castor.mapping.FieldDescriptor; 17 import org.exolab.castor.xml.*; 18 import org.exolab.castor.xml.FieldValidator; 19 import org.exolab.castor.xml.TypeValidator; 20 import org.exolab.castor.xml.XMLFieldDescriptor; 21 import org.exolab.castor.xml.handlers.*; 22 import org.exolab.castor.xml.util.XMLFieldDescriptorImpl; 23 import org.exolab.castor.xml.validators.*; 24 25 /*** 26 * 27 * 28 * @version $Revision$ $Date$ 29 **/ 30 public class DataColumnDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { 31 32 33 //--------------------------/ 34 //- Class/Member Variables -/ 35 //--------------------------/ 36 37 private java.lang.String nsPrefix; 38 39 private java.lang.String nsURI; 40 41 private java.lang.String xmlName; 42 43 private org.exolab.castor.xml.XMLFieldDescriptor identity; 44 45 46 //----------------/ 47 //- Constructors -/ 48 //----------------/ 49 50 public DataColumnDescriptor() { 51 super(); 52 nsURI = "http://darrt.sourceforge.net/schemas/darrt"; 53 xmlName = "data-column"; 54 55 //-- set grouping compositor 56 setCompositorAsSequence(); 57 XMLFieldDescriptorImpl desc = null; 58 XMLFieldHandler handler = null; 59 FieldValidator fieldValidator = null; 60 //-- initialize attribute descriptors 61 62 //-- initialize element descriptors 63 64 //-- _description 65 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", NodeType.Element); 66 desc.setImmutable(true); 67 handler = (new XMLFieldHandler() { 68 public java.lang.Object getValue( java.lang.Object object ) 69 throws IllegalStateException 70 { 71 DataColumn target = (DataColumn) object; 72 return target.getDescription(); 73 } 74 public void setValue( java.lang.Object object, java.lang.Object value) 75 throws IllegalStateException, IllegalArgumentException 76 { 77 try { 78 DataColumn target = (DataColumn) object; 79 target.setDescription( (java.lang.String) value); 80 } 81 catch (Exception ex) { 82 throw new IllegalStateException(ex.toString()); 83 } 84 } 85 public java.lang.Object newInstance( java.lang.Object parent ) { 86 return null; 87 } 88 } ); 89 desc.setHandler(handler); 90 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 91 desc.setRequired(true); 92 desc.setMultivalued(false); 93 addFieldDescriptor(desc); 94 95 //-- validation code for: _description 96 fieldValidator = new FieldValidator(); 97 fieldValidator.setMinOccurs(1); 98 { //-- local scope 99 StringValidator typeValidator = new StringValidator(); 100 typeValidator.setWhiteSpace("preserve"); 101 fieldValidator.setValidator(typeValidator); 102 } 103 desc.setValidator(fieldValidator); 104 //-- _colName 105 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_colName", "col-name", NodeType.Element); 106 desc.setImmutable(true); 107 handler = (new XMLFieldHandler() { 108 public java.lang.Object getValue( java.lang.Object object ) 109 throws IllegalStateException 110 { 111 DataColumn target = (DataColumn) object; 112 return target.getColName(); 113 } 114 public void setValue( java.lang.Object object, java.lang.Object value) 115 throws IllegalStateException, IllegalArgumentException 116 { 117 try { 118 DataColumn target = (DataColumn) object; 119 target.setColName( (java.lang.String) value); 120 } 121 catch (Exception ex) { 122 throw new IllegalStateException(ex.toString()); 123 } 124 } 125 public java.lang.Object newInstance( java.lang.Object parent ) { 126 return null; 127 } 128 } ); 129 desc.setHandler(handler); 130 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt"); 131 desc.setRequired(true); 132 desc.setMultivalued(false); 133 addFieldDescriptor(desc); 134 135 //-- validation code for: _colName 136 fieldValidator = new FieldValidator(); 137 fieldValidator.setMinOccurs(1); 138 { //-- local scope 139 StringValidator typeValidator = new StringValidator(); 140 typeValidator.setWhiteSpace("preserve"); 141 fieldValidator.setValidator(typeValidator); 142 } 143 desc.setValidator(fieldValidator); 144 } //-- org.enableit.db.beans.DataColumnDescriptor() 145 146 147 //-----------/ 148 //- Methods -/ 149 //-----------/ 150 151 /*** 152 **/ 153 public org.exolab.castor.mapping.AccessMode getAccessMode() 154 { 155 return null; 156 } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 157 158 /*** 159 **/ 160 public org.exolab.castor.mapping.ClassDescriptor getExtends() 161 { 162 return null; 163 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 164 165 /*** 166 **/ 167 public org.exolab.castor.mapping.FieldDescriptor getIdentity() 168 { 169 return identity; 170 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 171 172 /*** 173 **/ 174 public java.lang.Class getJavaClass() 175 { 176 return org.enableit.db.beans.DataColumn.class; 177 } //-- java.lang.Class getJavaClass() 178 179 /*** 180 **/ 181 public java.lang.String getNameSpacePrefix() 182 { 183 return nsPrefix; 184 } //-- java.lang.String getNameSpacePrefix() 185 186 /*** 187 **/ 188 public java.lang.String getNameSpaceURI() 189 { 190 return nsURI; 191 } //-- java.lang.String getNameSpaceURI() 192 193 /*** 194 **/ 195 public org.exolab.castor.xml.TypeValidator getValidator() 196 { 197 return this; 198 } //-- org.exolab.castor.xml.TypeValidator getValidator() 199 200 /*** 201 **/ 202 public java.lang.String getXMLName() 203 { 204 return xmlName; 205 } //-- java.lang.String getXMLName() 206 207 }

This page was automatically generated by Maven