1 19 20 package org.netbeans.modules.websvc.wsitmodelext.addressing; 21 22 import org.netbeans.modules.websvc.wsitmodelext.addressing.impl.Address10Impl; 23 import org.netbeans.modules.websvc.wsitmodelext.addressing.impl.Addressing10EndpointReferenceImpl; 24 import org.netbeans.modules.websvc.wsitmodelext.addressing.impl.Addressing10MetadataImpl; 25 import org.netbeans.modules.websvc.wsitmodelext.addressing.impl.Addressing10ReferencePropertiesImpl; 26 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 27 import org.netbeans.modules.xml.wsdl.model.spi.ElementFactory; 28 import org.w3c.dom.Element ; 29 30 import javax.xml.namespace.QName ; 31 import java.util.Collections ; 32 import java.util.Set ; 33 import org.netbeans.modules.websvc.wsitmodelext.addressing.impl.Addressing10AnonymousImpl; 34 import org.netbeans.modules.websvc.wsitmodelext.addressing.impl.Addressing10WsdlUsingAddressingImpl; 35 36 37 public class Addressing10Factories { 38 39 public static class EndpointReferenceFactory extends ElementFactory { 40 @Override 41 public Set <QName > getElementQNames() { 42 return Collections.singleton(Addressing10QName.ENDPOINTREFERENCE.getQName()); 43 } 44 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 45 return type.cast(new Addressing10EndpointReferenceImpl(context.getModel())); 46 } 47 48 @Override 49 public WSDLComponent create(WSDLComponent context, Element element) { 50 return new Addressing10EndpointReferenceImpl(context.getModel(), element); 51 } 52 } 53 54 public static class AnonymousFactory extends ElementFactory { 55 @Override 56 public Set <QName > getElementQNames() { 57 return Collections.singleton(Addressing10QName.ANONYMOUS.getQName()); 58 } 59 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 60 return type.cast(new Addressing10AnonymousImpl(context.getModel())); 61 } 62 63 @Override 64 public WSDLComponent create(WSDLComponent context, Element element) { 65 return new Addressing10AnonymousImpl(context.getModel(), element); 66 } 67 } 68 69 public static class Address10Factory extends ElementFactory { 70 @Override 71 public Set <QName > getElementQNames() { 72 return Collections.singleton(Addressing10QName.ADDRESS.getQName()); 73 } 74 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 75 return type.cast(new Address10Impl(context.getModel())); 76 } 77 78 @Override 79 public WSDLComponent create(WSDLComponent context, Element element) { 80 return new Address10Impl(context.getModel(), element); 81 } 82 } 83 84 public static class Addressing10MetadataFactory extends ElementFactory { 85 @Override 86 public Set <QName > getElementQNames() { 87 return Collections.singleton(Addressing10QName.ADDRESS.getQName()); 88 } 89 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 90 return type.cast(new Addressing10MetadataImpl(context.getModel())); 91 } 92 93 @Override 94 public WSDLComponent create(WSDLComponent context, Element element) { 95 return new Addressing10MetadataImpl(context.getModel(), element); 96 } 97 } 98 99 public static class Addressing10ReferencePropertiesFactory extends ElementFactory { 100 @Override 101 public Set <QName > getElementQNames() { 102 return Collections.singleton(Addressing10QName.REFERENCEPROPERTIES.getQName()); 103 } 104 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 105 return type.cast(new Addressing10ReferencePropertiesImpl(context.getModel())); 106 } 107 108 @Override 109 public WSDLComponent create(WSDLComponent context, Element element) { 110 return new Addressing10ReferencePropertiesImpl(context.getModel(), element); 111 } 112 } 113 } 114 | Popular Tags |