KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > wsdl > model > extensions > bpel > BPELQName


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 package org.netbeans.modules.xml.wsdl.model.extensions.bpel;
21
22 import java.util.HashSet JavaDoc;
23 import java.util.Set JavaDoc;
24 import javax.xml.namespace.QName JavaDoc;
25
26 /**
27  *
28  * @author Nam Nguyen
29  *
30  * changed by
31  * @author ads
32  */

33 public enum BPELQName {
34     PROPERTY(createVarpropQName("property")),
35     PARTNER_LINK_TYPE(createPLNKQName("partnerLinkType")),
36     ROLE(createPLNKQName("role")),
37     PROPERTY_ALIAS(createVarpropQName("propertyAlias")),
38     QUERY(createVarpropQName("query")),
39     DOCUMENTATION_PLNK(createPLNKQName("documentation")),
40     DOCUMENTATION_VARPROP(createVarpropQName("documentation"))
41     ;
42     
43     public static final String JavaDoc VARPROP_NS = //"http://schemas.xmlsoap.org/ws/2004/03/business-process/";
44
"http://docs.oasis-open.org/wsbpel/2.0/varprop"; // NOI18N
45
public static final String JavaDoc VPROP_PREFIX = "vprop";
46     public static final String JavaDoc PLNK_NS = //"http://schemas.xmlsoap.org/ws/2004/03/partner-link/";
47
"http://docs.oasis-open.org/wsbpel/2.0/plnktype"; // NOI18N
48
public static final String JavaDoc PLNK_PREFIX = "plnk";
49     
50     public static QName JavaDoc createVarpropQName(String JavaDoc localName){
51         return new QName JavaDoc(VARPROP_NS, localName, VPROP_PREFIX);
52     }
53     public static QName JavaDoc createPLNKQName(String JavaDoc localName){
54         return new QName JavaDoc(PLNK_NS, localName, PLNK_PREFIX);
55     }
56     
57     BPELQName(QName JavaDoc name) {
58         qName = name;
59     }
60     
61     public QName JavaDoc getQName(){
62         return qName;
63     }
64     
65     
66     public static Set JavaDoc<QName JavaDoc> getQNames() {
67         if (myQnames == null) {
68             Set JavaDoc<QName JavaDoc> qnames = new HashSet JavaDoc<QName JavaDoc>();
69             for (BPELQName bq : values()) {
70                 qnames.add(bq.getQName());
71             }
72             myQnames = qnames;
73         }
74         return myQnames;
75     }
76     
77     private static Set JavaDoc<QName JavaDoc> myQnames = null;
78     
79     private final QName JavaDoc qName;
80 }
81
Popular Tags