KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > customization > model > impl > JAXWSQName


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  * JAXWSQName.java
21  *
22  * Created on February 22, 2006, 8:39 PM
23  *
24  * To change this template, choose Tools | Template Manager
25  * and open the template in the editor.
26  */

27
28 package org.netbeans.modules.websvc.customization.model.impl;
29
30 import java.util.HashSet JavaDoc;
31 import java.util.Set JavaDoc;
32 import javax.xml.namespace.QName JavaDoc;
33
34 /**
35  *
36  * @author Roderico Cruz
37  */

38 public enum JAXWSQName {
39     BINDINGS(createJAXWSQName("bindings")),
40     PACKAGE(createJAXWSQName("package")),
41     CLASS(createJAXWSQName("class")),
42     ENABLEWRAPPERSTYLE(createJAXWSQName("enableWrapperStyle")),
43     ENABLEASYNCMAPPING(createJAXWSQName("enableAsyncMapping")),
44     ENABLEMIMECONTENT(createJAXWSQName("enableMIMEContent")),
45     JAVAEXCEPTION(createJAXWSQName("exception")),
46     METHOD(createJAXWSQName("method")),
47     PARAMETER(createJAXWSQName("parameter")),
48     JAVADOC(createJAXWSQName("javadoc")),
49     PROVIDER(createJAXWSQName("provider"));
50     
51     public static final String JavaDoc JAXWS_NS_URI = "http://java.sun.com/xml/ns/jaxws";
52     public static final String JavaDoc JAXWS_NS_PREFIX = "jaxws";
53     
54     public static QName JavaDoc createJAXWSQName(String JavaDoc localName){
55         return new QName JavaDoc(JAXWS_NS_URI, localName, JAXWS_NS_PREFIX);
56     }
57     
58     JAXWSQName(QName JavaDoc name) {
59         qName = name;
60     }
61     
62     public QName JavaDoc getQName(){
63         return qName;
64     }
65     private static Set JavaDoc<QName JavaDoc> qnames = null;
66     public static Set JavaDoc<QName JavaDoc> getQNames() {
67         if (qnames == null) {
68             qnames = new HashSet JavaDoc<QName JavaDoc>();
69             for (JAXWSQName wq : values()) {
70                 qnames.add(wq.getQName());
71             }
72         }
73         return qnames;
74     }
75     private final QName JavaDoc qName;
76
77 }
78
Popular Tags