KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > wsitmodelext > addressing > impl > EndpointReferenceImpl


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.websvc.wsitmodelext.addressing.impl;
21
22 import org.netbeans.modules.websvc.wsitmodelext.addressing.AddressingQName;
23 import org.netbeans.modules.websvc.wsitmodelext.addressing.EndpointReference;
24 import org.netbeans.modules.websvc.wsitmodelext.addressing.ReferenceParameters;
25 import org.netbeans.modules.websvc.wsitmodelext.addressing.ReferenceProperties;
26 import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
27 import org.netbeans.modules.xml.wsdl.model.WSDLModel;
28 import org.netbeans.modules.xml.wsdl.model.visitor.WSDLVisitor;
29 import org.w3c.dom.Element JavaDoc;
30
31 import java.util.Collections JavaDoc;
32 import org.netbeans.modules.websvc.wsitmodelext.addressing.Address;
33 import org.netbeans.modules.websvc.wsitmodelext.addressing.AddressingPortType;
34 import org.netbeans.modules.websvc.wsitmodelext.addressing.AddressingServiceName;
35
36 /**
37  *
38  * @author Martin Grebac
39  */

40 public class EndpointReferenceImpl extends AddressingComponentImpl implements EndpointReference {
41     
42     /**
43      * Creates a new instance of EndpointReferenceImpl
44      */

45     public EndpointReferenceImpl(WSDLModel model, Element JavaDoc e) {
46         super(model, e);
47     }
48     
49     public EndpointReferenceImpl(WSDLModel model){
50         this(model, createPrefixedElement(AddressingQName.ENDPOINTREFERENCE.getQName(), model));
51     }
52
53     @Override JavaDoc
54     public void accept(WSDLVisitor visitor) {
55         visitor.visit(this);
56     }
57
58     public void setAddress(Address address) {
59         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
60         setChild(Address.class, ADDRESS_PROPERTY, address, classes);
61     }
62
63     public Address getAddress() {
64         return getChild(Address.class);
65     }
66
67     public void removeAddress(Address address) {
68         removeChild(ADDRESS_PROPERTY, address);
69     }
70
71     public void setServiceName(AddressingServiceName serviceName) {
72         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
73         setChild(AddressingServiceName.class, SERVICENAME_PROPERTY, serviceName, classes);
74     }
75
76     public AddressingServiceName getServiceName() {
77         return getChild(AddressingServiceName.class);
78     }
79
80     public void removeServiceName(AddressingServiceName serviceName) {
81         removeChild(SERVICENAME_PROPERTY, serviceName);
82     }
83     
84     public void setPortType(AddressingPortType addressingPortType) {
85         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
86         setChild(AddressingPortType.class, ADDRESSING_PORTTYPE_PROPERTY, addressingPortType, classes);
87     }
88
89     public AddressingPortType getPortType() {
90         return getChild(AddressingPortType.class);
91     }
92
93     public void removePortType(AddressingPortType portType) {
94         removeChild(ADDRESSING_PORTTYPE_PROPERTY, portType);
95     }
96
97     public void setReferenceProperties(ReferenceProperties referenceProperties) {
98         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
99         setChild(ReferenceProperties.class, REFERENCE_PROPERTIES_PROPERTY, referenceProperties, classes);
100     }
101
102     public ReferenceProperties getReferenceProperties() {
103         return getChild(ReferenceProperties.class);
104     }
105
106     public void removeReferenceProperties(ReferenceProperties referenceProperties) {
107         removeChild(REFERENCE_PROPERTIES_PROPERTY, referenceProperties);
108     }
109
110     public void setReferenceParameters(ReferenceParameters referenceParameters) {
111         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
112         setChild(ReferenceParameters.class, REFERENCE_PARAMETERS_PROPERTY, referenceParameters, classes);
113     }
114
115     public ReferenceParameters getReferenceParameters() {
116         return getChild(ReferenceParameters.class);
117     }
118
119     public void removeReferenceParameters(ReferenceParameters referenceParameters) {
120         removeChild(REFERENCE_PARAMETERS_PROPERTY, referenceParameters);
121     }
122     
123 }
124
Popular Tags