KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > wsitmodelext > policy > impl > ExactlyOneImpl


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.policy.impl;
21
22 import org.netbeans.modules.websvc.wsitmodelext.rm.RMAssertion;
23 import org.netbeans.modules.websvc.wsitmodelext.policy.All;
24 import org.netbeans.modules.websvc.wsitmodelext.policy.ExactlyOne;
25 import org.netbeans.modules.websvc.wsitmodelext.policy.Policy;
26 import org.netbeans.modules.websvc.wsitmodelext.policy.PolicyQName;
27 import org.netbeans.modules.websvc.wsitmodelext.policy.PolicyReference;
28 import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
29 import org.netbeans.modules.xml.wsdl.model.WSDLModel;
30 import org.netbeans.modules.xml.wsdl.model.visitor.WSDLVisitor;
31 import org.w3c.dom.Element JavaDoc;
32
33 import java.util.Collections JavaDoc;
34
35 /**
36  *
37  * @author Martin Grebac
38  */

39 public class ExactlyOneImpl extends PolicyComponentImpl implements ExactlyOne {
40     
41     /**
42      * Creates a new instance of ExactlyOneImpl
43      */

44     public ExactlyOneImpl(WSDLModel model, Element JavaDoc e) {
45         super(model, e);
46     }
47     
48     public ExactlyOneImpl(WSDLModel model){
49         this(model, createPrefixedElement(PolicyQName.EXACTLYONE.getQName(), model));
50     }
51
52     @Override JavaDoc
53     public void accept(WSDLVisitor visitor) {
54         visitor.visit(this);
55     }
56
57     public void setAll(All all) {
58         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
59         setChild(All.class, ALL_PROPERTY, all, classes);
60     }
61
62     public All getAll() {
63         return getChild(All.class);
64     }
65
66     public void removeAll(All all) {
67         removeChild(ALL_PROPERTY, all);
68     }
69
70     public void setExactlyOne(ExactlyOne exactlyOne) {
71         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
72         setChild(ExactlyOne.class, EXACTLYONE_PROPERTY, exactlyOne, classes);
73     }
74
75     public ExactlyOne getExactlyOne() {
76         return getChild(ExactlyOne.class);
77     }
78
79     public void removeExactlyOne(ExactlyOne exactlyOne) {
80         removeChild(EXACTLYONE_PROPERTY, exactlyOne);
81     }
82
83     public void setPolicy(Policy policy) {
84         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
85         setChild(Policy.class, POLICY_PROPERTY, policy, classes);
86     }
87
88     public Policy getPolicy() {
89         return getChild(Policy.class);
90     }
91
92     public void removePolicy(Policy policy) {
93         removeChild(POLICY_PROPERTY, policy);
94     }
95
96     public void setPolicyReference(PolicyReference policyReference) {
97         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
98         setChild(PolicyReference.class, POLICYREFERENCE_PROPERTY, policyReference, classes);
99     }
100
101     public PolicyReference getPolicyReference() {
102         return getChild(PolicyReference.class);
103     }
104
105     public void removePolicyReference(PolicyReference policyReference) {
106         removeChild(POLICYREFERENCE_PROPERTY, policyReference);
107     }
108
109     public void setRMAssertion(RMAssertion rmAssertion) {
110         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
111         setChild(RMAssertion.class, RMAssertion.RMASSERTION_PROPERTY, rmAssertion, classes);
112     }
113
114     public RMAssertion getRMAssertion() {
115         return getChild(RMAssertion.class);
116     }
117
118     public void removeRMAssertion(RMAssertion rmAssertion) {
119         removeChild(RMAssertion.RMASSERTION_PROPERTY, rmAssertion);
120     }
121     
122 }
123
Popular Tags