KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > dd > webservice > WebserviceDescriptionType


1 /**
2  * This generated bean class WebserviceDescriptionType matches the schema element webservice-descriptionType
3  *
4  * ===============================================================
5  *
6  *
7  * The webservice-description element defines a WSDL document file
8  * and the set of Port components associated with the WSDL ports
9  * defined in the WSDL document. There may be multiple
10  * webservice-descriptions defined within a module.
11  *
12  * All WSDL file ports must have a corresponding port-component element
13  * defined.
14  *
15  * Used in: webservices
16  *
17  *
18  * ===============================================================
19  * Generated on Fri Apr 22 15:42:53 PDT 2005
20  */

21
22 package com.sun.enterprise.tools.common.dd.webservice;
23
24 import org.w3c.dom.*;
25 import org.netbeans.modules.schema2beans.*;
26 import java.beans.*;
27 import java.util.*;
28
29 // BEGIN_NOI18N
30

31 public class WebserviceDescriptionType extends org.netbeans.modules.schema2beans.BaseBean
32 {
33
34     static Vector comparators = new Vector();
35
36     static public final String JavaDoc DESCRIPTION = "Description"; // NOI18N
37
static public final String JavaDoc DISPLAY_NAME = "DisplayName"; // NOI18N
38
static public final String JavaDoc ICON = "Icon"; // NOI18N
39
static public final String JavaDoc WEBSERVICE_DESCRIPTION_NAME = "WebserviceDescriptionName"; // NOI18N
40
static public final String JavaDoc WSDL_FILE = "WsdlFile"; // NOI18N
41
static public final String JavaDoc JAXRPC_MAPPING_FILE = "JaxrpcMappingFile"; // NOI18N
42
static public final String JavaDoc PORT_COMPONENT = "PortComponent"; // NOI18N
43

44     public WebserviceDescriptionType() {
45         this(Common.USE_DEFAULT_VALUES);
46     }
47
48     public WebserviceDescriptionType(int options)
49     {
50         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
51         // Properties (see root bean comments for the bean graph)
52
this.createProperty("description", // NOI18N
53
DESCRIPTION,
54             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
55             java.lang.String JavaDoc.class);
56         this.createAttribute(DESCRIPTION, "id", "Id",
57                         AttrProp.CDATA | AttrProp.IMPLIED,
58                         null, null);
59         this.createAttribute(DESCRIPTION, "xml:lang", "XmlLang",
60                         AttrProp.CDATA | AttrProp.IMPLIED,
61                         null, null);
62         this.createProperty("display-name", // NOI18N
63
DISPLAY_NAME,
64             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
65             java.lang.String JavaDoc.class);
66         this.createAttribute(DISPLAY_NAME, "id", "Id",
67                         AttrProp.CDATA | AttrProp.IMPLIED,
68                         null, null);
69         this.createAttribute(DISPLAY_NAME, "xml:lang", "XmlLang",
70                         AttrProp.CDATA | AttrProp.IMPLIED,
71                         null, null);
72         this.createProperty("icon", // NOI18N
73
ICON,
74             Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY,
75             IconType.class);
76         this.createAttribute(ICON, "xml:lang", "XmlLang",
77                         AttrProp.CDATA | AttrProp.IMPLIED,
78                         null, null);
79         this.createAttribute(ICON, "id", "Id",
80                         AttrProp.CDATA | AttrProp.IMPLIED,
81                         null, null);
82         this.createProperty("webservice-description-name", // NOI18N
83
WEBSERVICE_DESCRIPTION_NAME,
84             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
85             java.lang.String JavaDoc.class);
86         this.createAttribute(WEBSERVICE_DESCRIPTION_NAME, "id", "Id",
87                         AttrProp.CDATA | AttrProp.IMPLIED,
88                         null, null);
89         this.createProperty("wsdl-file", // NOI18N
90
WSDL_FILE,
91             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
92             java.lang.String JavaDoc.class);
93         this.createProperty("jaxrpc-mapping-file", // NOI18N
94
JAXRPC_MAPPING_FILE,
95             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
96             java.lang.String JavaDoc.class);
97         this.createProperty("port-component", // NOI18N
98
PORT_COMPONENT,
99             Common.TYPE_1_N | Common.TYPE_BEAN | Common.TYPE_KEY,
100             PortComponentType.class);
101         this.createAttribute(PORT_COMPONENT, "id", "Id",
102                         AttrProp.CDATA | AttrProp.IMPLIED,
103                         null, null);
104         this.initialize(options);
105     }
106
107     // Setting the default values of the properties
108
void initialize(int options)
109     {
110
111     }
112
113     // This attribute is optional
114
public void setDescription(java.lang.String JavaDoc value) {
115         this.setValue(DESCRIPTION, value);
116     }
117
118     //
119
public java.lang.String JavaDoc getDescription() {
120         return (java.lang.String JavaDoc)this.getValue(DESCRIPTION);
121     }
122
123     // This attribute is optional
124
public void setDisplayName(java.lang.String JavaDoc value) {
125         this.setValue(DISPLAY_NAME, value);
126     }
127
128     //
129
public java.lang.String JavaDoc getDisplayName() {
130         return (java.lang.String JavaDoc)this.getValue(DISPLAY_NAME);
131     }
132
133     // This attribute is optional
134
public void setIcon(IconType value) {
135         this.setValue(ICON, value);
136     }
137
138     //
139
public IconType getIcon() {
140         return (IconType)this.getValue(ICON);
141     }
142
143     // This attribute is mandatory
144
public void setWebserviceDescriptionName(java.lang.String JavaDoc value) {
145         this.setValue(WEBSERVICE_DESCRIPTION_NAME, value);
146     }
147
148     //
149
public java.lang.String JavaDoc getWebserviceDescriptionName() {
150         return (java.lang.String JavaDoc)this.getValue(WEBSERVICE_DESCRIPTION_NAME);
151     }
152
153     // This attribute is mandatory
154
public void setWsdlFile(java.lang.String JavaDoc value) {
155         this.setValue(WSDL_FILE, value);
156     }
157
158     //
159
public java.lang.String JavaDoc getWsdlFile() {
160         return (java.lang.String JavaDoc)this.getValue(WSDL_FILE);
161     }
162
163     // This attribute is mandatory
164
public void setJaxrpcMappingFile(java.lang.String JavaDoc value) {
165         this.setValue(JAXRPC_MAPPING_FILE, value);
166     }
167
168     //
169
public java.lang.String JavaDoc getJaxrpcMappingFile() {
170         return (java.lang.String JavaDoc)this.getValue(JAXRPC_MAPPING_FILE);
171     }
172
173     // This attribute is an array containing at least one element
174
public void setPortComponent(int index, PortComponentType value) {
175         this.setValue(PORT_COMPONENT, index, value);
176     }
177
178     //
179
public PortComponentType getPortComponent(int index) {
180         return (PortComponentType)this.getValue(PORT_COMPONENT, index);
181     }
182
183     // This attribute is an array containing at least one element
184
public void setPortComponent(PortComponentType[] value) {
185         this.setValue(PORT_COMPONENT, value);
186     }
187
188     //
189
public PortComponentType[] getPortComponent() {
190         return (PortComponentType[])this.getValues(PORT_COMPONENT);
191     }
192
193     // Return the number of properties
194
public int sizePortComponent() {
195         return this.size(PORT_COMPONENT);
196     }
197
198     // Add a new element returning its index in the list
199
public int addPortComponent(com.sun.enterprise.tools.common.dd.webservice.PortComponentType value) {
200         return this.addValue(PORT_COMPONENT, value);
201     }
202
203     //
204
// Remove an element using its reference
205
// Returns the index the element had in the list
206
//
207
public int removePortComponent(com.sun.enterprise.tools.common.dd.webservice.PortComponentType value) {
208         return this.removeValue(PORT_COMPONENT, value);
209     }
210
211     //
212
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
213         comparators.add(c);
214     }
215
216     //
217
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
218         comparators.remove(c);
219     }
220     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
221     }
222
223     // Dump the content of this bean returning it as a String
224
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
225         String JavaDoc s;
226         Object JavaDoc o;
227         org.netbeans.modules.schema2beans.BaseBean n;
228         str.append(indent);
229         str.append("Description"); // NOI18N
230
str.append(indent+"\t"); // NOI18N
231
str.append("<"); // NOI18N
232
s = this.getDescription();
233         str.append((s==null?"null":s.trim())); // NOI18N
234
str.append(">\n"); // NOI18N
235
this.dumpAttributes(DESCRIPTION, 0, str, indent);
236
237         str.append(indent);
238         str.append("DisplayName"); // NOI18N
239
str.append(indent+"\t"); // NOI18N
240
str.append("<"); // NOI18N
241
s = this.getDisplayName();
242         str.append((s==null?"null":s.trim())); // NOI18N
243
str.append(">\n"); // NOI18N
244
this.dumpAttributes(DISPLAY_NAME, 0, str, indent);
245
246         str.append(indent);
247         str.append("Icon"); // NOI18N
248
n = (org.netbeans.modules.schema2beans.BaseBean) this.getIcon();
249         if (n != null)
250             n.dump(str, indent + "\t"); // NOI18N
251
else
252             str.append(indent+"\tnull"); // NOI18N
253
this.dumpAttributes(ICON, 0, str, indent);
254
255         str.append(indent);
256         str.append("WebserviceDescriptionName"); // NOI18N
257
str.append(indent+"\t"); // NOI18N
258
str.append("<"); // NOI18N
259
s = this.getWebserviceDescriptionName();
260         str.append((s==null?"null":s.trim())); // NOI18N
261
str.append(">\n"); // NOI18N
262
this.dumpAttributes(WEBSERVICE_DESCRIPTION_NAME, 0, str, indent);
263
264         str.append(indent);
265         str.append("WsdlFile"); // NOI18N
266
str.append(indent+"\t"); // NOI18N
267
str.append("<"); // NOI18N
268
s = this.getWsdlFile();
269         str.append((s==null?"null":s.trim())); // NOI18N
270
str.append(">\n"); // NOI18N
271
this.dumpAttributes(WSDL_FILE, 0, str, indent);
272
273         str.append(indent);
274         str.append("JaxrpcMappingFile"); // NOI18N
275
str.append(indent+"\t"); // NOI18N
276
str.append("<"); // NOI18N
277
s = this.getJaxrpcMappingFile();
278         str.append((s==null?"null":s.trim())); // NOI18N
279
str.append(">\n"); // NOI18N
280
this.dumpAttributes(JAXRPC_MAPPING_FILE, 0, str, indent);
281
282         str.append(indent);
283         str.append("PortComponent["+this.sizePortComponent()+"]"); // NOI18N
284
for(int i=0; i<this.sizePortComponent(); i++)
285         {
286             str.append(indent+"\t");
287             str.append("#"+i+":");
288             n = (org.netbeans.modules.schema2beans.BaseBean) this.getPortComponent(i);
289             if (n != null)
290                 n.dump(str, indent + "\t"); // NOI18N
291
else
292                 str.append(indent+"\tnull"); // NOI18N
293
this.dumpAttributes(PORT_COMPONENT, i, str, indent);
294         }
295
296     }
297     public String JavaDoc dumpBeanNode(){
298         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
299         str.append("WebserviceDescriptionType\n"); // NOI18N
300
this.dump(str, "\n "); // NOI18N
301
return str.toString();
302     }}
303
304 // END_NOI18N
305

306
307 /*
308  * The contents of this file are subject to the terms
309  * of the Common Development and Distribution License
310  * (the License). You may not use this file except in
311  * compliance with the License.
312  *
313  * You can obtain a copy of the license at
314  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
315  * glassfish/bootstrap/legal/CDDLv1.0.txt.
316  * See the License for the specific language governing
317  * permissions and limitations under the License.
318  *
319  * When distributing Covered Code, include this CDDL
320  * Header Notice in each file and include the License file
321  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
322  * If applicable, add the following below the CDDL Header,
323  * with the fields enclosed by brackets [] replaced by
324  * you own identifying information:
325  * "Portions Copyrighted [year] [name of copyright owner]"
326  *
327  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
328  */

329
Popular Tags