1 19 20 21 package org.netbeans.modules.websvc.wsitmodelext.addressing; 22 23 import javax.xml.namespace.QName ; 24 import java.util.HashSet ; 25 import java.util.Set ; 26 27 31 public enum AddressingQName { 32 ENDPOINTREFERENCE(createAddressingQName("EndpointReference")), ADDRESS(createAddressingQName("Address")), REFERENCEPROPERTIES(createAddressingQName("ReferenceProperties")), REFERENCEPARAMETERS(createAddressingQName("ReferenceParameters")), SERVICENAME(createAddressingQName("ServiceName")), PORTTYPE(createAddressingQName("PortType")); 39 public static final String ADDRESSING_NS_URI = "http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"; public static final String ADDRESSING_NS_PREFIX = "wsa"; 42 public static QName createAddressingQName(String localName){ 43 return new QName (ADDRESSING_NS_URI, localName, ADDRESSING_NS_PREFIX); 44 } 45 46 AddressingQName(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 (AddressingQName wq : values()) { 58 qnames.add(wq.getQName()); 59 } 60 } 61 return qnames; 62 } 63 private final QName qName; 64 65 } 66 | Popular Tags |