KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > wsitmodelext > mex > impl > MetadataSectionImpl


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.mex.impl;
21
22 import java.util.Collections JavaDoc;
23 import org.netbeans.modules.websvc.wsitmodelext.mex.Dialect;
24 import org.netbeans.modules.websvc.wsitmodelext.mex.Identifier;
25 import org.netbeans.modules.websvc.wsitmodelext.mex.Location;
26 import org.netbeans.modules.websvc.wsitmodelext.mex.MetadataReference;
27 import org.netbeans.modules.websvc.wsitmodelext.mex.MetadataSection;
28 import org.netbeans.modules.websvc.wsitmodelext.mex.MexQName;
29 import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
30 import org.netbeans.modules.xml.wsdl.model.WSDLModel;
31 import org.netbeans.modules.xml.wsdl.model.visitor.WSDLVisitor;
32 import org.w3c.dom.Element JavaDoc;
33
34 /**
35  *
36  * @author Martin Grebac
37  */

38 public class MetadataSectionImpl extends MexComponentImpl implements MetadataSection {
39     
40     /**
41      * Creates a new instance of MetadataSectionImpl
42      */

43     public MetadataSectionImpl(WSDLModel model, Element JavaDoc e) {
44         super(model, e);
45     }
46     
47     public MetadataSectionImpl(WSDLModel model){
48         this(model, createPrefixedElement(MexQName.METADATA.getQName(), model));
49     }
50
51     @Override JavaDoc
52     public void accept(WSDLVisitor visitor) {
53         visitor.visit(this);
54     }
55
56     public Location getLocation() {
57         return getChild(Location.class);
58     }
59
60     public void setLocation(Location loc) {
61         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
62         setChild(Location.class, LOCATION_PROPERTY, loc, classes);
63     }
64
65     public void removeLocation(Location loc) {
66         removeChild(LOCATION_PROPERTY, loc);
67     }
68         
69     public Dialect getDialect() {
70         return getChild(Dialect.class);
71     }
72
73     public void setDialect(Dialect dialect) {
74         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
75         setChild(Dialect.class, DIALECT_PROPERTY, dialect, classes);
76     }
77
78     public void removeDialect(Dialect dialect) {
79         removeChild(DIALECT_PROPERTY, dialect);
80     }
81
82     public Identifier getIdentifier() {
83         return getChild(Identifier.class);
84     }
85
86     public void setIdentifier(Identifier id) {
87         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
88         setChild(Identifier.class, IDENTIFIER_PROPERTY, id, classes);
89     }
90
91     public void removeIdentifier(Identifier id) {
92         removeChild(IDENTIFIER_PROPERTY, id);
93     }
94
95     public MetadataReference getMetadataReference() {
96         return getChild(MetadataReference.class);
97     }
98
99     public void setMetadataReference(MetadataReference mReference) {
100         java.util.List JavaDoc<Class JavaDoc<? extends WSDLComponent>> classes = Collections.emptyList();
101         setChild(MetadataReference.class, METADATAREFERENCE_PROPERTY, mReference, classes);
102     }
103
104     public void removeMetadataReference(MetadataReference mReference) {
105         removeChild(METADATAREFERENCE_PROPERTY, mReference);
106     }
107
108 }
109
Popular Tags