1 19 20 package org.netbeans.modules.websvc.wsitmodelext.addressing; 21 22 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 23 import org.netbeans.modules.xml.wsdl.model.spi.ElementFactory; 24 import org.w3c.dom.Element ; 25 26 import javax.xml.namespace.QName ; 27 import java.util.Collections ; 28 import java.util.Set ; 29 import org.netbeans.modules.websvc.wsitmodelext.addressing.impl.Addressing10WsdlUsingAddressingImpl; 30 31 32 public class Addressing10WsdlFactories { 33 34 public static class UsingAddressingFactory extends ElementFactory { 35 @Override 36 public Set <QName > getElementQNames() { 37 return Collections.singleton(Addressing10WsdlQName.USINGADDRESSING.getQName()); 38 } 39 public <C extends WSDLComponent> C create(WSDLComponent context, Class <C> type) { 40 return type.cast(new Addressing10WsdlUsingAddressingImpl(context.getModel())); 41 } 42 43 @Override 44 public WSDLComponent create(WSDLComponent context, Element element) { 45 return new Addressing10WsdlUsingAddressingImpl(context.getModel(), element); 46 } 47 } 48 49 } 50 | Popular Tags |