1 /**
2 * This is a simple mechanism to bind Inkscape to Java, and thence
3 * to all of the nice things that can be layered upon that.
4 *
5 * Authors:
6 * Bob Jamison
7 *
8 * Copyright (c) 2007-2008 Inkscape.org
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 3 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 *
24 * Note that these DOM files are implementations of the Java
25 * interface package found here:
26 * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html
27 */
29 package org.inkscape.dom;
31 import org.w3c.dom.DOMException;
33 import org.w3c.dom.Document;
34 import org.w3c.dom.NamedNodeMap;
35 import org.w3c.dom.Node;
36 import org.w3c.dom.NodeList;
37 import org.w3c.dom.UserDataHandler;
42 public class NodeImpl
43 extends DOMBase
44 implements org.w3c.dom.Node
45 {
47 public native String getNodeName();
49 public native String getNodeValue()
50 throws DOMException;
51 public native void setNodeValue(String nodeValue)
52 throws DOMException;
54 public native short getNodeType();
56 public native Node getParentNode();
58 public native NodeList getChildNodes();
60 public native Node getFirstChild();
62 public native Node getLastChild();
64 public native Node getPreviousSibling();
66 public native Node getNextSibling();
68 public native NamedNodeMap getAttributes();
70 public native Document getOwnerDocument();
72 public native Node insertBefore(Node newChild,
73 Node refChild)
74 throws DOMException;
76 public native Node replaceChild(Node newChild,
77 Node oldChild)
78 throws DOMException;
80 public native Node removeChild(Node oldChild)
81 throws DOMException;
83 public native Node appendChild(Node newChild)
84 throws DOMException;
86 public native boolean hasChildNodes();
88 public native Node cloneNode(boolean deep);
90 public native void normalize();
92 public native boolean isSupported(String feature,
93 String version);
95 public native String getNamespaceURI();
97 public native String getPrefix();
99 public native void setPrefix(String prefix)
100 throws DOMException;
102 public native String getLocalName();
104 public native boolean hasAttributes();
106 public native String getBaseURI();
109 public native short compareDocumentPosition(Node other)
110 throws DOMException;
113 public native String getTextContent()
114 throws DOMException;
116 public native void setTextContent(String textContent)
117 throws DOMException;
120 public native boolean isSameNode(Node other);
122 public native String lookupPrefix(String namespaceURI);
124 public native boolean isDefaultNamespace(String namespaceURI);
126 public native String lookupNamespaceURI(String prefix);
128 public native boolean isEqualNode(Node arg);
130 public native Object getFeature(String feature,
131 String version);
133 public native Object setUserData(String key,
134 Object data,
135 UserDataHandler handler);
137 public native Object getUserData(String key);
139 }