KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > wsdl > ui > property > model > ElementProperties


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 /**
21  * This generated bean class ElementProperties
22  * matches the schema element 'ElementProperties'.
23  *
24  * ===============================================================
25  * Root node for specifying customizers for a element.
26  * This needs to be on the GlobalElement which would represent the node in the WSDL tree.
27  * If this is defined in local elements it is ignored.
28  * ===============================================================
29  * Generated on Mon Feb 05 17:54:51 PST 2007
30  *
31  * This class matches the root element of the XML Schema,
32  * and is the root of the bean graph.
33  *
34  * elementProperties <ElementProperties> : ElementProperties
35  * propertyGroup <PropertyGroup> : PropertyGroup[1,n]
36  * [attr: name CDATA #REQUIRED : java.lang.String]
37  * [attr: groupOrder CDATA #IMPLIED : int]
38  * [attr: isDefault CDATA #IMPLIED false : boolean]
39  * property <Property> : Property[1,n]
40  * [attr: attributeName CDATA #REQUIRED : java.lang.String]
41  * [attr: isNameableAttribute CDATA #IMPLIED false : boolean]
42  * [attr: decoratorAttribute CDATA #IMPLIED : javax.xml.namespace.QName]
43  * [attr: groupName CDATA #IMPLIED : java.lang.String]
44  * [attr: propertyOrder CDATA #IMPLIED : int]
45  * | schemaCustomizer <SchemaCustomizer> : java.lang.Boolean
46  * | builtInCustomizer <BuiltInCustomizer> : BuiltInCustomizer
47  * | | dependsOnCustomizer <DependsOnCustomizer> : DependsOnCustomizer
48  * | | [attr: name CDATA #IMPLIED MessageChooser : java.lang.String] [enumeration (MessageChooser), enumeration (PartChooser), enumeration (PortTypeChooser), enumeration (PartsChooser)]
49  * | | staticCustomizer <StaticCustomizer> : StaticCustomizer
50  * | | [attr: dependsOnAttributeName CDATA #IMPLIED : javax.xml.namespace.QName]
51  * | | simpleCustomizer <SimpleCustomizer> : SimpleCustomizer
52  * | | [attr: name CDATA #IMPLIED MessageChooser : java.lang.String] [enumeration (MessageChooser), enumeration (PartChooser), enumeration (PortTypeChooser), enumeration (PartsChooser)]
53  * | newCustomizer <NewCustomizer> : String
54  * groupedProperty <GroupedProperty> : GroupedProperty[1,n]
55  * [attr: groupedAttributeNames CDATA #REQUIRED ]
56  * [attr: groupName CDATA #IMPLIED : java.lang.String]
57  * [attr: propertyOrder CDATA #IMPLIED : int]
58  * [attr: displayName CDATA #REQUIRED : java.lang.String] [whiteSpace (collapse)]
59  * | builtInCustomizer <BuiltInCustomizer> : BuiltInCustomizerGroupedProperty
60  * | | elementOrTypeChooser <ElementOrTypeChooser> : ElementOrTypeChooser
61  * | | [attr: elementAttributeName CDATA #IMPLIED : java.lang.String] [whiteSpace (collapse)]
62  * | | [attr: typeAttributeName CDATA #IMPLIED : java.lang.String] [whiteSpace (collapse)]
63  * | | elementOrTypeOrMessagePartChooser <ElementOrTypeOrMessagePartChooser> : ElementOrTypeOrMessagePartChooser
64  * | | [attr: elementAttributeName CDATA #IMPLIED : java.lang.String] [whiteSpace (collapse)]
65  * | | [attr: typeAttributeName CDATA #IMPLIED : java.lang.String] [whiteSpace (collapse)]
66  * | | [attr: messageAttributeName CDATA #IMPLIED : java.lang.String] [whiteSpace (collapse)]
67  * | | [attr: partAttributeName CDATA #IMPLIED : java.lang.String] [whiteSpace (collapse)]
68  * | newCustomizer <NewCustomizer> : String
69  *
70  * @Generated
71  */

72
73 package org.netbeans.modules.xml.wsdl.ui.property.model;
74
75 public class ElementProperties {
76     public static final String JavaDoc PROPERTYGROUP = "PropertyGroup"; // NOI18N
77
public static final String JavaDoc PROPERTY = "Property"; // NOI18N
78
public static final String JavaDoc GROUPEDPROPERTY = "GroupedProperty"; // NOI18N
79

80     private java.util.List JavaDoc _PropertyGroup = new java.util.ArrayList JavaDoc(); // List<PropertyGroup>
81
private java.util.List JavaDoc _Property = new java.util.ArrayList JavaDoc(); // List<Property>
82
private java.util.List JavaDoc _GroupedProperty = new java.util.ArrayList JavaDoc(); // List<GroupedProperty>
83
private java.lang.String JavaDoc schemaLocation;
84
85     /**
86      * Normal starting point constructor.
87      */

88     public ElementProperties() {
89     }
90
91     /**
92      * Required parameters constructor
93      */

94     public ElementProperties(org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup[] propertyGroup, org.netbeans.modules.xml.wsdl.ui.property.model.Property[] property, org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty[] groupedProperty) {
95         if (propertyGroup!= null) {
96             ((java.util.ArrayList JavaDoc) _PropertyGroup).ensureCapacity(propertyGroup.length);
97             for (int i = 0; i < propertyGroup.length; ++i) {
98                 _PropertyGroup.add(propertyGroup[i]);
99             }
100         }
101         if (property!= null) {
102             ((java.util.ArrayList JavaDoc) _Property).ensureCapacity(property.length);
103             for (int i = 0; i < property.length; ++i) {
104                 _Property.add(property[i]);
105             }
106         }
107         if (groupedProperty!= null) {
108             ((java.util.ArrayList JavaDoc) _GroupedProperty).ensureCapacity(groupedProperty.length);
109             for (int i = 0; i < groupedProperty.length; ++i) {
110                 _GroupedProperty.add(groupedProperty[i]);
111             }
112         }
113     }
114
115     /**
116      * Deep copy
117      */

118     public ElementProperties(org.netbeans.modules.xml.wsdl.ui.property.model.ElementProperties source) {
119         this(source, false);
120     }
121
122     /**
123      * Deep copy
124      * @param justData just copy the XML relevant data
125      */

126     public ElementProperties(org.netbeans.modules.xml.wsdl.ui.property.model.ElementProperties source, boolean justData) {
127         for (java.util.Iterator JavaDoc it = source._PropertyGroup.iterator();
128             it.hasNext(); ) {
129             org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup srcElement = (org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup)it.next();
130             _PropertyGroup.add((srcElement == null) ? null : newPropertyGroup(srcElement, justData));
131         }
132         for (java.util.Iterator JavaDoc it = source._Property.iterator();
133             it.hasNext(); ) {
134             org.netbeans.modules.xml.wsdl.ui.property.model.Property srcElement = (org.netbeans.modules.xml.wsdl.ui.property.model.Property)it.next();
135             _Property.add((srcElement == null) ? null : newProperty(srcElement, justData));
136         }
137         for (java.util.Iterator JavaDoc it = source._GroupedProperty.iterator();
138             it.hasNext(); ) {
139             org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty srcElement = (org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty)it.next();
140             _GroupedProperty.add((srcElement == null) ? null : newGroupedProperty(srcElement, justData));
141         }
142         schemaLocation = source.schemaLocation;
143     }
144
145     // This attribute is an array containing at least one element
146
public void setPropertyGroup(org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup[] value) {
147         if (value == null)
148             value = new PropertyGroup[0];
149         _PropertyGroup.clear();
150         ((java.util.ArrayList JavaDoc) _PropertyGroup).ensureCapacity(value.length);
151         for (int i = 0; i < value.length; ++i) {
152             _PropertyGroup.add(value[i]);
153         }
154     }
155
156     public void setPropertyGroup(int index, org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup value) {
157         _PropertyGroup.set(index, value);
158     }
159
160     public org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup[] getPropertyGroup() {
161         PropertyGroup[] arr = new PropertyGroup[_PropertyGroup.size()];
162         return (PropertyGroup[]) _PropertyGroup.toArray(arr);
163     }
164
165     public java.util.List JavaDoc fetchPropertyGroupList() {
166         return _PropertyGroup;
167     }
168
169     public org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup getPropertyGroup(int index) {
170         return (PropertyGroup)_PropertyGroup.get(index);
171     }
172
173     // Return the number of propertyGroup
174
public int sizePropertyGroup() {
175         return _PropertyGroup.size();
176     }
177
178     public int addPropertyGroup(org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup value) {
179         _PropertyGroup.add(value);
180         int positionOfNewItem = _PropertyGroup.size()-1;
181         return positionOfNewItem;
182     }
183
184     /**
185      * Search from the end looking for @param value, and then remove it.
186      */

187     public int removePropertyGroup(org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup value) {
188         int pos = _PropertyGroup.indexOf(value);
189         if (pos >= 0) {
190             _PropertyGroup.remove(pos);
191         }
192         return pos;
193     }
194
195     // This attribute is an array containing at least one element
196
public void setProperty(org.netbeans.modules.xml.wsdl.ui.property.model.Property[] value) {
197         if (value == null)
198             value = new Property[0];
199         _Property.clear();
200         ((java.util.ArrayList JavaDoc) _Property).ensureCapacity(value.length);
201         for (int i = 0; i < value.length; ++i) {
202             _Property.add(value[i]);
203         }
204     }
205
206     public void setProperty(int index, org.netbeans.modules.xml.wsdl.ui.property.model.Property value) {
207         _Property.set(index, value);
208     }
209
210     public org.netbeans.modules.xml.wsdl.ui.property.model.Property[] getProperty() {
211         Property[] arr = new Property[_Property.size()];
212         return (Property[]) _Property.toArray(arr);
213     }
214
215     public java.util.List JavaDoc fetchPropertyList() {
216         return _Property;
217     }
218
219     public org.netbeans.modules.xml.wsdl.ui.property.model.Property getProperty(int index) {
220         return (Property)_Property.get(index);
221     }
222
223     // Return the number of property
224
public int sizeProperty() {
225         return _Property.size();
226     }
227
228     public int addProperty(org.netbeans.modules.xml.wsdl.ui.property.model.Property value) {
229         _Property.add(value);
230         int positionOfNewItem = _Property.size()-1;
231         return positionOfNewItem;
232     }
233
234     /**
235      * Search from the end looking for @param value, and then remove it.
236      */

237     public int removeProperty(org.netbeans.modules.xml.wsdl.ui.property.model.Property value) {
238         int pos = _Property.indexOf(value);
239         if (pos >= 0) {
240             _Property.remove(pos);
241         }
242         return pos;
243     }
244
245     // This attribute is an array containing at least one element
246
public void setGroupedProperty(org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty[] value) {
247         if (value == null)
248             value = new GroupedProperty[0];
249         _GroupedProperty.clear();
250         ((java.util.ArrayList JavaDoc) _GroupedProperty).ensureCapacity(value.length);
251         for (int i = 0; i < value.length; ++i) {
252             _GroupedProperty.add(value[i]);
253         }
254     }
255
256     public void setGroupedProperty(int index, org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty value) {
257         _GroupedProperty.set(index, value);
258     }
259
260     public org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty[] getGroupedProperty() {
261         GroupedProperty[] arr = new GroupedProperty[_GroupedProperty.size()];
262         return (GroupedProperty[]) _GroupedProperty.toArray(arr);
263     }
264
265     public java.util.List JavaDoc fetchGroupedPropertyList() {
266         return _GroupedProperty;
267     }
268
269     public org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty getGroupedProperty(int index) {
270         return (GroupedProperty)_GroupedProperty.get(index);
271     }
272
273     // Return the number of groupedProperty
274
public int sizeGroupedProperty() {
275         return _GroupedProperty.size();
276     }
277
278     public int addGroupedProperty(org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty value) {
279         _GroupedProperty.add(value);
280         int positionOfNewItem = _GroupedProperty.size()-1;
281         return positionOfNewItem;
282     }
283
284     /**
285      * Search from the end looking for @param value, and then remove it.
286      */

287     public int removeGroupedProperty(org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty value) {
288         int pos = _GroupedProperty.indexOf(value);
289         if (pos >= 0) {
290             _GroupedProperty.remove(pos);
291         }
292         return pos;
293     }
294
295     public void _setSchemaLocation(String JavaDoc location) {
296         schemaLocation = location;
297     }
298
299     public String JavaDoc _getSchemaLocation() {
300         return schemaLocation;
301     }
302
303     /**
304      * Create a new bean using it's default constructor.
305      * This does not add it to any bean graph.
306      */

307     public org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup newPropertyGroup() {
308         return new org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup();
309     }
310
311     /**
312      * Create a new bean, copying from another one.
313      * This does not add it to any bean graph.
314      */

315     public org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup newPropertyGroup(PropertyGroup source, boolean justData) {
316         return new org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup(source, justData);
317     }
318
319     /**
320      * Create a new bean using it's default constructor.
321      * This does not add it to any bean graph.
322      */

323     public org.netbeans.modules.xml.wsdl.ui.property.model.Property newProperty() {
324         return new org.netbeans.modules.xml.wsdl.ui.property.model.Property();
325     }
326
327     /**
328      * Create a new bean, copying from another one.
329      * This does not add it to any bean graph.
330      */

331     public org.netbeans.modules.xml.wsdl.ui.property.model.Property newProperty(Property source, boolean justData) {
332         return new org.netbeans.modules.xml.wsdl.ui.property.model.Property(source, justData);
333     }
334
335     /**
336      * Create a new bean using it's default constructor.
337      * This does not add it to any bean graph.
338      */

339     public org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty newGroupedProperty() {
340         return new org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty();
341     }
342
343     /**
344      * Create a new bean, copying from another one.
345      * This does not add it to any bean graph.
346      */

347     public org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty newGroupedProperty(GroupedProperty source, boolean justData) {
348         return new org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty(source, justData);
349     }
350
351     public void write(org.openide.filesystems.FileObject fo) throws java.io.IOException JavaDoc {
352         org.openide.filesystems.FileLock lock = fo.lock();
353         try {
354             java.io.OutputStream JavaDoc out = fo.getOutputStream(lock);
355             write(out);
356             out.close();
357         } finally {
358             lock.releaseLock();
359         }
360     }
361
362     public void write(org.openide.filesystems.FileObject dir, String JavaDoc filename) throws java.io.IOException JavaDoc {
363         org.openide.filesystems.FileObject file = dir.getFileObject(filename);
364         if (file == null) {
365             file = dir.createData(filename);
366         }
367         write(file);
368     }
369
370     public void write(java.io.File JavaDoc f) throws java.io.IOException JavaDoc {
371         java.io.OutputStream JavaDoc out = new java.io.FileOutputStream JavaDoc(f);
372         try {
373             write(out);
374         } finally {
375             out.close();
376         }
377     }
378
379     public void write(java.io.OutputStream JavaDoc out) throws java.io.IOException JavaDoc {
380         write(out, null);
381     }
382
383     public void write(java.io.OutputStream JavaDoc out, String JavaDoc encoding) throws java.io.IOException JavaDoc {
384         java.io.Writer JavaDoc w;
385         if (encoding == null) {
386             encoding = "UTF-8"; // NOI18N
387
}
388         w = new java.io.BufferedWriter JavaDoc(new java.io.OutputStreamWriter JavaDoc(out, encoding));
389         write(w, encoding);
390         w.flush();
391     }
392
393     /**
394      * Print this Java Bean to @param out including an XML header.
395      * @param encoding is the encoding style that @param out was opened with.
396      */

397     public void write(java.io.Writer JavaDoc out, String JavaDoc encoding) throws java.io.IOException JavaDoc {
398         out.write("<?xml version='1.0'"); // NOI18N
399
if (encoding != null)
400             out.write(" encoding='"+encoding+"'"); // NOI18N
401
out.write(" ?>\n"); // NOI18N
402
writeNode(out, "ElementProperties", ""); // NOI18N
403
}
404
405     public void writeNode(java.io.Writer JavaDoc out) throws java.io.IOException JavaDoc {
406         String JavaDoc myName;
407         myName = "ElementProperties";
408         writeNode(out, myName, ""); // NOI18N
409
}
410
411     public void writeNode(java.io.Writer JavaDoc out, String JavaDoc nodeName, String JavaDoc indent) throws java.io.IOException JavaDoc {
412         writeNode(out, nodeName, null, indent, new java.util.HashMap JavaDoc());
413     }
414
415     /**
416      * It's not recommended to call this method directly.
417      */

418     public void writeNode(java.io.Writer JavaDoc out, String JavaDoc nodeName, String JavaDoc namespace, String JavaDoc indent, java.util.Map JavaDoc namespaceMap) throws java.io.IOException JavaDoc {
419         out.write(indent);
420         out.write("<");
421         if (namespace != null) {
422             out.write((String JavaDoc)namespaceMap.get(namespace));
423             out.write(":");
424         }
425         out.write(nodeName);
426         out.write(" xmlns='"); // NOI18N
427
out.write("http://xml.netbeans.org/schema/wsdlui/property"); // NOI18N
428
out.write("'"); // NOI18N
429
if (schemaLocation != null) {
430             namespaceMap.put("http://www.w3.org/2001/XMLSchema-instance", "xsi");
431             out.write(" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='");
432             out.write(schemaLocation);
433             out.write("'"); // NOI18N
434
}
435         writeNodeAttributes(out, nodeName, namespace, indent, namespaceMap);
436         out.write(">\n");
437         writeNodeChildren(out, nodeName, namespace, indent, namespaceMap);
438         out.write(indent);
439         out.write("</");
440         if (namespace != null) {
441             out.write((String JavaDoc)namespaceMap.get(namespace));
442             out.write(":");
443         }
444         out.write(nodeName);
445         out.write(">\n");
446     }
447
448     protected void writeNodeAttributes(java.io.Writer JavaDoc out, String JavaDoc nodeName, String JavaDoc namespace, String JavaDoc indent, java.util.Map JavaDoc namespaceMap) throws java.io.IOException JavaDoc {
449     }
450
451     protected void writeNodeChildren(java.io.Writer JavaDoc out, String JavaDoc nodeName, String JavaDoc namespace, String JavaDoc indent, java.util.Map JavaDoc namespaceMap) throws java.io.IOException JavaDoc {
452         String JavaDoc nextIndent = indent + " ";
453         for (java.util.Iterator JavaDoc it = _PropertyGroup.iterator();
454             it.hasNext(); ) {
455             org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup element = (org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup)it.next();
456             if (element != null) {
457                 element.writeNode(out, "PropertyGroup", null, nextIndent, namespaceMap);
458             }
459         }
460         for (java.util.Iterator JavaDoc it = _Property.iterator(); it.hasNext(); ) {
461             org.netbeans.modules.xml.wsdl.ui.property.model.Property element = (org.netbeans.modules.xml.wsdl.ui.property.model.Property)it.next();
462             if (element != null) {
463                 element.writeNode(out, "Property", null, nextIndent, namespaceMap);
464             }
465         }
466         for (java.util.Iterator JavaDoc it = _GroupedProperty.iterator();
467             it.hasNext(); ) {
468             org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty element = (org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty)it.next();
469             if (element != null) {
470                 element.writeNode(out, "GroupedProperty", null, nextIndent, namespaceMap);
471             }
472         }
473     }
474
475     public static ElementProperties read(org.openide.filesystems.FileObject fo) throws javax.xml.parsers.ParserConfigurationException JavaDoc, org.xml.sax.SAXException JavaDoc, java.io.IOException JavaDoc {
476         java.io.InputStream JavaDoc in = fo.getInputStream();
477         try {
478             return read(in);
479         } finally {
480             in.close();
481         }
482     }
483
484     public static ElementProperties read(java.io.File JavaDoc f) throws javax.xml.parsers.ParserConfigurationException JavaDoc, org.xml.sax.SAXException JavaDoc, java.io.IOException JavaDoc {
485         java.io.InputStream JavaDoc in = new java.io.FileInputStream JavaDoc(f);
486         try {
487             return read(in);
488         } finally {
489             in.close();
490         }
491     }
492
493     public static ElementProperties read(java.io.InputStream JavaDoc in) throws javax.xml.parsers.ParserConfigurationException JavaDoc, org.xml.sax.SAXException JavaDoc, java.io.IOException JavaDoc {
494         return read(new org.xml.sax.InputSource JavaDoc(in), false, null, null);
495     }
496
497     /**
498      * Warning: in readNoEntityResolver character and entity references will
499      * not be read from any DTD in the XML source.
500      * However, this way is faster since no DTDs are looked up
501      * (possibly skipping network access) or parsed.
502      */

503     public static ElementProperties readNoEntityResolver(java.io.InputStream JavaDoc in) throws javax.xml.parsers.ParserConfigurationException JavaDoc, org.xml.sax.SAXException JavaDoc, java.io.IOException JavaDoc {
504         return read(new org.xml.sax.InputSource JavaDoc(in), false,
505             new org.xml.sax.EntityResolver JavaDoc() {
506             public org.xml.sax.InputSource JavaDoc resolveEntity(String JavaDoc publicId, String JavaDoc systemId) {
507                 java.io.ByteArrayInputStream JavaDoc bin = new java.io.ByteArrayInputStream JavaDoc(new byte[0]);
508                 return new org.xml.sax.InputSource JavaDoc(bin);
509             }
510         }
511             , null);
512     }
513
514     public static ElementProperties read(org.xml.sax.InputSource JavaDoc in, boolean validate, org.xml.sax.EntityResolver JavaDoc er, org.xml.sax.ErrorHandler JavaDoc eh) throws javax.xml.parsers.ParserConfigurationException JavaDoc, org.xml.sax.SAXException JavaDoc, java.io.IOException JavaDoc {
515         javax.xml.parsers.DocumentBuilderFactory JavaDoc dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance();
516         dbf.setValidating(validate);
517         dbf.setNamespaceAware(true);
518         javax.xml.parsers.DocumentBuilder JavaDoc db = dbf.newDocumentBuilder();
519         if (er != null) db.setEntityResolver(er);
520         if (eh != null) db.setErrorHandler(eh);
521         org.w3c.dom.Document JavaDoc doc = db.parse(in);
522         return read(doc);
523     }
524
525     public static ElementProperties read(org.w3c.dom.Document JavaDoc document) {
526         ElementProperties aElementProperties = new ElementProperties();
527         aElementProperties.readFromDocument(document);
528         return aElementProperties;
529     }
530
531     protected void readFromDocument(org.w3c.dom.Document JavaDoc document) {
532         readNode(document.getDocumentElement());
533     }
534
535     public void readNode(org.w3c.dom.Node JavaDoc node) {
536         readNode(node, new java.util.HashMap JavaDoc());
537     }
538
539     public void readNode(org.w3c.dom.Node JavaDoc node, java.util.Map JavaDoc namespacePrefixes) {
540         if (node.hasAttributes()) {
541             org.w3c.dom.NamedNodeMap JavaDoc attrs = node.getAttributes();
542             org.w3c.dom.Attr JavaDoc attr;
543             java.lang.String JavaDoc attrValue;
544             boolean firstNamespaceDef = true;
545             for (int attrNum = 0; attrNum < attrs.getLength(); ++attrNum) {
546                 attr = (org.w3c.dom.Attr JavaDoc) attrs.item(attrNum);
547                 String JavaDoc attrName = attr.getName();
548                 if (attrName.startsWith("xmlns:")) {
549                     if (firstNamespaceDef) {
550                         firstNamespaceDef = false;
551                         // Dup prefix map, so as to not write over previous values, and to make it easy to clear out our entries.
552
namespacePrefixes = new java.util.HashMap JavaDoc(namespacePrefixes);
553                     }
554                     String JavaDoc attrNSPrefix = attrName.substring(6, attrName.length());
555                     namespacePrefixes.put(attrNSPrefix, attr.getValue());
556                 }
557             }
558             String JavaDoc xsiPrefix = "xsi";
559             for (java.util.Iterator JavaDoc it = namespacePrefixes.keySet().iterator();
560                 it.hasNext(); ) {
561                 String JavaDoc prefix = (String JavaDoc) it.next();
562                 String JavaDoc ns = (String JavaDoc) namespacePrefixes.get(prefix);
563                 if ("http://www.w3.org/2001/XMLSchema-instance".equals(ns)) {
564                     xsiPrefix = prefix;
565                     break;
566                 }
567             }
568             attr = (org.w3c.dom.Attr JavaDoc) attrs.getNamedItem(""+xsiPrefix+":schemaLocation");
569             if (attr != null) {
570                 attrValue = attr.getValue();
571                 schemaLocation = attrValue;
572             }
573             readNodeAttributes(node, namespacePrefixes, attrs);
574         }
575         readNodeChildren(node, namespacePrefixes);
576     }
577
578     protected void readNodeAttributes(org.w3c.dom.Node JavaDoc node, java.util.Map JavaDoc namespacePrefixes, org.w3c.dom.NamedNodeMap JavaDoc attrs) {
579         org.w3c.dom.Attr JavaDoc attr;
580         java.lang.String JavaDoc attrValue;
581     }
582
583     protected void readNodeChildren(org.w3c.dom.Node JavaDoc node, java.util.Map JavaDoc namespacePrefixes) {
584         org.w3c.dom.NodeList JavaDoc children = node.getChildNodes();
585         for (int i = 0, size = children.getLength(); i < size; ++i) {
586             org.w3c.dom.Node JavaDoc childNode = children.item(i);
587             String JavaDoc childNodeName = (childNode.getLocalName() == null ? childNode.getNodeName().intern() : childNode.getLocalName().intern());
588             String JavaDoc childNodeValue = "";
589             if (childNode.getFirstChild() != null) {
590                 childNodeValue = childNode.getFirstChild().getNodeValue();
591             }
592             if (childNodeName == "PropertyGroup") {
593                 PropertyGroup aPropertyGroup = newPropertyGroup();
594                 aPropertyGroup.readNode(childNode, namespacePrefixes);
595                 _PropertyGroup.add(aPropertyGroup);
596             }
597             else if (childNodeName == "Property") {
598                 Property aProperty = newProperty();
599                 aProperty.readNode(childNode, namespacePrefixes);
600                 _Property.add(aProperty);
601             }
602             else if (childNodeName == "GroupedProperty") {
603                 GroupedProperty aGroupedProperty = newGroupedProperty();
604                 aGroupedProperty.readNode(childNode, namespacePrefixes);
605                 _GroupedProperty.add(aGroupedProperty);
606             }
607             else {
608                 // Found extra unrecognized childNode
609
}
610         }
611     }
612
613     /**
614      * Takes some text to be printed into an XML stream and escapes any
615      * characters that might make it invalid XML (like '<').
616      */

617     public static void writeXML(java.io.Writer JavaDoc out, String JavaDoc msg) throws java.io.IOException JavaDoc {
618         writeXML(out, msg, true);
619     }
620
621     public static void writeXML(java.io.Writer JavaDoc out, String JavaDoc msg, boolean attribute) throws java.io.IOException JavaDoc {
622         if (msg == null)
623             return;
624         int msgLength = msg.length();
625         for (int i = 0; i < msgLength; ++i) {
626             char c = msg.charAt(i);
627             writeXML(out, c, attribute);
628         }
629     }
630
631     public static void writeXML(java.io.Writer JavaDoc out, char msg, boolean attribute) throws java.io.IOException JavaDoc {
632         if (msg == '&')
633             out.write("&amp;");
634         else if (msg == '<')
635             out.write("&lt;");
636         else if (msg == '>')
637             out.write("&gt;");
638         else if (attribute) {
639             if (msg == '"')
640                 out.write("&quot;");
641             else if (msg == '\'')
642                 out.write("&apos;");
643             else if (msg == '\n')
644                 out.write("&#xA;");
645             else if (msg == '\t')
646                 out.write("&#x9;");
647             else
648                 out.write(msg);
649         }
650         else
651             out.write(msg);
652     }
653
654     public void changePropertyByName(String JavaDoc name, Object JavaDoc value) {
655         if (name == null) return;
656         name = name.intern();
657         if (name == "propertyGroup")
658             addPropertyGroup((PropertyGroup)value);
659         else if (name == "propertyGroup[]")
660             setPropertyGroup((PropertyGroup[]) value);
661         else if (name == "property")
662             addProperty((Property)value);
663         else if (name == "property[]")
664             setProperty((Property[]) value);
665         else if (name == "groupedProperty")
666             addGroupedProperty((GroupedProperty)value);
667         else if (name == "groupedProperty[]")
668             setGroupedProperty((GroupedProperty[]) value);
669         else
670             throw new IllegalArgumentException JavaDoc(name+" is not a valid property name for ElementProperties");
671     }
672
673     public Object JavaDoc fetchPropertyByName(String JavaDoc name) {
674         if (name == "propertyGroup[]")
675             return getPropertyGroup();
676         if (name == "property[]")
677             return getProperty();
678         if (name == "groupedProperty[]")
679             return getGroupedProperty();
680         throw new IllegalArgumentException JavaDoc(name+" is not a valid property name for ElementProperties");
681     }
682
683     public String JavaDoc nameSelf() {
684         return "/ElementProperties";
685     }
686
687     public String JavaDoc nameChild(Object JavaDoc childObj) {
688         return nameChild(childObj, false, false);
689     }
690
691     /**
692      * @param childObj The child object to search for
693      * @param returnSchemaName Whether or not the schema name should be returned or the property name
694      * @return null if not found
695      */

696     public String JavaDoc nameChild(Object JavaDoc childObj, boolean returnConstName, boolean returnSchemaName) {
697         return nameChild(childObj, returnConstName, returnSchemaName, false);
698     }
699
700     /**
701      * @param childObj The child object to search for
702      * @param returnSchemaName Whether or not the schema name should be returned or the property name
703      * @return null if not found
704      */

705     public String JavaDoc nameChild(Object JavaDoc childObj, boolean returnConstName, boolean returnSchemaName, boolean returnXPathName) {
706         if (childObj instanceof GroupedProperty) {
707             GroupedProperty child = (GroupedProperty) childObj;
708             int index = 0;
709             for (java.util.Iterator JavaDoc it = _GroupedProperty.iterator();
710                 it.hasNext(); ) {
711                 org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty element = (org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty)it.next();
712                 if (child == element) {
713                     if (returnConstName) {
714                         return GROUPEDPROPERTY;
715                     } else if (returnSchemaName) {
716                         return "GroupedProperty";
717                     } else if (returnXPathName) {
718                         return "GroupedProperty[position()="+index+"]";
719                     } else {
720                         return "GroupedProperty."+Integer.toHexString(index);
721                     }
722                 }
723                 ++index;
724             }
725         }
726         if (childObj instanceof Property) {
727             Property child = (Property) childObj;
728             int index = 0;
729             for (java.util.Iterator JavaDoc it = _Property.iterator();
730                 it.hasNext(); ) {
731                 org.netbeans.modules.xml.wsdl.ui.property.model.Property element = (org.netbeans.modules.xml.wsdl.ui.property.model.Property)it.next();
732                 if (child == element) {
733                     if (returnConstName) {
734                         return PROPERTY;
735                     } else if (returnSchemaName) {
736                         return "Property";
737                     } else if (returnXPathName) {
738                         return "Property[position()="+index+"]";
739                     } else {
740                         return "Property."+Integer.toHexString(index);
741                     }
742                 }
743                 ++index;
744             }
745         }
746         if (childObj instanceof PropertyGroup) {
747             PropertyGroup child = (PropertyGroup) childObj;
748             int index = 0;
749             for (java.util.Iterator JavaDoc it = _PropertyGroup.iterator();
750                 it.hasNext(); ) {
751                 org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup element = (org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup)it.next();
752                 if (child == element) {
753                     if (returnConstName) {
754                         return PROPERTYGROUP;
755                     } else if (returnSchemaName) {
756                         return "PropertyGroup";
757                     } else if (returnXPathName) {
758                         return "PropertyGroup[position()="+index+"]";
759                     } else {
760                         return "PropertyGroup."+Integer.toHexString(index);
761                     }
762                 }
763                 ++index;
764             }
765         }
766         return null;
767     }
768
769     /**
770      * Return an array of all of the properties that are beans and are set.
771      */

772     public java.lang.Object JavaDoc[] childBeans(boolean recursive) {
773         java.util.List JavaDoc children = new java.util.LinkedList JavaDoc();
774         childBeans(recursive, children);
775         java.lang.Object JavaDoc[] result = new java.lang.Object JavaDoc[children.size()];
776         return (java.lang.Object JavaDoc[]) children.toArray(result);
777     }
778
779     /**
780      * Put all child beans into the beans list.
781      */

782     public void childBeans(boolean recursive, java.util.List JavaDoc beans) {
783         for (java.util.Iterator JavaDoc it = _PropertyGroup.iterator();
784             it.hasNext(); ) {
785             org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup element = (org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup)it.next();
786             if (element != null) {
787                 if (recursive) {
788                     element.childBeans(true, beans);
789                 }
790                 beans.add(element);
791             }
792         }
793         for (java.util.Iterator JavaDoc it = _Property.iterator(); it.hasNext(); ) {
794             org.netbeans.modules.xml.wsdl.ui.property.model.Property element = (org.netbeans.modules.xml.wsdl.ui.property.model.Property)it.next();
795             if (element != null) {
796                 if (recursive) {
797                     element.childBeans(true, beans);
798                 }
799                 beans.add(element);
800             }
801         }
802         for (java.util.Iterator JavaDoc it = _GroupedProperty.iterator();
803             it.hasNext(); ) {
804             org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty element = (org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty)it.next();
805             if (element != null) {
806                 if (recursive) {
807                     element.childBeans(true, beans);
808                 }
809                 beans.add(element);
810             }
811         }
812     }
813
814     public boolean equals(Object JavaDoc o) {
815         return o instanceof org.netbeans.modules.xml.wsdl.ui.property.model.ElementProperties && equals((org.netbeans.modules.xml.wsdl.ui.property.model.ElementProperties) o);
816     }
817
818     public boolean equals(org.netbeans.modules.xml.wsdl.ui.property.model.ElementProperties inst) {
819         if (inst == this) {
820             return true;
821         }
822         if (inst == null) {
823             return false;
824         }
825         if (sizePropertyGroup() != inst.sizePropertyGroup())
826             return false;
827         // Compare every element.
828
for (java.util.Iterator JavaDoc it = _PropertyGroup.iterator(), it2 = inst._PropertyGroup.iterator();
829             it.hasNext() && it2.hasNext(); ) {
830             org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup element = (org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup)it.next();
831             org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup element2 = (org.netbeans.modules.xml.wsdl.ui.property.model.PropertyGroup)it2.next();
832             if (!(element == null ? element2 == null : element.equals(element2))) {
833                 return false;
834             }
835         }
836         if (sizeProperty() != inst.sizeProperty())
837             return false;
838         // Compare every element.
839
for (java.util.Iterator JavaDoc it = _Property.iterator(), it2 = inst._Property.iterator();
840             it.hasNext() && it2.hasNext(); ) {
841             org.netbeans.modules.xml.wsdl.ui.property.model.Property element = (org.netbeans.modules.xml.wsdl.ui.property.model.Property)it.next();
842             org.netbeans.modules.xml.wsdl.ui.property.model.Property element2 = (org.netbeans.modules.xml.wsdl.ui.property.model.Property)it2.next();
843             if (!(element == null ? element2 == null : element.equals(element2))) {
844                 return false;
845             }
846         }
847         if (sizeGroupedProperty() != inst.sizeGroupedProperty())
848             return false;
849         // Compare every element.
850
for (java.util.Iterator JavaDoc it = _GroupedProperty.iterator(), it2 = inst._GroupedProperty.iterator();
851             it.hasNext() && it2.hasNext(); ) {
852             org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty element = (org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty)it.next();
853             org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty element2 = (org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty)it2.next();
854             if (!(element == null ? element2 == null : element.equals(element2))) {
855                 return false;
856             }
857         }
858         return true;
859     }
860
861     public int hashCode() {
862         int result = 17;
863         result = 37*result + (_PropertyGroup == null ? 0 : _PropertyGroup.hashCode());
864         result = 37*result + (_Property == null ? 0 : _Property.hashCode());
865         result = 37*result + (_GroupedProperty == null ? 0 : _GroupedProperty.hashCode());
866         return result;
867     }
868
869 }
870
871
872 /*
873         The following schema file has been used for generation:
874
875 <?xml version="1.0" encoding="UTF-8"?>
876
877 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
878             targetNamespace="http://xml.netbeans.org/schema/wsdlui/property"
879             xmlns:tns="http://xml.netbeans.org/schema/wsdlui/property"
880             elementFormDefault="qualified">
881     <xsd:element name="ElementProperties">
882         <xsd:annotation>
883             <xsd:documentation xml:lang="en-US">Root node for specifying customizers for a element.
884                 This needs to be on the GlobalElement which would represent the node in the WSDL tree.
885             If this is defined in local elements it is ignored.</xsd:documentation>
886         </xsd:annotation>
887         <xsd:complexType>
888             <xsd:sequence>
889                 <xsd:element ref="tns:PropertyGroup" maxOccurs="unbounded" />
890                 <xsd:element ref="tns:Property" maxOccurs="unbounded" />
891                 <xsd:element ref="tns:GroupedProperty" maxOccurs="unbounded" />
892             </xsd:sequence>
893         </xsd:complexType>
894     </xsd:element>
895     
896     <xsd:element name="PropertyGroup">
897         <xsd:annotation>
898             <xsd:documentation xml:lang="en-US">Used to create groups in the property sheet.
899                 By default, if no groups are defined all the properties will be shown
900                 in the default Property sheet called "Properties".
901                 name : defines the name of the Group.
902                 groupOrder : defines the order in which the groups will be created. The groupOrder starts with 1.
903                 isDefault : overrides the default property sheet to be this group rather than "Properties".
904                 This enables the user to put non-customized properties (which do not have a Property defined in this xml) to go into this property sheet.
905                 
906                 
907             </xsd:documentation>
908         </xsd:annotation>
909         <xsd:complexType>
910             <xsd:attribute name="name" type="xsd:string" use="required"/>
911             <xsd:attribute name="groupOrder" type="xsd:int"/>
912             <xsd:attribute name="isDefault" type="xsd:boolean" default="false"/>
913         </xsd:complexType>
914     </xsd:element>
915     <xsd:element name="Property">
916         <xsd:annotation>
917             <xsd:documentation xml:lang="en-US">Property represents each attribute that would be created for the Node in the wsdleditor tree.
918                 It defines a way to specify customizers for attributes.
919                 There are 3 types of Property customizers:
920                 SchemaCustomizer : The default Customizer is the SchemaCustomizer, which shows drop downs for enumerations and boolean attributes,
921                 and String customizer for all other types. So if there is no Property defined for a attribute, it will have
922                 SchemaCustomizer.
923                 BuiltInCustomizer : specifies a way to put already defined customizer to be shown. Examples are part chooser, message chooser etc.
924                 NewCustomizer : provides a way to create a custom customizer specific to the user requirement. When using this the developer has
925                 to implement the SPI org.netbeans.modules.xml.wsdl.ui.spi.WSDLLookupProvider, and add a implementation of
926                 org.netbeans.modules.xml.wsdl.ui.spi.NewCustomizerProvider, which will provide the custom Node.Property to be shown in the
927                 wsdl editor property sheet.
928             </xsd:documentation>
929         </xsd:annotation>
930         <xsd:complexType>
931             <xsd:choice>
932                 <xsd:element name="SchemaCustomizer"/>
933                 <xsd:element name="BuiltInCustomizer">
934                     <xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema">
935                         <xsd:choice>
936                             <xsd:element name="DependsOnCustomizer">
937                                 <xsd:annotation>
938                                     <xsd:documentation xml:lang="en-US">Use a built-in customizer whose value(s) depend on some other attribute
939                                         of the the same element or some other source.
940                                     </xsd:documentation>
941                                 </xsd:annotation>
942                                 <xsd:complexType>
943                                     <xsd:choice>
944                                         <xsd:element name="StaticCustomizer">
945                                             <xsd:annotation>
946                                                 <xsd:documentation xml:lang="en-US">dependsOnAttributeName : the attribute on which the value(s) of the chooser would depend on.
947                                                     For example: some elements may have a attribute for message and another for part, and the PartsChooser should show parts from the message that is selected in the message attribute.
948                                                     In that the dependsOnAttributeName for PartChooser would be message.
949                                                 </xsd:documentation>
950                                             </xsd:annotation>
951                                             <xsd:complexType>
952                                                 <xsd:attribute name="dependsOnAttributeName" type="xsd:QName"/>
953                                             </xsd:complexType>
954                                         </xsd:element>
955                                         <!--No use case as of yet, xsd:element name="DynamicCustomizer">
956                                             <xsd:annotation>
957                                                 <xsd:documentation xml:lang="en-US">
958                                                     
959                                                 </xsd:documentation>
960                                             </xsd:annotation>
961                                             <xsd:complexType>
962                                                 <xsd:attribute name="dependsOnAttributeValueType" type="xsd:string"/>
963                                                 <xsd:attribute name="attributeValueProviderClass" type="xsd:string"/>
964                                             </xsd:complexType>
965                                         </xsd:element-->
966                                     </xsd:choice>
967                                     <xsd:attribute name="name" type="tns:builtInCustomizerTypes"/>
968                                 </xsd:complexType>
969                             </xsd:element>
970                             <xsd:element name="SimpleCustomizer">
971                                 <xsd:annotation>
972                                     <xsd:documentation xml:lang="en-US">
973                                         Use the builtin chooser that are available (the names are defined under builtInCustomizerTypes simple type as enumerations,
974                                         name: specifies which builtin chooser to use.
975                                     </xsd:documentation>
976                                 </xsd:annotation>
977                                 <xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema">
978                                     <xsd:sequence/>
979                                     <xsd:attribute name="name" type="tns:builtInCustomizerTypes"/>
980                                 </xsd:complexType>
981                             </xsd:element>
982                         </xsd:choice>
983                     </xsd:complexType>
984                 </xsd:element>
985                 <xsd:element ref="tns:NewCustomizer"/>
986             </xsd:choice>
987             <xsd:attribute name="attributeName" type="xsd:string" use="required"/>
988             <xsd:attribute name="isNameableAttribute" type="xsd:boolean" default="false"/>
989             <xsd:attribute name="decoratorAttribute" type="xsd:QName"/>
990             <xsd:attribute name="groupName" type="xsd:string"/>
991             <xsd:attribute name="propertyOrder" type="xsd:int"/>
992         </xsd:complexType>
993     </xsd:element>
994     <xsd:element name="GroupedProperty">
995         <xsd:annotation>
996             <xsd:documentation xml:lang="en-US">Some attributes in a element are mutually exclusive, so in the UI, for unambiguous usage, the user may want to add a single property chooser for 2 or more attributes, which will set the appropriate attribute depending on some criteria that the customizer may determine.
997                 groupedAttributeNames : specify all the mutually exclusive attributes. There will be a single customizer for all these attributes.
998                 groupName : specifies which PropertyGroup this belongs to.
999                 propertyOrder : specifies the order in the PropertyGroup where this property would be placed.
1000                displayName: specifies the Display name of the combined chooser.
1001            </xsd:documentation>
1002        </xsd:annotation>
1003        <xsd:complexType>
1004            <xsd:choice>
1005                <xsd:element name="BuiltInCustomizer" >
1006                    <xsd:annotation>
1007                        <xsd:documentation xml:lang="en-US">To use pre-built customizers.
1008                        </xsd:documentation>
1009                    </xsd:annotation>
1010                    <xsd:complexType>
1011                        <xsd:choice>
1012                            <xsd:element name="ElementOrTypeChooser">
1013                                <xsd:annotation>
1014                                    <xsd:documentation xml:lang="en-US">Shows a Tree based selector, which shows all the elements/types from Inline/Imported schemas.
1015                                        elementAttributeName : the attribute on which GlobalElement data type would be set.
1016                                        typeAttributeName : the attribute on which GlobalType data type would be set.
1017                                    </xsd:documentation>
1018                                </xsd:annotation>
1019                                <xsd:complexType>
1020                                    <xsd:attribute name="elementAttributeName" type="xsd:NCName"/>
1021                                    <xsd:attribute name="typeAttributeName" type="xsd:NCName"/>
1022                                </xsd:complexType>
1023                            </xsd:element>
1024                            <xsd:element name="ElementOrTypeOrMessagePartChooser">
1025                                <xsd:annotation>
1026                                    <xsd:documentation xml:lang="en-US">Shows a Tree based selector, which shows all the elements/types from Inline/Imported schemas and also the messages from all imported and existing wsdls.
1027                                        elementAttributeName : the attribute on which GlobalElement data type would be set.
1028                                        typeAttributeName : the attribute on which GlobalType data type would be set.
1029                                        messageAttributeName : the attribute on which Message data type would be set.
1030                                        partAttributeName : the attribute on which part would be set.
1031                                        This chooser can select between a GlobalElement or GlobalType or a wsdl Part.
1032                                        
1033                                    </xsd:documentation>
1034                                </xsd:annotation>
1035                                <xsd:complexType>
1036                                    <xsd:attribute name="elementAttributeName" type="xsd:NCName"/>
1037                                    <xsd:attribute name="typeAttributeName" type="xsd:NCName"/>
1038                                    <xsd:attribute name="messageAttributeName" type="xsd:NCName"/>
1039                                    <xsd:attribute name="partAttributeName" type="xsd:NCName"/>
1040                                </xsd:complexType>
1041                            </xsd:element>
1042                        </xsd:choice>
1043                    </xsd:complexType>
1044                </xsd:element>
1045                <xsd:element ref="tns:NewCustomizer"/>
1046            </xsd:choice>
1047            <xsd:attribute name="groupedAttributeNames" type="tns:attributeList" use="required"/>
1048            <xsd:attribute name="groupName" type="xsd:string"/>
1049            <xsd:attribute name="propertyOrder" type="xsd:int"/>
1050            <xsd:attribute name="displayName" type="xsd:NCName" use="required"/>
1051        </xsd:complexType>
1052    </xsd:element>
1053    
1054    
1055    <xsd:element name="NewCustomizer">
1056        <xsd:annotation>
1057            <xsd:documentation xml:lang="en-US">Provides a way for developer to provide a custom property customizer for the attribute, if the builtin chooser dont satisfy their requirements.
1058When using this the developer has to implement the SPI org.netbeans.modules.xml.wsdl.ui.spi.WSDLLookupProvider, and add a implementation of org.netbeans.modules.xml.wsdl.ui.spi.NewCustomizerProvider, which will provide the custom Node.Property to be shown in the wsdl editor property sheet.
1059            </xsd:documentation>
1060        </xsd:annotation>
1061    </xsd:element>
1062    
1063    
1064    <xsd:simpleType name="builtInCustomizerTypes">
1065        <xsd:restriction base="xsd:string">
1066            <xsd:enumeration value="MessageChooser">
1067                <xsd:annotation>
1068                    <xsd:documentation xml:lang="en-US">Shows a drop down of all messages in the current WSDL document and also ones in imported WSDL documents.</xsd:documentation>
1069                </xsd:annotation>
1070            </xsd:enumeration>
1071            <xsd:enumeration value="PartChooser">
1072                <xsd:annotation>
1073                    <xsd:documentation xml:lang="en-US">Show a drop down of all parts for a message. By default, the chooser assumes that it is in the binding section under input/output/fault, and shows all the parts for the message selected in the input/output/fault.
1074    If not, then the dependsOnCustomizer needs to be used to specify the attribute which represents the message, whose parts will be shown</xsd:documentation>
1075                </xsd:annotation>
1076            </xsd:enumeration>
1077            <xsd:enumeration value="PortTypeChooser">
1078                <xsd:annotation>
1079                    <xsd:documentation xml:lang="en-US">Show a drop down of all port types in the WSDL Document/Imported WSDL Documents.</xsd:documentation>
1080                </xsd:annotation>
1081            </xsd:enumeration>
1082            <xsd:enumeration value="PartsChooser">
1083                <xsd:annotation>
1084                    <xsd:documentation xml:lang="en-US">Show a dialog of all parts for a message, from which multiple parts can be selected. By default, the chooser assumes that it is in the binding section under input/output/fault, and shows all the parts for the message selected in the input/output/fault.
1085    If not, then the dependsOnCustomizer needs to be used to specify the attribute which represents the message, whose parts will be shown</xsd:documentation>
1086                </xsd:annotation>
1087            </xsd:enumeration>
1088        </xsd:restriction>
1089    </xsd:simpleType>
1090    
1091    <xsd:simpleType name="attributeList">
1092        <xsd:list itemType="xsd:string"/>
1093    </xsd:simpleType>
1094    
1095</xsd:schema>
1096
1097*/

1098
Popular Tags