1 7 8 package com.calipso.reportgenerator.reportdefinitions; 9 10 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.*; 18 19 24 public class LocalizationDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { 25 26 27 31 34 private java.lang.String nsPrefix; 35 36 39 private java.lang.String nsURI; 40 41 44 private java.lang.String xmlName; 45 46 49 private org.exolab.castor.xml.XMLFieldDescriptor identity; 50 51 52 56 public LocalizationDescriptor() { 57 super(); 58 xmlName = "Localization"; 59 60 setCompositorAsSequence(); 62 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; 63 org.exolab.castor.xml.XMLFieldHandler handler = null; 64 org.exolab.castor.xml.FieldValidator fieldValidator = null; 65 67 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_locale", "Locale", org.exolab.castor.xml.NodeType.Attribute); 69 desc.setImmutable(true); 70 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 71 public java.lang.Object getValue( java.lang.Object object ) 72 throws IllegalStateException 73 { 74 Localization target = (Localization) object; 75 return target.getLocale(); 76 } 77 public void setValue( java.lang.Object object, java.lang.Object value) 78 throws IllegalStateException , IllegalArgumentException 79 { 80 try { 81 Localization target = (Localization) object; 82 target.setLocale( (java.lang.String ) value); 83 } 84 catch (java.lang.Exception ex) { 85 throw new IllegalStateException (ex.toString()); 86 } 87 } 88 public java.lang.Object newInstance( java.lang.Object parent ) { 89 return null; 90 } 91 } ); 92 desc.setHandler(handler); 93 desc.setRequired(true); 94 addFieldDescriptor(desc); 95 96 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 98 fieldValidator.setMinOccurs(1); 99 { StringValidator typeValidator = new StringValidator(); 101 typeValidator.setWhiteSpace("preserve"); 102 fieldValidator.setValidator(typeValidator); 103 } 104 desc.setValidator(fieldValidator); 105 107 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.Literals.class, "_literalsList", "Literals", org.exolab.castor.xml.NodeType.Element); 109 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 110 public java.lang.Object getValue( java.lang.Object object ) 111 throws IllegalStateException 112 { 113 Localization target = (Localization) object; 114 return target.getLiterals(); 115 } 116 public void setValue( java.lang.Object object, java.lang.Object value) 117 throws IllegalStateException , IllegalArgumentException 118 { 119 try { 120 Localization target = (Localization) object; 121 target.addLiterals( (com.calipso.reportgenerator.reportdefinitions.Literals) value); 122 } 123 catch (java.lang.Exception ex) { 124 throw new IllegalStateException (ex.toString()); 125 } 126 } 127 public java.lang.Object newInstance( java.lang.Object parent ) { 128 return new com.calipso.reportgenerator.reportdefinitions.Literals(); 129 } 130 } ); 131 desc.setHandler(handler); 132 desc.setMultivalued(true); 133 addFieldDescriptor(desc); 134 135 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 137 fieldValidator.setMinOccurs(0); 138 { } 140 desc.setValidator(fieldValidator); 141 } 143 144 148 151 public org.exolab.castor.mapping.AccessMode getAccessMode() 152 { 153 return null; 154 } 156 159 public org.exolab.castor.mapping.ClassDescriptor getExtends() 160 { 161 return null; 162 } 164 167 public org.exolab.castor.mapping.FieldDescriptor getIdentity() 168 { 169 return identity; 170 } 172 175 public java.lang.Class getJavaClass() 176 { 177 return com.calipso.reportgenerator.reportdefinitions.Localization.class; 178 } 180 183 public java.lang.String getNameSpacePrefix() 184 { 185 return nsPrefix; 186 } 188 191 public java.lang.String getNameSpaceURI() 192 { 193 return nsURI; 194 } 196 199 public org.exolab.castor.xml.TypeValidator getValidator() 200 { 201 return this; 202 } 204 207 public java.lang.String getXMLName() 208 { 209 return xmlName; 210 } 212 } 213 | Popular Tags |