KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > wsdl > model > extensions > bpel > impl > DocumentationImpl


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 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 /**
21  *
22  */

23 package org.netbeans.modules.xml.wsdl.model.extensions.bpel.impl;
24
25 import org.netbeans.modules.xml.wsdl.model.WSDLModel;
26 import org.netbeans.modules.xml.wsdl.model.extensions.bpel.Documentation;
27 import org.netbeans.modules.xml.wsdl.model.extensions.bpel.PartnerLinkType;
28 import org.netbeans.modules.xml.wsdl.model.extensions.bpel.Role;
29 import org.netbeans.modules.xml.wsdl.model.spi.GenericExtensibilityElement;
30 import org.netbeans.modules.xml.xam.Component;
31 import org.w3c.dom.Element JavaDoc;
32
33
34 /**
35  * @author ads
36  *
37  */

38 public class DocumentationImpl extends GenericExtensibilityElement implements Documentation {
39
40     public DocumentationImpl( WSDLModel model, Element e ) {
41         super(model, e);
42     }
43
44 /* public DocumentationImpl( WSDLModel model, QName qname ) {
45         this(model, createPrefixedElement(BPELQName.DOCUMENTATION.getQName(),
46                 model));
47     }*/

48
49     /* (non-Javadoc)
50      * @see org.netbeans.modules.xml.wsdl.model.extensions.bpel.Documentation#getContent()
51      */

52     public String JavaDoc getContent() {
53         return getText();
54     }
55
56     /* (non-Javadoc)
57      * @see org.netbeans.modules.xml.wsdl.model.extensions.bpel.Documentation#setContent(java.lang.String)
58      */

59     public void setContent( String JavaDoc value ) {
60         setText( CONTENT_PROPERTY, value );
61     }
62
63     /* (non-Javadoc)
64      * @see org.netbeans.modules.xml.wsdl.model.extensions.bpel.BPELExtensibilityComponent#accept(org.netbeans.modules.xml.wsdl.model.extensions.bpel.BPELExtensibilityComponent.Visitor)
65      */

66     public void accept( Visitor v ) {
67         v.visit( this );
68     }
69
70     /* (non-Javadoc)
71      * @see org.netbeans.modules.xml.wsdl.model.extensions.bpel.Documentation#getSource()
72      */

73     public String JavaDoc getSource() {
74         return getAttribute(BPELAttribute.SOURCE);
75     }
76
77     /* (non-Javadoc)
78      * @see org.netbeans.modules.xml.wsdl.model.extensions.bpel.Documentation#setSource()
79      */

80     public void setSource( String JavaDoc value ) {
81         setAttribute( SOURCE , BPELAttribute.SOURCE , value );
82     }
83
84     /* (non-Javadoc)
85      * @see org.netbeans.modules.xml.wsdl.model.extensions.bpel.Documentation#removeSource()
86      */

87     public void removeSource() {
88         setAttribute( SOURCE , BPELAttribute.SOURCE , null );
89     }
90
91     /* (non-Javadoc)
92      * @see org.netbeans.modules.xml.wsdl.model.extensions.bpel.Documentation#getLang()
93      */

94     public String JavaDoc getLang() {
95         return getAttribute( BPELAttribute.LANG );
96     }
97
98     /* (non-Javadoc)
99      * @see org.netbeans.modules.xml.wsdl.model.extensions.bpel.Documentation#removeLang()
100      */

101     public void removeLang() {
102         setAttribute( LANG , BPELAttribute.LANG, null );
103     }
104
105     /* (non-Javadoc)
106      * @see org.netbeans.modules.xml.wsdl.model.extensions.bpel.Documentation#setLang(java.lang.String)
107      */

108     public void setLang( String JavaDoc value ) {
109         setAttribute( LANG , BPELAttribute.LANG, value );
110     }
111
112     @Override JavaDoc
113     public boolean canBeAddedTo(Component target) {
114         if (target instanceof PartnerLinkType || target instanceof Role) {
115             return true;
116         }
117         return false;
118     }
119 }
120
Popular Tags