1 19 20 21 package org.netbeans.modules.websvc.wsitmodelext.policy; 22 23 import javax.xml.namespace.QName ; 24 import java.util.HashSet ; 25 import java.util.Set ; 26 27 31 public enum PolicyQName { 32 ALL(createPolicyQName("All")), EXACTLYONE(createPolicyQName("ExactlyOne")), POLICYREFERENCE(createPolicyQName("PolicyReference")), OPTIONAL(createPolicyQName("Optional")), POLICY(createPolicyQName("Policy")); 38 public static final String POLICY_NS_URI = 39 "http://schemas.xmlsoap.org/ws/2004/09/policy"; public static final String POLICY_NS_PREFIX = "wsp"; 42 public static QName createPolicyQName(String localName){ 43 return new QName (POLICY_NS_URI, localName, POLICY_NS_PREFIX); 44 } 45 46 PolicyQName(QName name) { 47 qName = name; 48 } 49 50 public QName getQName(){ 51 return qName; 52 } 53 private static Set <QName > qnames = null; 54 public static Set <QName > getQNames() { 55 if (qnames == null) { 56 qnames = new HashSet <QName >(); 57 for (PolicyQName wq : values()) { 58 qnames.add(wq.getQName()); 59 } 60 } 61 return qnames; 62 } 63 private final QName qName; 64 65 } 66 | Popular Tags |