1 19 20 package org.netbeans.modules.xml.wsdl.model.extensions.soap.impl; 21 22 import java.util.Collections ; 23 import java.util.Set ; 24 import javax.xml.namespace.QName ; 25 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 26 import org.netbeans.modules.xml.wsdl.model.extensions.soap.SOAPQName; 27 import org.netbeans.modules.xml.wsdl.model.spi.ElementFactory; 28 import org.w3c.dom.Element ; 29 30 34 public class SOAPElementFactoryProvider { 35 36 public static class BindingFactory extends ElementFactory { 37 public Set <QName > getElementQNames() { 38 return Collections.singleton(SOAPQName.BINDING.getQName()); 39 } 40 public WSDLComponent create(WSDLComponent context, Element element) { 41 return new SOAPBindingImpl(context.getModel(), element); 42 } 43 } 44 45 public static class AddressFactory extends ElementFactory { 46 public Set <QName > getElementQNames() { 47 return Collections.singleton(SOAPQName.ADDRESS.getQName()); 48 } 49 public WSDLComponent create(WSDLComponent context, Element element) { 50 return new SOAPAddressImpl(context.getModel(), element); 51 } 52 } 53 54 public static class BodyFactory extends ElementFactory{ 55 public Set <QName > getElementQNames() { 56 return Collections.singleton(SOAPQName.BODY.getQName()); 57 } 58 public WSDLComponent create(WSDLComponent context, Element element) { 59 return new SOAPBodyImpl(context.getModel(), element); 60 } 61 } 62 63 public static class HeaderFactory extends ElementFactory { 64 public Set <QName > getElementQNames() { 65 return Collections.singleton(SOAPQName.HEADER.getQName()); 66 } 67 public WSDLComponent create(WSDLComponent context, Element element) { 68 return new SOAPHeaderImpl(context.getModel(), element); 69 } 70 } 71 72 public static class HeaderFaultFactory extends ElementFactory{ 73 public Set <QName > getElementQNames() { 74 return Collections.singleton(SOAPQName.HEADER_FAULT.getQName()); 75 } 76 public WSDLComponent create(WSDLComponent context, Element element) { 77 return new SOAPHeaderFaultImpl(context.getModel(), element); 78 } 79 } 80 81 public static class OperationFactory extends ElementFactory{ 82 public Set <QName > getElementQNames() { 83 return Collections.singleton(SOAPQName.OPERATION.getQName()); 84 } 85 public WSDLComponent create(WSDLComponent context, Element element) { 86 return new SOAPOperationImpl(context.getModel(), element); 87 } 88 } 89 90 public static class FaultFactory extends ElementFactory{ 91 public Set <QName > getElementQNames() { 92 return Collections.singleton(SOAPQName.FAULT.getQName()); 93 } 94 public WSDLComponent create(WSDLComponent context, Element element) { 95 return new SOAPFaultImpl(context.getModel(), element); 96 } 97 } 98 } 99 | Popular Tags |