KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > deployment > wsdd > WSDDDocumentation


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.axis.deployment.wsdd;
17
18 import org.apache.axis.encoding.SerializationContext;
19 import org.apache.axis.utils.XMLUtils;
20 import org.w3c.dom.Element JavaDoc;
21
22 import javax.xml.namespace.QName JavaDoc;
23 import java.io.IOException JavaDoc;
24
25
26 /**
27  * represents a WSDD documentation
28  * All WSDDElement can have a documentation but it is used only for
29  * Services, Operations and Parameters for now
30  */

31 public class WSDDDocumentation
32     extends WSDDElement
33 {
34     private String JavaDoc value; /** the documentation */
35  
36     protected QName JavaDoc getElementName()
37     {
38         return WSDDConstants.QNAME_DOC;
39     }
40     
41     public WSDDDocumentation(String JavaDoc value)
42     {
43         this.value = value;
44     }
45     
46     /**
47      *
48      * @param e (Element) XXX
49      * @throws WSDDException XXX
50      */

51     public WSDDDocumentation(Element JavaDoc e)
52         throws WSDDException
53     {
54         super(e);
55         value = XMLUtils.getChildCharacterData(e);
56     }
57
58     /**
59      * get the documentation
60      */

61     public String JavaDoc getValue()
62     {
63         return value;
64     }
65
66     /**
67      * set the documentation
68      */

69     public void setValue(String JavaDoc value)
70     {
71         this.value = value;
72     }
73
74     /**
75      * Write this element out to a SerializationContext
76      */

77     public void writeToContext(SerializationContext context)
78             throws IOException JavaDoc
79     {
80         context.startElement(QNAME_DOC, null);
81         context.writeSafeString(value);
82         context.endElement();
83     }
84 }
85
Popular Tags