KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > JSci > mathml > MathMLAnnotationElementImpl


1 package JSci.mathml;
2
3 import org.w3c.dom.mathml.*;
4
5 /**
6  * Implements a MathML annotation element.
7  * @version 1.0
8  * @author Mark Hale
9  */

10 public class MathMLAnnotationElementImpl extends MathMLElementImpl implements MathMLAnnotationElement {
11         /**
12          * Constructs a MathML annotation element.
13          */

14         public MathMLAnnotationElementImpl(MathMLDocumentImpl owner, String JavaDoc qualifiedName) {
15                 super(owner, qualifiedName);
16         }
17
18         public String JavaDoc getBody() {
19                 return getFirstChild().getNodeValue();
20         }
21         public void setBody(String JavaDoc body) {
22                 getFirstChild().setNodeValue(body);
23         }
24
25         public String JavaDoc getEncoding() {
26                 return getAttribute("encoding");
27         }
28         public void setEncoding(String JavaDoc encoding) {
29                 setAttribute("encoding", encoding);
30         }
31 }
32
33
Popular Tags