KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2
3    Copyright 2000 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 package org.apache.batik.dom;
19
20 import org.w3c.dom.Node JavaDoc;
21 import org.w3c.dom.Notation JavaDoc;
22
23 /**
24  * This class implements the {@link org.w3c.dom.Notation} interface.
25  *
26  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
27  * @version $Id: AbstractNotation.java,v 1.5 2005/02/22 09:12:58 cam Exp $
28  */

29 public abstract class AbstractNotation
30     extends AbstractNode
31     implements Notation JavaDoc {
32     /**
33      * The node name.
34      */

35     protected String JavaDoc nodeName;
36
37     /**
38      * The public id.
39      */

40     protected String JavaDoc publicId;
41
42     /**
43      * The system id.
44      */

45     protected String JavaDoc systemId;
46
47     /**
48      * <b>DOM</b>: Implements {@link org.w3c.dom.Node#getNodeType()}.
49      * @return {@link org.w3c.dom.Node#NOTATION_NODE}
50      */

51     public short getNodeType() {
52     return NOTATION_NODE;
53     }
54
55     /**
56      * Sets the name of this node.
57      */

58     public void setNodeName(String JavaDoc v) {
59     nodeName = v;
60     }
61
62     /**
63      * <b>DOM</b>: Implements {@link org.w3c.dom.Node#getNodeName()}.
64      */

65     public String JavaDoc getNodeName() {
66     return nodeName;
67     }
68
69     /**
70      * <b>DOM</b>: Implements {@link org.w3c.dom.Notation#getPublicId()}.
71      * @return {@link #publicId}.
72      */

73     public String JavaDoc getPublicId() {
74     return publicId;
75     }
76
77     /**
78      * Sets the public id.
79      */

80     public void setPublicId(String JavaDoc id) {
81     publicId = id;
82     }
83
84     /**
85      * <b>DOM</b>: Implements {@link org.w3c.dom.Notation#getSystemId()}.
86      * @return {@link #systemId}.
87      */

88     public String JavaDoc getSystemId() {
89     return systemId;
90     }
91
92     /**
93      * Sets the system id.
94      */

95     public void setSystemId(String JavaDoc id) {
96     systemId = id;
97     }
98
99     /**
100      * Exports this node to the given document.
101      */

102     protected Node JavaDoc export(Node JavaDoc n, AbstractDocument d) {
103     super.export(n, d);
104     AbstractNotation an = (AbstractNotation)n;
105     an.nodeName = nodeName;
106     an.publicId = publicId;
107     an.systemId = systemId;
108     return n;
109     }
110
111     /**
112      * Deeply exports this node to the given document.
113      */

114     protected Node JavaDoc deepExport(Node JavaDoc n, AbstractDocument d) {
115     super.deepExport(n, d);
116     AbstractNotation an = (AbstractNotation)n;
117     an.nodeName = nodeName;
118     an.publicId = publicId;
119     an.systemId = systemId;
120     return n;
121     }
122
123     /**
124      * Copy the fields of the current node into the given node.
125      * @param n a node of the type of this.
126      */

127     protected Node JavaDoc copyInto(Node JavaDoc n) {
128     super.copyInto(n);
129     AbstractNotation an = (AbstractNotation)n;
130     an.nodeName = nodeName;
131     an.publicId = publicId;
132     an.systemId = systemId;
133     return n;
134     }
135
136     /**
137      * Deeply copy the fields of the current node into the given node.
138      * @param n a node of the type of this.
139      */

140     protected Node JavaDoc deepCopyInto(Node JavaDoc n) {
141     super.deepCopyInto(n);
142     AbstractNotation an = (AbstractNotation)n;
143     an.nodeName = nodeName;
144     an.publicId = publicId;
145     an.systemId = systemId;
146     return n;
147     }
148 }
149
Popular Tags