PageRenderTime 12ms CodeModel.GetById 2ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/ws-tester-xor/ws-tester-xor-wsdl/src/main/java/com/googlecode/ws/tester/xor/wsdl/model/Definitions.java

http://ws-tester.googlecode.com/
Java | 101 lines | 75 code | 20 blank | 6 comment | 4 complexity | 90f66b16a2426daa4fdc5b19efc6501d MD5 | raw file
  1package com.googlecode.ws.tester.xor.wsdl.model;
  2
  3import com.googlecode.ws.tester.xor.engine.model.Namespace;
  4
  5import java.util.List;
  6import java.util.ArrayList;
  7
  8/**
  9 * Created by IntelliJ IDEA.
 10 * User: pablo
 11 * Date: 2009-06-09
 12 * Time: 18:44:58
 13 */
 14public class Definitions {
 15
 16    private Annotation annotation;
 17    private List<Message> messages;
 18    private List<Namespace> namespaces;
 19    private String name;
 20    private String targetNamespace;
 21    private PortType portType;
 22
 23    public PortType getPortType() {
 24        return portType;
 25    }
 26
 27    public void setPortType(PortType portType) {
 28        this.portType = portType;
 29    }
 30
 31    public Definitions() {
 32    }
 33
 34    public Annotation getAnnotation() {
 35        return annotation;
 36    }
 37
 38    public void setAnnotation(Annotation annotation) {
 39        this.annotation = annotation;
 40    }
 41
 42    public List<Namespace> getNamespaces() {
 43        return namespaces;
 44    }
 45
 46    public void setNamespaces(List<Namespace> namespaces) {
 47        this.namespaces = namespaces;
 48    }
 49
 50    public void addNamespace(Namespace namespace) {
 51        if(this.namespaces == null) {
 52            this.namespaces = new ArrayList<Namespace>();
 53        }
 54        this.namespaces.add(namespace);
 55    }
 56
 57    public List<Message> getMessages() {
 58        return messages;
 59    }
 60
 61    public void setMessages(List<Message> messages) {
 62        this.messages = messages;
 63    }
 64
 65    public void addMessage(Message message) {
 66        if(this.messages == null) {
 67            this.messages = new ArrayList<Message>();
 68        }
 69        this.messages.add(message);
 70    }
 71
 72    public String getName() {
 73        return name;
 74    }
 75
 76    public void setName(String name) {
 77        this.name = name;
 78    }
 79
 80    public String getTargetNamespace() {
 81        return targetNamespace;
 82    }
 83
 84    public void setTargetNamespace(String targetNamespace) {
 85        this.targetNamespace = targetNamespace;
 86    }
 87
 88    @Override
 89    public String toString() {
 90        final StringBuilder sb = new StringBuilder();
 91        sb.append("Definitions");
 92        sb.append("{annotation=").append(annotation);
 93        sb.append(", messages=").append(messages);
 94        sb.append(", namespaces=").append(namespaces);
 95        sb.append(", name='").append(name).append('\'');
 96        sb.append(", targetNamespace='").append(targetNamespace).append('\'');
 97        sb.append(", portType=").append(portType);
 98        sb.append('}');
 99        return sb.toString();
100    }
101}