001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)Description.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi.wsdl2;
030:
031: import javax.xml.namespace.QName;
032:
033: /**
034: * API for WSDL 2.0 Description container.
035: *
036: * @author ApiGen AX.00
037: */
038: public interface Description extends ExtensibleDocumentedComponent {
039: /**
040: * Get the number of Binding items in bindings.
041: *
042: * @return The number of Binding items in bindings
043: */
044: int getBindingsLength();
045:
046: /**
047: * Get bindings for this component by indexed position.
048: *
049: * @param index Indexed position value 0..length-1
050: * @return Bindings for this component at given <code>index</code>
051: * position.
052: */
053: Binding getBinding(int index);
054:
055: /**
056: * Set bindings for this component by indexed position.
057: *
058: * @param index Indexed position value (0..length-1) of the item to set
059: * @param theBinding Item to add at position <code>index</code>.
060: */
061: void setBinding(int index, Binding theBinding);
062:
063: /**
064: * Append an item to bindings for this component.
065: *
066: * @param theBinding Item to append to bindings
067: */
068: void appendBinding(Binding theBinding);
069:
070: /**
071: * Remove bindings for this component by index position.
072: *
073: * @param index The index position of the binding to remove
074: * @return The Binding removed, if any.
075: */
076: Binding removeBinding(int index);
077:
078: /**
079: * Get base URI for the document for this wsdl:definitions component.
080: *
081: * @return Base URI for the document for this wsdl:definitions component
082: */
083: String getDocumentBaseUri();
084:
085: /**
086: * Set base URI for the document for this wsdl:definitions component.
087: *
088: * @param theDocumentBaseUri Base URI for the document for this
089: * wsdl:definitions component
090: */
091: void setDocumentBaseUri(String theDocumentBaseUri);
092:
093: /**
094: * Get the number of Import items in imports.
095: *
096: * @return The number of Import items in imports
097: */
098: int getImportsLength();
099:
100: /**
101: * Get definitions imported into this container by indexed position.
102: *
103: * @param index Indexed position value 0..length-1
104: * @return Description imported into this container at given
105: * <code>index</code> position.
106: */
107: Import getImport(int index);
108:
109: /**
110: * Set definitions imported into this container by indexed position.
111: *
112: * @param index Indexed position value (0..length-1) of the item to set
113: * @param theImport Item to add at position <code>index</code>.
114: */
115: void setImport(int index, Import theImport);
116:
117: /**
118: * Append an item to definitions imported into this container.
119: *
120: * @param theImport Item to append to imports
121: */
122: void appendImport(Import theImport);
123:
124: /**
125: * Remove definitions imported into this container by index position.
126: *
127: * @param index The index position of the import to remove
128: * @return The Import removed, if any.
129: */
130: Import removeImport(int index);
131:
132: /**
133: * Get the number of Include items in includes.
134: *
135: * @return The number of Include items in includes
136: */
137: int getIncludesLength();
138:
139: /**
140: * Get definitions included in this container by indexed position.
141: *
142: * @param index Indexed position value 0..length-1
143: * @return Description included in this container at given
144: * <code>index</code> position.
145: */
146: Include getInclude(int index);
147:
148: /**
149: * Set definitions included in this container by indexed position.
150: *
151: * @param index Indexed position value (0..length-1) of the item to set
152: * @param theInclude Item to add at position <code>index</code>.
153: */
154: void setInclude(int index, Include theInclude);
155:
156: /**
157: * Append an item to definitions included in this container.
158: *
159: * @param theInclude Item to append to includes
160: */
161: void appendInclude(Include theInclude);
162:
163: /**
164: * Remove definitions included in this container by index position.
165: *
166: * @param index The index position of the include to remove
167: * @return The Include removed, if any.
168: */
169: Include removeInclude(int index);
170:
171: /**
172: * Get the number of Interface items in interfaces.
173: *
174: * @return The number of Interface items in interfaces
175: */
176: int getInterfacesLength();
177:
178: /**
179: * Get interfaces for this component by indexed position.
180: *
181: * @param index Indexed position value 0..length-1
182: * @return Interfaces for this component at given <code>index</code>
183: * position.
184: */
185: Interface getInterface(int index);
186:
187: /**
188: * Set interfaces for this component by indexed position.
189: *
190: * @param index Indexed position value (0..length-1) of the item to set
191: * @param theInterface Item to add at position <code>index</code>.
192: */
193: void setInterface(int index, Interface theInterface);
194:
195: /**
196: * Append an item to interfaces for this component.
197: *
198: * @param theInterface Item to append to interfaces
199: */
200: void appendInterface(Interface theInterface);
201:
202: /**
203: * Remove interfaces for this component by index position.
204: *
205: * @param index The index position of the interface to remove
206: * @return The Interface removed, if any.
207: */
208: Interface removeInterface(int index);
209:
210: /**
211: * Get the number of Service items in services.
212: *
213: * @return The number of Service items in services
214: */
215: int getServicesLength();
216:
217: /**
218: * Get services for this component by indexed position.
219: *
220: * @param index Indexed position value 0..length-1
221: * @return Services for this component at given <code>index</code>
222: * position.
223: */
224: Service getService(int index);
225:
226: /**
227: * Set services for this component by indexed position.
228: *
229: * @param index Indexed position value (0..length-1) of the item to set
230: * @param theService Item to add at position <code>index</code>.
231: */
232: void setService(int index, Service theService);
233:
234: /**
235: * Append an item to services for this component.
236: *
237: * @param theService Item to append to services
238: */
239: void appendService(Service theService);
240:
241: /**
242: * Remove services for this component by index position.
243: *
244: * @param index The index position of the service to remove
245: * @return The Service removed, if any.
246: */
247: Service removeService(int index);
248:
249: /**
250: * Get namespace for components in this container.
251: *
252: * @return Namespace for components in this container
253: */
254: String getTargetNamespace();
255:
256: /**
257: * Set namespace for components in this container.
258: *
259: * @param theTargetNamespace Namespace for components in this container
260: */
261: void setTargetNamespace(String theTargetNamespace);
262:
263: /**
264: * Get the number of Types items in types.
265: *
266: * @return The number of Types items in types
267: */
268: int getTypesLength();
269:
270: /**
271: * Get types (in schema or whatever) by indexed position.
272: *
273: * @param index Indexed position value 0..length-1
274: * @return Types (in schema or whatever) at given <code>index</code>
275: * position.
276: */
277: Types getType(int index);
278:
279: /**
280: * Set types (in schema or whatever) by indexed position.
281: *
282: * @param index Indexed position value (0..length-1) of the item to set
283: * @param theType Item to add at position <code>index</code>.
284: */
285: void setType(int index, Types theType);
286:
287: /**
288: * Append an item to types (in schema or whatever).
289: *
290: * @param theType Item to append to types
291: */
292: void appendType(Types theType);
293:
294: /**
295: * Remove types (in schema or whatever) by index position.
296: *
297: * @param index The index position of the type to remove
298: * @return The Types removed, if any.
299: */
300: Types removeType(int index);
301:
302: /**
303: * Find named binding in this definition or the imported/included
304: * bindings.
305: *
306: * @param name Name of binding to find.
307: * @return Named Binding; null if none found.
308: */
309: Binding findBinding(QName name);
310:
311: /**
312: * Find named interface in this definition or the imported/included
313: * interfaces.
314: *
315: * @param name Name of interface to find.
316: * @return Named Interface; null if none found.
317: */
318: Interface findInterface(QName name);
319:
320: /**
321: * Find named service in this definition or the imported/included
322: * services.
323: *
324: * @param name Name of service to find.
325: * @return Named Service; null if none found.
326: */
327: Service findService(QName name);
328:
329: /**
330: * Create a new binding component, appended to this definition's binding
331: * list.
332: *
333: * @param name Name of binding to create.
334: * @return Newly created binding, appended to the bindings list.
335: */
336: Binding addNewBinding(String name);
337:
338: /**
339: * Create a new import component, appended to this definition's import
340: * list.
341: *
342: * @return Newly created import, appended to the imports list.
343: */
344: Import addNewImport();
345:
346: /**
347: * Create a new include, appended to this definition's include list.
348: *
349: * @return Newly created include, appended to the includes list.
350: */
351: Include addNewInclude();
352:
353: /**
354: * Create a new interface component, appended to this definition's
355: * interface list.
356: *
357: * @param name Name of interface to create.
358: * @return Newly created interface, appended to interfaces list.
359: */
360: Interface addNewInterface(String name);
361:
362: /**
363: * Create a new service component, appended to this definition's service
364: * list.
365: *
366: * @param name Name of service to create.
367: * @return Newly created service, appended to the services list.
368: */
369: Service addNewService(String name);
370:
371: /**
372: * Create a new types component, replacing the existing types component
373: * of this definition, if necessary.
374: *
375: * @return Newly created Types component.
376: */
377: Types newTypes();
378:
379: /**
380: * Return this WSDL definition as an XML string.
381: *
382: * @return This definition, serialized as an XML string.
383: */
384: String toXmlString();
385:
386: /**
387: * Return this document as a DOM document. The DOM tree is a copy;
388: * altering it will not affect this definitions component.
389: *
390: * @return This definition, as a DOM document.
391: */
392: org.w3c.dom.Document toXmlDocument();
393:
394: }
395:
396: // End-of-file: Description.java
|