1 19 20 package org.netbeans.modules.xml.wsdl.model.impl; 21 22 import java.util.Collection ; 23 import org.netbeans.modules.xml.wsdl.model.Port; 24 import org.netbeans.modules.xml.wsdl.model.Service; 25 import org.netbeans.modules.xml.wsdl.model.WSDLModel; 26 import org.netbeans.modules.xml.wsdl.model.visitor.WSDLVisitor; 27 import org.w3c.dom.Element ; 28 29 33 public class ServiceImpl extends NamedImpl implements Service { 34 35 36 public ServiceImpl(WSDLModel model, Element e) { 37 super(model, e); 38 } 39 40 public ServiceImpl(WSDLModel model){ 41 this(model, createNewElement(WSDLQNames.SERVICE.getQName(), model)); 42 } 43 44 public void removePort(Port port) { 45 removeChild(PORT_PROPERTY, port); 46 } 47 48 public void addPort(Port port) { 49 super.addAfter(PORT_PROPERTY, port, TypeCollection.DOCUMENTATION.types()); 50 } 51 52 public Collection <Port> getPorts() { 53 return getChildren(Port.class); 54 } 55 56 public void accept(WSDLVisitor visitor) { 57 visitor.visit(this); 58 } 59 } 60 | Popular Tags |