KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > quikj > application > web > talk > messaging > TypingElement


1 /*
2  * BuzzElement.java
3  *
4  * Created on May 27, 2002, 5:40 AM
5  */

6
7 package com.quikj.application.web.talk.messaging;
8
9 // JAXP packages
10
import org.w3c.dom.*;
11
12 import net.n3.nanoxml.*;
13
14 /**
15  *
16  * @author amit
17  */

18 public class TypingElement implements MediaElementInterface
19 {
20     private String JavaDoc errorMessage = "";
21     
22     /** Creates a new instance of BuzzElement */
23     public TypingElement()
24     {
25     }
26
27     public boolean parse(Object JavaDoc node)
28     {
29         if (TalkMessageParser.getParserType() == TalkMessageParser.DOM_PARSER)
30         {
31             return parseDOM((Node)node);
32         }
33         else // NANOXML parser
34
{
35             return parseNANO((IXMLElement)node);
36         }
37     }
38     
39     private boolean parseDOM(Node node)
40     {
41         return true;
42     }
43     
44     private boolean parseNANO (IXMLElement node)
45     {
46         return true;
47     }
48     
49     public String JavaDoc getErrorMessage()
50     {
51         return errorMessage;
52     }
53     
54     public String JavaDoc format()
55     {
56         return new String JavaDoc("<typing/>\n");
57     }
58 }
59
Popular Tags