a2cea09b3e000b8947b1615de031af653a09ac2f
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 implements org.w3c.dom.Node
44 {
46 public native String getNodeName();
48 public native String getNodeValue()
49 throws DOMException;
50 public native void setNodeValue(String nodeValue)
51 throws DOMException;
53 public native short getNodeType();
55 public native Node getParentNode();
57 public native NodeList getChildNodes();
59 public native Node getFirstChild();
61 public native Node getLastChild();
63 public native Node getPreviousSibling();
65 public native Node getNextSibling();
67 public native NamedNodeMap getAttributes();
69 public native Document getOwnerDocument();
71 public native Node insertBefore(Node newChild,
72 Node refChild)
73 throws DOMException;
75 public native Node replaceChild(Node newChild,
76 Node oldChild)
77 throws DOMException;
79 public native Node removeChild(Node oldChild)
80 throws DOMException;
82 public native Node appendChild(Node newChild)
83 throws DOMException;
85 public native boolean hasChildNodes();
87 public native Node cloneNode(boolean deep);
89 public native void normalize();
91 public native boolean isSupported(String feature,
92 String version);
94 public native String getNamespaceURI();
96 public native String getPrefix();
98 public native void setPrefix(String prefix)
99 throws DOMException;
101 public native String getLocalName();
103 public native boolean hasAttributes();
105 public native String getBaseURI();
108 public native short compareDocumentPosition(Node other)
109 throws DOMException;
112 public native String getTextContent()
113 throws DOMException;
115 public native void setTextContent(String textContent)
116 throws DOMException;
119 public native boolean isSameNode(Node other);
121 public native String lookupPrefix(String namespaceURI);
123 public native boolean isDefaultNamespace(String namespaceURI);
125 public native String lookupNamespaceURI(String prefix);
127 public native boolean isEqualNode(Node arg);
129 public native Object getFeature(String feature,
130 String version);
132 public native Object setUserData(String key,
133 Object data,
134 UserDataHandler handler);
136 public native Object getUserData(String key);
138 }