1 /***
2 * JFoxSOAF, Service-Oriented Application Framework
3 *
4 * Copyright (C) www.huihoo.org
5 *
6 * Distributable under GNU LGPL For more information, please visit:
7 * http://www.huihoo.org/jfox/jfoxsoaf
8 */
9
10 package org.huihoo.jfox.soaf.schema.config;
11
12 /***
13 * Class ServiceConfigurationDescriptor.
14 *
15 * @version $Revision: 1.1 $ $Date: 2004/10/13 10:51:52 $
16 */
17 public class ServiceConfigurationDescriptor extends
18 org.exolab.castor.xml.util.XMLClassDescriptorImpl {
19
20 /***
21 * Field nsPrefix
22 */
23 private java.lang.String nsPrefix;
24
25 /***
26 * Field nsURI
27 */
28 private java.lang.String nsURI;
29
30 /***
31 * Field xmlName
32 */
33 private java.lang.String xmlName;
34
35 /***
36 * Field identity
37 */
38 private org.exolab.castor.xml.XMLFieldDescriptor identity;
39
40 public ServiceConfigurationDescriptor() {
41 super();
42 xmlName = "service-configuration";
43
44
45 setCompositorAsSequence();
46 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
47 org.exolab.castor.xml.XMLFieldHandler handler = null;
48 org.exolab.castor.xml.FieldValidator fieldValidator = null;
49
50
51
52
53
54 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
55 org.huihoo.jfox.soaf.schema.config.ConfigurationEntry.class,
56 "_configurationEntryList", "configuration-entry",
57 org.exolab.castor.xml.NodeType.Element);
58 handler = (new org.exolab.castor.xml.XMLFieldHandler() {
59 public java.lang.Object getValue(java.lang.Object object)
60 throws IllegalStateException {
61 ServiceConfiguration target = (ServiceConfiguration) object;
62 return target.getConfigurationEntry();
63 }
64
65 public void setValue(java.lang.Object object, java.lang.Object value)
66 throws IllegalStateException, IllegalArgumentException {
67 try {
68 ServiceConfiguration target = (ServiceConfiguration) object;
69 target
70 .addConfigurationEntry((org.huihoo.jfox.soaf.schema.config.ConfigurationEntry) value);
71 } catch (java.lang.Exception ex) {
72 throw new IllegalStateException(ex.toString());
73 }
74 }
75
76 public java.lang.Object newInstance(java.lang.Object parent) {
77 return new org.huihoo.jfox.soaf.schema.config.ConfigurationEntry();
78 }
79 });
80 desc.setHandler(handler);
81 desc.setMultivalued(true);
82 addFieldDescriptor(desc);
83
84
85 fieldValidator = new org.exolab.castor.xml.FieldValidator();
86 fieldValidator.setMinOccurs(0);
87 {
88 }
89 desc.setValidator(fieldValidator);
90 }
91
92 /***
93 * Method getAccessMode
94 */
95 public org.exolab.castor.mapping.AccessMode getAccessMode() {
96 return null;
97 }
98
99 /***
100 * Method getExtends
101 */
102 public org.exolab.castor.mapping.ClassDescriptor getExtends() {
103 return null;
104 }
105
106 /***
107 * Method getIdentity
108 */
109 public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
110 return identity;
111 }
112
113 /***
114 * Method getJavaClass
115 */
116 public java.lang.Class getJavaClass() {
117 return org.huihoo.jfox.soaf.schema.config.ServiceConfiguration.class;
118 }
119
120 /***
121 * Method getNameSpacePrefix
122 */
123 public java.lang.String getNameSpacePrefix() {
124 return nsPrefix;
125 }
126
127 /***
128 * Method getNameSpaceURI
129 */
130 public java.lang.String getNameSpaceURI() {
131 return nsURI;
132 }
133
134 /***
135 * Method getValidator
136 */
137 public org.exolab.castor.xml.TypeValidator getValidator() {
138 return this;
139 }
140
141 /***
142 * Method getXMLName
143 */
144 public java.lang.String getXMLName() {
145 return xmlName;
146 }
147
148 }