KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > wsdl > model > impl > TypeCollection


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-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.wsdl.model.impl;
21
22 import java.util.ArrayList JavaDoc;
23 import java.util.Collection JavaDoc;
24 import org.netbeans.modules.xml.wsdl.model.Binding;
25 import org.netbeans.modules.xml.wsdl.model.BindingInput;
26 import org.netbeans.modules.xml.wsdl.model.BindingOutput;
27 import org.netbeans.modules.xml.wsdl.model.Documentation;
28 import org.netbeans.modules.xml.wsdl.model.ExtensibilityElement;
29 import org.netbeans.modules.xml.wsdl.model.Import;
30 import org.netbeans.modules.xml.wsdl.model.Input;
31 import org.netbeans.modules.xml.wsdl.model.Message;
32 import org.netbeans.modules.xml.wsdl.model.Output;
33 import org.netbeans.modules.xml.wsdl.model.PortType;
34 import org.netbeans.modules.xml.wsdl.model.Types;
35 import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
36
37 /**
38  *
39  * @author nn136682
40  */

41 public enum TypeCollection {
42     ALL(createAll()),
43     DOCUMENTATION(createDocumentation()),
44     DOCUMENTATION_EE(createDocumentationEE()),
45     FOR_IMPORT(createListForImport()),
46     FOR_TYPES(createListForTypes()),
47     FOR_MESSAGE(createListForMessage()),
48     FOR_PORTTYPE(createListForPortType()),
49     FOR_BINDING(createListForBinding()),
50     FOR_SERVICE(createListForService()),
51     DOCUMENTATION_OUTPUT(createDocumentationOutputList()),
52     DOCUMENTATION_INPUT(createDocumentationInputList()),
53     DOCUMENTATION_EXTENSIBILITY_BINDINGINPUT(createListForBindingInput()),
54     DOCUMENTATION_EXTENSIBILITY_BINDINGOUTPUT(createListForBindingOutput());
55     
56     private Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> types;
57     TypeCollection(Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> types) {
58         this.types = types;
59     }
60     public Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> types() { return types; }
61     
62     static Collection JavaDoc <Class JavaDoc<? extends WSDLComponent>> createAll() {
63         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
64         c.add(WSDLComponent.class);
65         return c;
66     }
67     
68     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createDocumentation() {
69         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
70         c.add(Documentation.class);
71         return c;
72     }
73     
74     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createDocumentationEE() {
75         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
76         c.add(Documentation.class);
77         c.add(ExtensibilityElement.class);
78         return c;
79     }
80     
81     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createListForImport() {
82         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
83         c.add(Documentation.class);
84         return c;
85     }
86
87     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createListForTypes() {
88         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
89         c.add(Documentation.class);
90         c.add(Import.class);
91         return c;
92     }
93
94     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createListForMessage() {
95         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
96         c.add(Documentation.class);
97         c.add(Import.class);
98         c.add(Types.class);
99         return c;
100     }
101
102     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createListForPortType() {
103         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
104         c.add(Documentation.class);
105         c.add(Import.class);
106         c.add(Types.class);
107         c.add(Message.class);
108         return c;
109     }
110
111     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createListForBinding() {
112         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
113         c.add(Documentation.class);
114         c.add(Import.class);
115         c.add(Types.class);
116         c.add(Message.class);
117         c.add(PortType.class);
118         return c;
119     }
120
121     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createListForService() {
122         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
123         c.add(Documentation.class);
124         c.add(Import.class);
125         c.add(Types.class);
126         c.add(Message.class);
127         c.add(PortType.class);
128         c.add(Binding.class);
129         return c;
130     }
131
132     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createDocumentationOutputList() {
133         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
134         c.add(Documentation.class);
135         c.add(Output.class);
136         return c;
137     }
138
139     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createDocumentationInputList() {
140         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
141         c.add(Documentation.class);
142         c.add(Input.class);
143         return c;
144     }
145
146     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createListForBindingInput() {
147         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
148         c.add(Documentation.class);
149         c.add(ExtensibilityElement.class);
150         c.add(BindingInput.class);
151         return c;
152     }
153     
154     static Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> createListForBindingOutput() {
155         Collection JavaDoc<Class JavaDoc<? extends WSDLComponent>> c = new ArrayList JavaDoc<Class JavaDoc<? extends WSDLComponent>>();
156         c.add(Documentation.class);
157         c.add(ExtensibilityElement.class);
158         c.add(BindingInput.class);
159         c.add(BindingOutput.class);
160         return c;
161     }
162 }
163
Popular Tags