KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_ws > deployment > xml > WebserviceDescription


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  *
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or 1any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20  * USA
21  *
22  * Initial developer: JOnAS team
23  * --------------------------------------------------------------------------
24  * $Id: WebserviceDescription.java,v 1.2 2004/05/06 08:53:55 sauthieg Exp $
25  * --------------------------------------------------------------------------
26  */

27
28 package org.objectweb.jonas_ws.deployment.xml;
29
30 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
31 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
32
33 /**
34  * This class defines the implementation of the element webservice-description
35  *
36  * @author JOnAS team
37  */

38
39 public class WebserviceDescription extends AbsElement {
40
41     /**
42      * description
43      */

44     private String JavaDoc description = null;
45
46     /**
47      * display-name
48      */

49     private String JavaDoc displayName = null;
50
51     /**
52      * small-icon
53      */

54     private String JavaDoc smallIcon = null;
55
56     /**
57      * large-icon
58      */

59     private String JavaDoc largeIcon = null;
60
61     /**
62      * webservice-description-name
63      */

64     private String JavaDoc webserviceDescriptionName = null;
65
66     /**
67      * wsdl-file
68      */

69     private String JavaDoc wsdlFile = null;
70
71     /**
72      * jaxrpc-mapping-file
73      */

74     private String JavaDoc jaxrpcMappingFile = null;
75
76     /**
77      * port-component
78      */

79     private JLinkedList portComponentList = null;
80
81
82     /**
83      * Constructor
84      */

85     public WebserviceDescription() {
86         super();
87         portComponentList = new JLinkedList("port-component");
88     }
89
90     /**
91      * Gets the description
92      * @return the description
93      */

94     public String JavaDoc getDescription() {
95         return description;
96     }
97
98     /**
99      * Set the description
100      * @param description description
101      */

102     public void setDescription(String JavaDoc description) {
103         this.description = description;
104     }
105
106     /**
107      * Gets the display-name
108      * @return the display-name
109      */

110     public String JavaDoc getDisplayName() {
111         return displayName;
112     }
113
114     /**
115      * Set the display-name
116      * @param displayName displayName
117      */

118     public void setDisplayName(String JavaDoc displayName) {
119         this.displayName = displayName;
120     }
121
122     /**
123      * Gets the small-icon
124      * @return the small-icon
125      */

126     public String JavaDoc getSmallIcon() {
127         return smallIcon;
128     }
129
130     /**
131      * Set the small-icon
132      * @param smallIcon smallIcon
133      */

134     public void setSmallIcon(String JavaDoc smallIcon) {
135         this.smallIcon = smallIcon;
136     }
137
138     /**
139      * Gets the large-icon
140      * @return the large-icon
141      */

142     public String JavaDoc getLargeIcon() {
143         return largeIcon;
144     }
145
146     /**
147      * Set the large-icon
148      * @param largeIcon largeIcon
149      */

150     public void setLargeIcon(String JavaDoc largeIcon) {
151         this.largeIcon = largeIcon;
152     }
153
154     /**
155      * Gets the webservice-description-name
156      * @return the webservice-description-name
157      */

158     public String JavaDoc getWebserviceDescriptionName() {
159         return webserviceDescriptionName;
160     }
161
162     /**
163      * Set the webservice-description-name
164      * @param webserviceDescriptionName webserviceDescriptionName
165      */

166     public void setWebserviceDescriptionName(String JavaDoc webserviceDescriptionName) {
167         this.webserviceDescriptionName = webserviceDescriptionName;
168     }
169
170     /**
171      * Gets the wsdl-file
172      * @return the wsdl-file
173      */

174     public String JavaDoc getWsdlFile() {
175         return wsdlFile;
176     }
177
178     /**
179      * Set the wsdl-file
180      * @param wsdlFile wsdlFile
181      */

182     public void setWsdlFile(String JavaDoc wsdlFile) {
183         this.wsdlFile = wsdlFile;
184     }
185
186     /**
187      * Gets the jaxrpc-mapping-file
188      * @return the jaxrpc-mapping-file
189      */

190     public String JavaDoc getJaxrpcMappingFile() {
191         return jaxrpcMappingFile;
192     }
193
194     /**
195      * Set the jaxrpc-mapping-file
196      * @param jaxrpcMappingFile jaxrpcMappingFile
197      */

198     public void setJaxrpcMappingFile(String JavaDoc jaxrpcMappingFile) {
199         this.jaxrpcMappingFile = jaxrpcMappingFile;
200     }
201
202     /**
203      * Gets the port-component
204      * @return the port-component
205      */

206     public JLinkedList getPortComponentList() {
207         return portComponentList;
208     }
209
210     /**
211      * Set the port-component
212      * @param portComponentList portComponent
213      */

214     public void setPortComponentList(JLinkedList portComponentList) {
215         this.portComponentList = portComponentList;
216     }
217
218     /**
219      * Add a new port-component element to this object
220      * @param portComponent the portComponentobject
221      */

222     public void addPortComponent(PortComponent portComponent) {
223         portComponentList.add(portComponent);
224     }
225
226     /**
227      * Represents this element by it's XML description.
228      * @param indent use this indent for prexifing XML representation.
229      * @return the XML description of this object.
230      */

231     public String JavaDoc toXML(int indent) {
232         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
233         sb.append(indent(indent));
234         sb.append("<webservice-description>\n");
235
236         indent += 2;
237
238         // description
239
sb.append(xmlElement(description, "description", indent));
240         // display-name
241
sb.append(xmlElement(displayName, "display-name", indent));
242         // small-icon
243
sb.append(xmlElement(smallIcon, "small-icon", indent));
244         // large-icon
245
sb.append(xmlElement(largeIcon, "large-icon", indent));
246         // webservice-description-name
247
sb.append(xmlElement(webserviceDescriptionName, "webservice-description-name", indent));
248         // wsdl-file
249
sb.append(xmlElement(wsdlFile, "wsdl-file", indent));
250         // jaxrpc-mapping-file
251
sb.append(xmlElement(jaxrpcMappingFile, "jaxrpc-mapping-file", indent));
252         // port-component
253
sb.append(portComponentList.toXML(indent));
254         indent -= 2;
255         sb.append(indent(indent));
256         sb.append("</webservice-description>\n");
257
258         return sb.toString();
259     }
260 }
261
Popular Tags