01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.xerces.dom;
19:
20: import org.w3c.dom.CharacterData;
21: import org.w3c.dom.Comment;
22: import org.w3c.dom.Node;
23:
24: /**
25: * Represents an XML (or HTML) comment.
26: *
27: * @xerces.internal
28: *
29: * @version $Id: CommentImpl.java 447266 2006-09-18 05:57:49Z mrglavas $
30: * @since PR-DOM-Level-1-19980818.
31: */
32: public class CommentImpl extends CharacterDataImpl implements
33: CharacterData, Comment {
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 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 getNodeName() {
65: return "#comment";
66: }
67:
68: } // class CommentImpl
|