Source code: org/apache/batik/dom/svg/SVGOMToBeImplementedElement.java
1 /*
2
3 Copyright 2000-2001 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.svg;
19
20 import org.apache.batik.dom.AbstractDocument;
21 import org.w3c.dom.Node;
22
23 /**
24 * This is a development only class. It is used temporarily in the
25 * SVG DOM implementation for SVG elements whose DOM support has not
26 * been put in
27 *
28 * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
29 * @version $Id: SVGOMToBeImplementedElement.java,v 1.8 2004/08/18 07:13:18 vhardy Exp $
30 */
31 public class SVGOMToBeImplementedElement
32 extends SVGGraphicsElement {
33
34 /**
35 * This element's local name
36 */
37 protected String localName;
38
39 /**
40 * Creates a new SVGOMToBeImplementedElement object.
41 */
42 protected SVGOMToBeImplementedElement() {
43 }
44
45 /**
46 * Creates a new SVGOMToBeImplementedElement object.
47 * @param prefix The namespace prefix.
48 * @param owner The owner document.
49 * @param localName the local name for the element.
50 */
51 public SVGOMToBeImplementedElement(String prefix, AbstractDocument owner,
52 String localName) {
53 super(prefix, owner);
54 this.localName = localName;
55 }
56
57 /**
58 * <b>DOM</b>: Implements {@link org.w3c.dom.Node#getLocalName()}.
59 */
60 public String getLocalName() {
61 return localName;
62 }
63
64 /**
65 * Returns a new uninitialized instance of this object's class.
66 */
67 protected Node newNode() {
68 return new SVGOMToBeImplementedElement();
69 }
70
71 /**
72 * Exports this node to the given document.
73 */
74 protected Node export(Node n, AbstractDocument d) {
75 super.export(n, d);
76 SVGOMToBeImplementedElement ae = (SVGOMToBeImplementedElement)n;
77 ae.localName = localName;
78 return n;
79 }
80
81 /**
82 * Deeply exports this node to the given document.
83 */
84 protected Node deepExport(Node n, AbstractDocument d) {
85 super.deepExport(n, d);
86 SVGOMToBeImplementedElement ae = (SVGOMToBeImplementedElement)n;
87 ae.localName = localName;
88 return n;
89 }
90
91 /**
92 * Copy the fields of the current node into the given node.
93 * @param n a node of the type of this.
94 */
95 protected Node copyInto(Node n) {
96 super.copyInto(n);
97 SVGOMToBeImplementedElement ae = (SVGOMToBeImplementedElement)n;
98 ae.localName = localName;
99 return n;
100 }
101
102 /**
103 * Deeply copy the fields of the current node into the given node.
104 * @param n a node of the type of this.
105 */
106 protected Node deepCopyInto(Node n) {
107 super.deepCopyInto(n);
108 SVGOMToBeImplementedElement ae = (SVGOMToBeImplementedElement)n;
109 ae.localName = localName;
110 return n;
111 }
112
113 }