KickJava   Java API By Example, From Geeks To Geeks.

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


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.BPELQName;
27 import org.netbeans.modules.xml.wsdl.model.extensions.bpel.PropertyAlias;
28 import org.netbeans.modules.xml.wsdl.model.extensions.bpel.Query;
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 QueryImpl extends GenericExtensibilityElement implements Query {
39
40     public QueryImpl( WSDLModel model, Element e ) {
41         super(model, e);
42     }
43
44     public QueryImpl( WSDLModel model ) {
45         this(model, createPrefixedElement(BPELQName.QUERY.getQName(),
46                 model));
47     }
48
49     /* (non-Javadoc)
50      * @see org.netbeans.modules.xml.wsdl.model.extensions.bpel.Query#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.Query#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.Query#getQueryLanguage()
72      */

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

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

87     public void removeQueryLanguage() {
88         setAttribute( QUERY_LANGUAGE , BPELAttribute.QUERY_LANGUAGE , null );
89     }
90
91     @Override JavaDoc
92     public boolean canBeAddedTo(Component target) {
93         if (target instanceof PropertyAlias) {
94             return true;
95         }
96         return false;
97     }
98
99 }
100
Popular Tags