KickJava   Java API By Example, From Geeks To Geeks.

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


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 GroupedProperty
22  * matches the schema element 'GroupedProperty'.
23  * The root bean class is ElementProperties
24  *
25  * ===============================================================
26  * 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.
27  * groupedAttributeNames : specify all the mutually exclusive attributes. There will be a single customizer for all these attributes.
28  * groupName : specifies which PropertyGroup this belongs to.
29  * propertyOrder : specifies the order in the PropertyGroup where this property would be placed.
30  * displayName: specifies the Display name of the combined chooser.
31  *
32  * ===============================================================
33  * Generated on Mon Feb 05 17:54:51 PST 2007
34  * @Generated
35  */

36
37 package org.netbeans.modules.xml.wsdl.ui.property.model;
38
39 public class GroupedProperty {
40     public static final String JavaDoc GROUPEDATTRIBUTENAMES = "GroupedAttributeNames"; // NOI18N
41
public static final String JavaDoc GROUPNAME = "GroupName"; // NOI18N
42
public static final String JavaDoc PROPERTYORDER = "PropertyOrder"; // NOI18N
43
public static final String JavaDoc DISPLAYNAME = "DisplayName"; // NOI18N
44
public static final String JavaDoc BUILTINCUSTOMIZER = "BuiltInCustomizer"; // NOI18N
45
public static final String JavaDoc NEWCUSTOMIZER = "NewCustomizer"; // NOI18N
46

47     private java.lang.String JavaDoc _GroupedAttributeNames;
48     private java.lang.String JavaDoc _GroupName;
49     private int _PropertyOrder;
50     private java.lang.String JavaDoc _DisplayName;
51     private BuiltInCustomizerGroupedProperty _BuiltInCustomizer;
52     private String JavaDoc _NewCustomizer;
53
54     /**
55      * Normal starting point constructor.
56      */

57     public GroupedProperty() {
58         _GroupedAttributeNames = "";
59         _DisplayName = "";
60     }
61
62     /**
63      * Required parameters constructor
64      */

65     public GroupedProperty(java.lang.String JavaDoc groupedAttributeNames, java.lang.String JavaDoc displayName) {
66         _GroupedAttributeNames = groupedAttributeNames;
67         _DisplayName = displayName;
68     }
69
70     /**
71      * Deep copy
72      */

73     public GroupedProperty(org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty source) {
74         this(source, false);
75     }
76
77     /**
78      * Deep copy
79      * @param justData just copy the XML relevant data
80      */

81     public GroupedProperty(org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty source, boolean justData) {
82         _GroupedAttributeNames = source._GroupedAttributeNames;
83         _GroupName = source._GroupName;
84         _PropertyOrder = source._PropertyOrder;
85         _DisplayName = source._DisplayName;
86         _BuiltInCustomizer = (source._BuiltInCustomizer == null) ? null : newBuiltInCustomizerGroupedProperty(source._BuiltInCustomizer, justData);
87         _NewCustomizer = source._NewCustomizer;
88     }
89
90     // This attribute is mandatory
91
public void setGroupedAttributeNames(java.lang.String JavaDoc value) {
92         _GroupedAttributeNames = value;
93     }
94
95     public java.lang.String JavaDoc getGroupedAttributeNames() {
96         return _GroupedAttributeNames;
97     }
98
99     // This attribute is optional
100
public void setGroupName(java.lang.String JavaDoc value) {
101         _GroupName = value;
102     }
103
104     public java.lang.String JavaDoc getGroupName() {
105         return _GroupName;
106     }
107
108     // This attribute is optional
109
public void setPropertyOrder(int value) {
110         _PropertyOrder = value;
111     }
112
113     public int getPropertyOrder() {
114         return _PropertyOrder;
115     }
116
117     // This attribute is mandatory
118
public void setDisplayName(java.lang.String JavaDoc value) {
119         _DisplayName = value;
120     }
121
122     public java.lang.String JavaDoc getDisplayName() {
123         return _DisplayName;
124     }
125
126     // This attribute is mandatory
127
public void setBuiltInCustomizer(org.netbeans.modules.xml.wsdl.ui.property.model.BuiltInCustomizerGroupedProperty value) {
128         _BuiltInCustomizer = value;
129         if (value != null) {
130             // It's a mutually exclusive property.
131
setNewCustomizer(null);
132         }
133     }
134
135     public org.netbeans.modules.xml.wsdl.ui.property.model.BuiltInCustomizerGroupedProperty getBuiltInCustomizer() {
136         return _BuiltInCustomizer;
137     }
138
139     // This attribute is mandatory
140
public void setNewCustomizer(String JavaDoc value) {
141         _NewCustomizer = value;
142         if (value != null) {
143             // It's a mutually exclusive property.
144
setBuiltInCustomizer(null);
145         }
146     }
147
148     public String JavaDoc getNewCustomizer() {
149         return _NewCustomizer;
150     }
151
152     /**
153      * Create a new bean using it's default constructor.
154      * This does not add it to any bean graph.
155      */

156     public org.netbeans.modules.xml.wsdl.ui.property.model.BuiltInCustomizerGroupedProperty newBuiltInCustomizerGroupedProperty() {
157         return new org.netbeans.modules.xml.wsdl.ui.property.model.BuiltInCustomizerGroupedProperty();
158     }
159
160     /**
161      * Create a new bean, copying from another one.
162      * This does not add it to any bean graph.
163      */

164     public org.netbeans.modules.xml.wsdl.ui.property.model.BuiltInCustomizerGroupedProperty newBuiltInCustomizerGroupedProperty(BuiltInCustomizerGroupedProperty source, boolean justData) {
165         return new org.netbeans.modules.xml.wsdl.ui.property.model.BuiltInCustomizerGroupedProperty(source, justData);
166     }
167
168     public void writeNode(java.io.Writer JavaDoc out) throws java.io.IOException JavaDoc {
169         String JavaDoc myName;
170         myName = "GroupedProperty";
171         writeNode(out, myName, ""); // NOI18N
172
}
173
174     public void writeNode(java.io.Writer JavaDoc out, String JavaDoc nodeName, String JavaDoc indent) throws java.io.IOException JavaDoc {
175         writeNode(out, nodeName, null, indent, new java.util.HashMap JavaDoc());
176     }
177
178     /**
179      * It's not recommended to call this method directly.
180      */

181     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 {
182         out.write(indent);
183         out.write("<");
184         if (namespace != null) {
185             out.write((String JavaDoc)namespaceMap.get(namespace));
186             out.write(":");
187         }
188         out.write(nodeName);
189         writeNodeAttributes(out, nodeName, namespace, indent, namespaceMap);
190         out.write(">\n");
191         writeNodeChildren(out, nodeName, namespace, indent, namespaceMap);
192         out.write(indent);
193         out.write("</");
194         if (namespace != null) {
195             out.write((String JavaDoc)namespaceMap.get(namespace));
196             out.write(":");
197         }
198         out.write(nodeName);
199         out.write(">\n");
200     }
201
202     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 {
203         // groupedAttributeNames is an attribute with namespace http://xml.netbeans.org/schema/wsdlui/property
204
if (_GroupedAttributeNames != null) {
205             out.write(" groupedAttributeNames='");
206             org.netbeans.modules.xml.wsdl.ui.property.model.ElementProperties.writeXML(out, _GroupedAttributeNames, true);
207             out.write("'"); // NOI18N
208
}
209         // groupName is an attribute with namespace http://xml.netbeans.org/schema/wsdlui/property
210
if (_GroupName != null) {
211             out.write(" groupName='");
212             org.netbeans.modules.xml.wsdl.ui.property.model.ElementProperties.writeXML(out, _GroupName, true);
213             out.write("'"); // NOI18N
214
}
215         // propertyOrder is an attribute with namespace http://xml.netbeans.org/schema/wsdlui/property
216
out.write(" propertyOrder='");
217         out.write(""+_PropertyOrder);
218         out.write("'"); // NOI18N
219
// displayName is an attribute with namespace http://xml.netbeans.org/schema/wsdlui/property
220
if (_DisplayName != null) {
221             out.write(" displayName='");
222             org.netbeans.modules.xml.wsdl.ui.property.model.ElementProperties.writeXML(out, _DisplayName, true);
223             out.write("'"); // NOI18N
224
}
225     }
226
227     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 {
228         String JavaDoc nextIndent = indent + " ";
229         if (_BuiltInCustomizer != null) {
230             _BuiltInCustomizer.writeNode(out, "BuiltInCustomizer", null, nextIndent, namespaceMap);
231         }
232         if (_NewCustomizer != null) {
233             out.write(nextIndent);
234             out.write("<NewCustomizer"); // NOI18N
235
out.write(">"); // NOI18N
236
org.netbeans.modules.xml.wsdl.ui.property.model.ElementProperties.writeXML(out, _NewCustomizer, false);
237             out.write("</NewCustomizer>\n"); // NOI18N
238
}
239     }
240
241     public void readNode(org.w3c.dom.Node JavaDoc node) {
242         readNode(node, new java.util.HashMap JavaDoc());
243     }
244
245     public void readNode(org.w3c.dom.Node JavaDoc node, java.util.Map JavaDoc namespacePrefixes) {
246         if (node.hasAttributes()) {
247             org.w3c.dom.NamedNodeMap JavaDoc attrs = node.getAttributes();
248             org.w3c.dom.Attr JavaDoc attr;
249             java.lang.String JavaDoc attrValue;
250             boolean firstNamespaceDef = true;
251             for (int attrNum = 0; attrNum < attrs.getLength(); ++attrNum) {
252                 attr = (org.w3c.dom.Attr JavaDoc) attrs.item(attrNum);
253                 String JavaDoc attrName = attr.getName();
254                 if (attrName.startsWith("xmlns:")) {
255                     if (firstNamespaceDef) {
256                         firstNamespaceDef = false;
257                         // Dup prefix map, so as to not write over previous values, and to make it easy to clear out our entries.
258
namespacePrefixes = new java.util.HashMap JavaDoc(namespacePrefixes);
259                     }
260                     String JavaDoc attrNSPrefix = attrName.substring(6, attrName.length());
261                     namespacePrefixes.put(attrNSPrefix, attr.getValue());
262                 }
263             }
264             readNodeAttributes(node, namespacePrefixes, attrs);
265         }
266         readNodeChildren(node, namespacePrefixes);
267     }
268
269     protected void readNodeAttributes(org.w3c.dom.Node JavaDoc node, java.util.Map JavaDoc namespacePrefixes, org.w3c.dom.NamedNodeMap JavaDoc attrs) {
270         org.w3c.dom.Attr JavaDoc attr;
271         java.lang.String JavaDoc attrValue;
272         attr = (org.w3c.dom.Attr JavaDoc) attrs.getNamedItem("groupedAttributeNames");
273         if (attr != null) {
274             attrValue = attr.getValue();
275             _GroupedAttributeNames = attrValue;
276         }
277         attr = (org.w3c.dom.Attr JavaDoc) attrs.getNamedItem("groupName");
278         if (attr != null) {
279             attrValue = attr.getValue();
280             _GroupName = attrValue;
281         }
282         attr = (org.w3c.dom.Attr JavaDoc) attrs.getNamedItem("propertyOrder");
283         if (attr != null) {
284             attrValue = attr.getValue();
285             _PropertyOrder = Integer.parseInt(attrValue);
286         }
287         attr = (org.w3c.dom.Attr JavaDoc) attrs.getNamedItem("displayName");
288         if (attr != null) {
289             attrValue = attr.getValue();
290             _DisplayName = attrValue;
291         }
292     }
293
294     protected void readNodeChildren(org.w3c.dom.Node JavaDoc node, java.util.Map JavaDoc namespacePrefixes) {
295         org.w3c.dom.NodeList JavaDoc children = node.getChildNodes();
296         for (int i = 0, size = children.getLength(); i < size; ++i) {
297             org.w3c.dom.Node JavaDoc childNode = children.item(i);
298             String JavaDoc childNodeName = (childNode.getLocalName() == null ? childNode.getNodeName().intern() : childNode.getLocalName().intern());
299             String JavaDoc childNodeValue = "";
300             if (childNode.getFirstChild() != null) {
301                 childNodeValue = childNode.getFirstChild().getNodeValue();
302             }
303             if (childNodeName == "BuiltInCustomizer") {
304                 _BuiltInCustomizer = newBuiltInCustomizerGroupedProperty();
305                 _BuiltInCustomizer.readNode(childNode, namespacePrefixes);
306             }
307             else if (childNodeName == "NewCustomizer") {
308                 _NewCustomizer = childNodeValue;
309             }
310             else {
311                 // Found extra unrecognized childNode
312
}
313         }
314     }
315
316     public void changePropertyByName(String JavaDoc name, Object JavaDoc value) {
317         if (name == null) return;
318         name = name.intern();
319         if (name == "groupedAttributeNames")
320             setGroupedAttributeNames((java.lang.String JavaDoc)value);
321         else if (name == "groupName")
322             setGroupName((java.lang.String JavaDoc)value);
323         else if (name == "propertyOrder")
324             setPropertyOrder(((java.lang.Integer JavaDoc)value).intValue());
325         else if (name == "displayName")
326             setDisplayName((java.lang.String JavaDoc)value);
327         else if (name == "builtInCustomizer")
328             setBuiltInCustomizer((BuiltInCustomizerGroupedProperty)value);
329         else if (name == "newCustomizer")
330             setNewCustomizer((String JavaDoc)value);
331         else
332             throw new IllegalArgumentException JavaDoc(name+" is not a valid property name for GroupedProperty");
333     }
334
335     public Object JavaDoc fetchPropertyByName(String JavaDoc name) {
336         if (name == "groupedAttributeNames")
337             return getGroupedAttributeNames();
338         if (name == "groupName")
339             return getGroupName();
340         if (name == "propertyOrder")
341             return new java.lang.Integer JavaDoc(getPropertyOrder());
342         if (name == "displayName")
343             return getDisplayName();
344         if (name == "builtInCustomizer")
345             return getBuiltInCustomizer();
346         if (name == "newCustomizer")
347             return getNewCustomizer();
348         throw new IllegalArgumentException JavaDoc(name+" is not a valid property name for GroupedProperty");
349     }
350
351     public String JavaDoc nameSelf() {
352         return "GroupedProperty";
353     }
354
355     public String JavaDoc nameChild(Object JavaDoc childObj) {
356         return nameChild(childObj, false, false);
357     }
358
359     /**
360      * @param childObj The child object to search for
361      * @param returnSchemaName Whether or not the schema name should be returned or the property name
362      * @return null if not found
363      */

364     public String JavaDoc nameChild(Object JavaDoc childObj, boolean returnConstName, boolean returnSchemaName) {
365         return nameChild(childObj, returnConstName, returnSchemaName, false);
366     }
367
368     /**
369      * @param childObj The child object to search for
370      * @param returnSchemaName Whether or not the schema name should be returned or the property name
371      * @return null if not found
372      */

373     public String JavaDoc nameChild(Object JavaDoc childObj, boolean returnConstName, boolean returnSchemaName, boolean returnXPathName) {
374         if (childObj instanceof BuiltInCustomizerGroupedProperty) {
375             BuiltInCustomizerGroupedProperty child = (BuiltInCustomizerGroupedProperty) childObj;
376             if (child == _BuiltInCustomizer) {
377                 if (returnConstName) {
378                     return BUILTINCUSTOMIZER;
379                 } else if (returnSchemaName) {
380                     return "BuiltInCustomizer";
381                 } else if (returnXPathName) {
382                     return "BuiltInCustomizer";
383                 } else {
384                     return "BuiltInCustomizer";
385                 }
386             }
387         }
388         if (childObj instanceof java.lang.Integer JavaDoc) {
389             java.lang.Integer JavaDoc child = (java.lang.Integer JavaDoc) childObj;
390             if (((java.lang.Integer JavaDoc)child).intValue() == _PropertyOrder) {
391                 if (returnConstName) {
392                     return PROPERTYORDER;
393                 } else if (returnSchemaName) {
394                     return "propertyOrder";
395                 } else if (returnXPathName) {
396                     return "@propertyOrder";
397                 } else {
398                     return "PropertyOrder";
399                 }
400             }
401         }
402         if (childObj instanceof java.lang.String JavaDoc) {
403             java.lang.String JavaDoc child = (java.lang.String JavaDoc) childObj;
404             if (child == _GroupedAttributeNames) {
405                 if (returnConstName) {
406                     return GROUPEDATTRIBUTENAMES;
407                 } else if (returnSchemaName) {
408                     return "groupedAttributeNames";
409                 } else if (returnXPathName) {
410                     return "@groupedAttributeNames";
411                 } else {
412                     return "GroupedAttributeNames";
413                 }
414             }
415             if (child == _GroupName) {
416                 if (returnConstName) {
417                     return GROUPNAME;
418                 } else if (returnSchemaName) {
419                     return "groupName";
420                 } else if (returnXPathName) {
421                     return "@groupName";
422                 } else {
423                     return "GroupName";
424                 }
425             }
426             if (child == _DisplayName) {
427                 if (returnConstName) {
428                     return DISPLAYNAME;
429                 } else if (returnSchemaName) {
430                     return "displayName";
431                 } else if (returnXPathName) {
432                     return "@displayName";
433                 } else {
434                     return "DisplayName";
435                 }
436             }
437             if (child == _NewCustomizer) {
438                 if (returnConstName) {
439                     return NEWCUSTOMIZER;
440                 } else if (returnSchemaName) {
441                     return "NewCustomizer";
442                 } else if (returnXPathName) {
443                     return "NewCustomizer";
444                 } else {
445                     return "NewCustomizer";
446                 }
447             }
448         }
449         return null;
450     }
451
452     /**
453      * Return an array of all of the properties that are beans and are set.
454      */

455     public java.lang.Object JavaDoc[] childBeans(boolean recursive) {
456         java.util.List JavaDoc children = new java.util.LinkedList JavaDoc();
457         childBeans(recursive, children);
458         java.lang.Object JavaDoc[] result = new java.lang.Object JavaDoc[children.size()];
459         return (java.lang.Object JavaDoc[]) children.toArray(result);
460     }
461
462     /**
463      * Put all child beans into the beans list.
464      */

465     public void childBeans(boolean recursive, java.util.List JavaDoc beans) {
466         if (_BuiltInCustomizer != null) {
467             if (recursive) {
468                 _BuiltInCustomizer.childBeans(true, beans);
469             }
470             beans.add(_BuiltInCustomizer);
471         }
472     }
473
474     public boolean equals(Object JavaDoc o) {
475         return o instanceof org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty && equals((org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty) o);
476     }
477
478     public boolean equals(org.netbeans.modules.xml.wsdl.ui.property.model.GroupedProperty inst) {
479         if (inst == this) {
480             return true;
481         }
482         if (inst == null) {
483             return false;
484         }
485         if (!(_GroupedAttributeNames == null ? inst._GroupedAttributeNames == null : _GroupedAttributeNames.equals(inst._GroupedAttributeNames))) {
486             return false;
487         }
488         if (!(_GroupName == null ? inst._GroupName == null : _GroupName.equals(inst._GroupName))) {
489             return false;
490         }
491         if (!(_PropertyOrder == inst._PropertyOrder)) {
492             return false;
493         }
494         if (!(_DisplayName == null ? inst._DisplayName == null : _DisplayName.equals(inst._DisplayName))) {
495             return false;
496         }
497         if (!(_BuiltInCustomizer == null ? inst._BuiltInCustomizer == null : _BuiltInCustomizer.equals(inst._BuiltInCustomizer))) {
498             return false;
499         }
500         if (!(_NewCustomizer == null ? inst._NewCustomizer == null : _NewCustomizer.equals(inst._NewCustomizer))) {
501             return false;
502         }
503         return true;
504     }
505
506     public int hashCode() {
507         int result = 17;
508         result = 37*result + (_GroupedAttributeNames == null ? 0 : _GroupedAttributeNames.hashCode());
509         result = 37*result + (_GroupName == null ? 0 : _GroupName.hashCode());
510         result = 37*result + (_PropertyOrder);
511         result = 37*result + (_DisplayName == null ? 0 : _DisplayName.hashCode());
512         result = 37*result + (_BuiltInCustomizer == null ? 0 : _BuiltInCustomizer.hashCode());
513         result = 37*result + (_NewCustomizer == null ? 0 : _NewCustomizer.hashCode());
514         return result;
515     }
516
517 }
518
519
520 /*
521         The following schema file has been used for generation:
522
523 <?xml version="1.0" encoding="UTF-8"?>
524
525 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
526             targetNamespace="http://xml.netbeans.org/schema/wsdlui/property"
527             xmlns:tns="http://xml.netbeans.org/schema/wsdlui/property"
528             elementFormDefault="qualified">
529     <xsd:element name="ElementProperties">
530         <xsd:annotation>
531             <xsd:documentation xml:lang="en-US">Root node for specifying customizers for a element.
532                 This needs to be on the GlobalElement which would represent the node in the WSDL tree.
533             If this is defined in local elements it is ignored.</xsd:documentation>
534         </xsd:annotation>
535         <xsd:complexType>
536             <xsd:sequence>
537                 <xsd:element ref="tns:PropertyGroup" maxOccurs="unbounded" />
538                 <xsd:element ref="tns:Property" maxOccurs="unbounded" />
539                 <xsd:element ref="tns:GroupedProperty" maxOccurs="unbounded" />
540             </xsd:sequence>
541         </xsd:complexType>
542     </xsd:element>
543     
544     <xsd:element name="PropertyGroup">
545         <xsd:annotation>
546             <xsd:documentation xml:lang="en-US">Used to create groups in the property sheet.
547                 By default, if no groups are defined all the properties will be shown
548                 in the default Property sheet called "Properties".
549                 name : defines the name of the Group.
550                 groupOrder : defines the order in which the groups will be created. The groupOrder starts with 1.
551                 isDefault : overrides the default property sheet to be this group rather than "Properties".
552                 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.
553                 
554                 
555             </xsd:documentation>
556         </xsd:annotation>
557         <xsd:complexType>
558             <xsd:attribute name="name" type="xsd:string" use="required"/>
559             <xsd:attribute name="groupOrder" type="xsd:int"/>
560             <xsd:attribute name="isDefault" type="xsd:boolean" default="false"/>
561         </xsd:complexType>
562     </xsd:element>
563     <xsd:element name="Property">
564         <xsd:annotation>
565             <xsd:documentation xml:lang="en-US">Property represents each attribute that would be created for the Node in the wsdleditor tree.
566                 It defines a way to specify customizers for attributes.
567                 There are 3 types of Property customizers:
568                 SchemaCustomizer : The default Customizer is the SchemaCustomizer, which shows drop downs for enumerations and boolean attributes,
569                 and String customizer for all other types. So if there is no Property defined for a attribute, it will have
570                 SchemaCustomizer.
571                 BuiltInCustomizer : specifies a way to put already defined customizer to be shown. Examples are part chooser, message chooser etc.
572                 NewCustomizer : provides a way to create a custom customizer specific to the user requirement. When using this the developer has
573                 to implement the SPI org.netbeans.modules.xml.wsdl.ui.spi.WSDLLookupProvider, and add a implementation of
574                 org.netbeans.modules.xml.wsdl.ui.spi.NewCustomizerProvider, which will provide the custom Node.Property to be shown in the
575                 wsdl editor property sheet.
576             </xsd:documentation>
577         </xsd:annotation>
578         <xsd:complexType>
579             <xsd:choice>
580                 <xsd:element name="SchemaCustomizer"/>
581                 <xsd:element name="BuiltInCustomizer">
582                     <xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema">
583                         <xsd:choice>
584                             <xsd:element name="DependsOnCustomizer">
585                                 <xsd:annotation>
586                                     <xsd:documentation xml:lang="en-US">Use a built-in customizer whose value(s) depend on some other attribute
587                                         of the the same element or some other source.
588                                     </xsd:documentation>
589                                 </xsd:annotation>
590                                 <xsd:complexType>
591                                     <xsd:choice>
592                                         <xsd:element name="StaticCustomizer">
593                                             <xsd:annotation>
594                                                 <xsd:documentation xml:lang="en-US">dependsOnAttributeName : the attribute on which the value(s) of the chooser would depend on.
595                                                     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.
596                                                     In that the dependsOnAttributeName for PartChooser would be message.
597                                                 </xsd:documentation>
598                                             </xsd:annotation>
599                                             <xsd:complexType>
600                                                 <xsd:attribute name="dependsOnAttributeName" type="xsd:QName"/>
601                                             </xsd:complexType>
602                                         </xsd:element>
603                                         <!--No use case as of yet, xsd:element name="DynamicCustomizer">
604                                             <xsd:annotation>
605                                                 <xsd:documentation xml:lang="en-US">
606                                                     
607                                                 </xsd:documentation>
608                                             </xsd:annotation>
609                                             <xsd:complexType>
610                                                 <xsd:attribute name="dependsOnAttributeValueType" type="xsd:string"/>
611                                                 <xsd:attribute name="attributeValueProviderClass" type="xsd:string"/>
612                                             </xsd:complexType>
613                                         </xsd:element-->
614                                     </xsd:choice>
615                                     <xsd:attribute name="name" type="tns:builtInCustomizerTypes"/>
616                                 </xsd:complexType>
617                             </xsd:element>
618                             <xsd:element name="SimpleCustomizer">
619                                 <xsd:annotation>
620                                     <xsd:documentation xml:lang="en-US">
621                                         Use the builtin chooser that are available (the names are defined under builtInCustomizerTypes simple type as enumerations,
622                                         name: specifies which builtin chooser to use.
623                                     </xsd:documentation>
624                                 </xsd:annotation>
625                                 <xsd:complexType xmlns:xsd="http://www.w3.org/2001/XMLSchema">
626                                     <xsd:sequence/>
627                                     <xsd:attribute name="name" type="tns:builtInCustomizerTypes"/>
628                                 </xsd:complexType>
629                             </xsd:element>
630                         </xsd:choice>
631                     </xsd:complexType>
632                 </xsd:element>
633                 <xsd:element ref="tns:NewCustomizer"/>
634             </xsd:choice>
635             <xsd:attribute name="attributeName" type="xsd:string" use="required"/>
636             <xsd:attribute name="isNameableAttribute" type="xsd:boolean" default="false"/>
637             <xsd:attribute name="decoratorAttribute" type="xsd:QName"/>
638             <xsd:attribute name="groupName" type="xsd:string"/>
639             <xsd:attribute name="propertyOrder" type="xsd:int"/>
640         </xsd:complexType>
641     </xsd:element>
642     <xsd:element name="GroupedProperty">
643         <xsd:annotation>
644             <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.
645                 groupedAttributeNames : specify all the mutually exclusive attributes. There will be a single customizer for all these attributes.
646                 groupName : specifies which PropertyGroup this belongs to.
647                 propertyOrder : specifies the order in the PropertyGroup where this property would be placed.
648                 displayName: specifies the Display name of the combined chooser.
649             </xsd:documentation>
650         </xsd:annotation>
651         <xsd:complexType>
652             <xsd:choice>
653                 <xsd:element name="BuiltInCustomizer" >
654                     <xsd:annotation>
655                         <xsd:documentation xml:lang="en-US">To use pre-built customizers.
656                         </xsd:documentation>
657                     </xsd:annotation>
658                     <xsd:complexType>
659                         <xsd:choice>
660                             <xsd:element name="ElementOrTypeChooser">
661                                 <xsd:annotation>
662                                     <xsd:documentation xml:lang="en-US">Shows a Tree based selector, which shows all the elements/types from Inline/Imported schemas.
663                                         elementAttributeName : the attribute on which GlobalElement data type would be set.
664                                         typeAttributeName : the attribute on which GlobalType data type would be set.
665                                     </xsd:documentation>
666                                 </xsd:annotation>
667                                 <xsd:complexType>
668                                     <xsd:attribute name="elementAttributeName" type="xsd:NCName"/>
669                                     <xsd:attribute name="typeAttributeName" type="xsd:NCName"/>
670                                 </xsd:complexType>
671                             </xsd:element>
672                             <xsd:element name="ElementOrTypeOrMessagePartChooser">
673                                 <xsd:annotation>
674                                     <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.
675                                         elementAttributeName : the attribute on which GlobalElement data type would be set.
676                                         typeAttributeName : the attribute on which GlobalType data type would be set.
677                                         messageAttributeName : the attribute on which Message data type would be set.
678                                         partAttributeName : the attribute on which part would be set.
679                                         This chooser can select between a GlobalElement or GlobalType or a wsdl Part.
680                                         
681                                     </xsd:documentation>
682                                 </xsd:annotation>
683                                 <xsd:complexType>
684                                     <xsd:attribute name="elementAttributeName" type="xsd:NCName"/>
685                                     <xsd:attribute name="typeAttributeName" type="xsd:NCName"/>
686                                     <xsd:attribute name="messageAttributeName" type="xsd:NCName"/>
687                                     <xsd:attribute name="partAttributeName" type="xsd:NCName"/>
688                                 </xsd:complexType>
689                             </xsd:element>
690                         </xsd:choice>
691                     </xsd:complexType>
692                 </xsd:element>
693                 <xsd:element ref="tns:NewCustomizer"/>
694             </xsd:choice>
695             <xsd:attribute name="groupedAttributeNames" type="tns:attributeList" use="required"/>
696             <xsd:attribute name="groupName" type="xsd:string"/>
697             <xsd:attribute name="propertyOrder" type="xsd:int"/>
698             <xsd:attribute name="displayName" type="xsd:NCName" use="required"/>
699         </xsd:complexType>
700     </xsd:element>
701     
702     
703     <xsd:element name="NewCustomizer">
704         <xsd:annotation>
705             <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.
706 When 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.
707             </xsd:documentation>
708         </xsd:annotation>
709     </xsd:element>
710     
711     
712     <xsd:simpleType name="builtInCustomizerTypes">
713         <xsd:restriction base="xsd:string">
714             <xsd:enumeration value="MessageChooser">
715                 <xsd:annotation>
716                     <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>
717                 </xsd:annotation>
718             </xsd:enumeration>
719             <xsd:enumeration value="PartChooser">
720                 <xsd:annotation>
721                     <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.
722     If not, then the dependsOnCustomizer needs to be used to specify the attribute which represents the message, whose parts will be shown</xsd:documentation>
723                 </xsd:annotation>
724             </xsd:enumeration>
725             <xsd:enumeration value="PortTypeChooser">
726                 <xsd:annotation>
727                     <xsd:documentation xml:lang="en-US">Show a drop down of all port types in the WSDL Document/Imported WSDL Documents.</xsd:documentation>
728                 </xsd:annotation>
729             </xsd:enumeration>
730             <xsd:enumeration value="PartsChooser">
731                 <xsd:annotation>
732                     <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.
733     If not, then the dependsOnCustomizer needs to be used to specify the attribute which represents the message, whose parts will be shown</xsd:documentation>
734                 </xsd:annotation>
735             </xsd:enumeration>
736         </xsd:restriction>
737     </xsd:simpleType>
738     
739     <xsd:simpleType name="attributeList">
740         <xsd:list itemType="xsd:string"/>
741     </xsd:simpleType>
742     
743 </xsd:schema>
744
745 */

746
Popular Tags