KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > dom > GenericDocumentType


1 /*
2
3    Copyright 2004 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        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
19 package org.apache.batik.dom;
20
21 import org.w3c.dom.DocumentType JavaDoc;
22 import org.w3c.dom.NamedNodeMap JavaDoc;
23 import org.w3c.dom.Node JavaDoc;
24
25 public class GenericDocumentType extends AbstractChildNode
26     implements DocumentType JavaDoc {
27
28     protected String JavaDoc qualifiedName;
29     protected String JavaDoc publicId;
30     protected String JavaDoc systemId;
31
32     public GenericDocumentType(String JavaDoc qualifiedName,
33                                    String JavaDoc publicId,
34                                    String JavaDoc systemId) {
35         this.qualifiedName = qualifiedName;
36         this.publicId = publicId;
37         this.systemId = systemId;
38     }
39
40     /**
41      * <b>DOM</b>: Implements {@link org.w3c.dom.Node#getNodeName()}.
42      * @return The name of the DTD.
43      */

44     public String JavaDoc getNodeName() { return qualifiedName; }
45
46     public short getNodeType() { return DOCUMENT_TYPE_NODE; }
47
48     public boolean isReadonly() { return true; }
49     public void setReadonly(boolean ro) {}
50
51     /**
52      * <b>DOM</b>: Implements {@link org.w3c.dom.DocumentType#getName()}.
53      * @return The name of the DTD.
54      */

55     public String JavaDoc getName() { return null; }
56
57     /**
58      * <b>DOM</b>: Implements {@link org.w3c.dom.DocumentType#getEntities()}.
59      * @return null.
60      */

61     public NamedNodeMap JavaDoc getEntities() {
62         return null;
63     }
64
65     /**
66      * <b>DOM</b>: Implements {@link org.w3c.dom.DocumentType#getNotations()}.
67      * @return null.
68      */

69     public NamedNodeMap JavaDoc getNotations() {
70         return null;
71     }
72
73     /**
74      * <b>DOM</b>: Implements {@link org.w3c.dom.DocumentType#getPublicId()}.
75      * @return The public id.
76      */

77     public String JavaDoc getPublicId() { return publicId; }
78
79     /**
80      * <b>DOM</b>: Implements {@link org.w3c.dom.DocumentType#getSystemId()}.
81      * @return The public id.
82      */

83     public String JavaDoc getSystemId() { return systemId; }
84
85     /**
86      * <b>DOM</b>: Implements {@link org.w3c.dom.DocumentType#getInternalSubset()}.
87      * @return The public id.
88      */

89     public String JavaDoc getInternalSubset() { return null; }
90
91
92     protected Node JavaDoc newNode() {
93         return new GenericDocumentType(qualifiedName, publicId, systemId); }
94 }
Popular Tags