KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > dom > CommentImpl


1 /*
2  * Copyright 1999-2002,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
17 package org.apache.xerces.dom;
18
19 import org.w3c.dom.CharacterData JavaDoc;
20 import org.w3c.dom.Comment JavaDoc;
21 import org.w3c.dom.Node JavaDoc;
22
23 /**
24  * Represents an XML (or HTML) comment.
25  *
26  * @xerces.internal
27  *
28  * @version $Id: CommentImpl.java,v 1.9 2004/10/05 17:12:50 mrglavas Exp $
29  * @since PR-DOM-Level-1-19980818.
30  */

31 public class CommentImpl
32     extends CharacterDataImpl
33     implements CharacterData JavaDoc, Comment JavaDoc {
34
35     //
36
// Constants
37
//
38

39     /** Serialization version. */
40     static final long serialVersionUID = -2685736833408134044L;
41
42     //
43
// Constructors
44
//
45

46     /** Factory constructor. */
47     public CommentImpl(CoreDocumentImpl ownerDoc, String JavaDoc data) {
48         super(ownerDoc, data);
49     }
50     
51     //
52
// Node methods
53
//
54

55     /**
56      * A short integer indicating what type of node this is. The named
57      * constants for this value are defined in the org.w3c.dom.Node interface.
58      */

59     public short getNodeType() {
60         return Node.COMMENT_NODE;
61     }
62
63     /** Returns the node name. */
64     public String JavaDoc getNodeName() {
65         return "#comment";
66     }
67
68 } // class CommentImpl
69
Popular Tags