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.
8
* Copyright (C) 2007 Bob Jamison
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 2.1 of the License, or (at your option) any later version.
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.
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
25
package org.inkscape.dom;
31
public class NodeImpl extends DOMBase
32
implements org.w3c.dom.Node
36
* Adds the node newChild to the end of the list of children of this node.
38
public Node appendChild(Node newChild)
45
* Returns a duplicate of this node, i.e., serves as a generic copy
46
* constructor for nodes.
48
public Node cloneNode(boolean deep)
54
* Compares the reference node, i.e.
56
public short compareDocumentPosition(Node other)
62
* A NamedNodeMap containing the attributes of this node (if it is
63
* an Element) or null otherwise.
65
public NamedNodeMap getAttributes()
71
* The absolute base URI of this node or null if the
72
* implementation wasn't able to obtain an absolute URI.
74
public String getBaseURI()
80
* A NodeList that contains all children of this node.
82
public NodeList getChildNodes()
88
* This method returns a specialized object which implements the
89
* specialized APIs of the specified feature and version, as specified in .
91
public Object getFeature(String feature, String version)
97
* The first child of this node.
99
public Node getFirstChild()
105
* The last child of this node.
107
public Node getLastChild()
113
* Returns the local part of the qualified name of this node.
115
public String getLocalName()
121
* The namespace URI of this node, or null if it is unspecified (see ).
123
public String getNamespaceURI()
129
* The node immediately following this node.
131
public Node getNextSibling()
137
* The name of this node, depending on its type; see the table above.
139
public String getNodeName()
145
* A code representing the type of the underlying object,
148
public short getNodeType()
154
* The value of this node, depending on its type; see the table above.
156
public String getNodeValue()
162
* The Document object associated with this node.
164
public Document getOwnerDocument()
170
* The parent of this node.
172
public Node getParentNode()
178
* The namespace prefix of this node, or null if it is unspecified.
180
public String getPrefix()
186
* The node immediately preceding this node.
188
public Node getPreviousSibling()
194
* This attribute returns the text content of this node
195
* and its descendants.
197
public String getTextContent()
203
* Retrieves the object associated to a key on a this node.
205
public Object getUserData(String key)
211
* Returns whether this node (if it is an element) has any attributes.
213
public boolean hasAttributes()
219
* Returns whether this node has any children.
221
public boolean hasChildNodes()
227
* Inserts the node newChild before the existing child node refChild.
229
public Node insertBefore(Node newChild, Node refChild)
235
* This method checks if the specified namespaceURI is the
236
* default namespace or not.
238
public boolean isDefaultNamespace(String namespaceURI)
244
* Tests whether two nodes are equal.
246
public boolean isEqualNode(Node arg)
252
* Returns whether this node is the same node as the given one.
254
public boolean isSameNode(Node other)
260
* Tests whether the DOM implementation implements a specific feature
261
* and that feature is supported by this node, as specified in .
263
public boolean isSupported(String feature, String version)
269
* Look up the namespace URI associated to the given prefix,
270
* starting from this node.
272
public String lookupNamespaceURI(String prefix)
278
* Look up the prefix associated to the given namespace URI, starting
281
public String lookupPrefix(String namespaceURI)
287
* Puts all Text nodes in the full depth of the sub-tree underneath
288
* this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
290
public void normalize()
295
* Removes the child node indicated by oldChild from the list of
296
* children, and returns it.
298
public Node removeChild(Node oldChild)
304
* Replaces the child node oldChild with newChild in the list of
305
* children, and returns the oldChild node.
307
public Node replaceChild(Node newChild, Node oldChild)
313
* The value of this node, depending on its type; see the table above.
315
public void setNodeValue(String nodeValue)
320
* The namespace prefix of this node, or null if it is unspecified.
322
public void setPrefix(String prefix)
327
* This attribute returns the text content of this node and
330
public void setTextContent(String textContent)
335
* Associate an object to a key on this node.
337
public Object setUserData(String key, Object data, UserDataHandler handler)