01: /*
02: * The contents of this file are subject to the terms of the Common Development
03: * and Distribution License (the License). You may not use this file except in
04: * compliance with the License.
05: *
06: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
07: * or http://www.netbeans.org/cddl.txt.
08: *
09: * 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.wsdlextensions.jms;
21:
22: import java.util.HashSet;
23: import java.util.Set;
24: import javax.xml.namespace.QName;
25:
26: /**
27: * JMSQName
28: *
29: */
30: public enum JMSQName {
31: ADDRESS(createJMSQName("address")), BINDING(
32: createJMSQName("binding")), FAULT(createJMSQName("fault")), OPERATION(
33: createJMSQName("operation")), MESSAGE(
34: createJMSQName("message")), OPTIONS(
35: createJMSQName("options")), OPTION(createJMSQName("option")), MAPMESSAGE(
36: createJMSQName("mapmessage")), MAPPART(
37: createJMSQName("mappart")), PROPERTIES(
38: createJMSQName("properties")), PROPERTY(
39: createJMSQName("property")), JNDIENV(
40: createJMSQName("jndienv")), JNDIENVENTRY(
41: createJMSQName("jndienventry"));
42:
43: public static final String JMS_NS_URI = "http://schemas.sun.com/jbi/wsdl-extensions/jms/";
44: public static final String JMS_NS_PREFIX = "jms";
45:
46: public static QName createJMSQName(String localName) {
47: return new QName(JMS_NS_URI, localName, JMS_NS_PREFIX);
48: }
49:
50: JMSQName(QName name) {
51: qName = name;
52: }
53:
54: public QName getQName() {
55: return qName;
56: }
57:
58: private static Set<QName> qnames = null;
59:
60: public static Set<QName> getQNames() {
61: if (qnames == null) {
62: qnames = new HashSet<QName>();
63: for (JMSQName wq : values()) {
64: qnames.add(wq.getQName());
65: }
66: }
67: return qnames;
68: }
69:
70: private final QName qName;
71: }
|