Package org.w3c.tidy

# Class DOMNodeImpl

java.lang.Object
org.w3c.tidy.DOMNodeImpl

All Implemented Interfaces:
  `Node`

Direct Known Subclasses:
  `DOMAttrImpl`, `DOMCharacterDataImpl`, `DOMDocumentImpl`, `DOMDocumentTypeImpl`, `DOMElementImpl`, `DOMProcessingInstructionImpl`

public class DOMNodeImpl extends Object implements Node
DOMNodeImpl.

Version:
  $Revision: 1132 $ ($Author: aditsu $)
Author:
  Dave Raggett dsr@w3.org , Andy Quick ac.quick@sympatico.ca (translation to Java), Fabrizio Giustina

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Node`
`adaptee`
Wrapped tidy node.

### Fields inherited from interface org.w3c.dom.Node

`ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`DOMNodeImpl(Node adaptee)`
Intantiates a new DOM node.

## Method Summary

Modifier and Type
Method
Description
`Node`
`appendChild(Node newChild)`
`Node`
`cloneNode(boolean deep)`
`short`
`compareDocumentPosition(Node other)`
`NamedNodeMap`
`getAttributes()`
`String`
`getBaseURI()`
`NodeList`
`getChildNodes()`
`Object`
`getFeature(String feature, String version)`
`Node`
`getFirstChild()`
`Node`
`getLastChild()`
`String`
`getLocalName()`
`String`
`getNamespaceURI()`
`Node`
`getNextSibling()`
`String`
`getNodeName()`
`short`
`getNodeType()`
`String`
`getNodeValue()`
`Document`
`getOwnerDocument()`
`Node`
`getParentNode()`
`String`
`getPrefix()`
`Node`
`getPreviousSibling()`
`String`
`getTextContent()`
`Object`
`getUserData(String key)`
`boolean`
`hasAttributes()`
`boolean`
`hasChildNodes()`
`Node`
`insertBefore(Node newChild, Node refChild)`
`boolean`
`isDefaultNamespace(String namespaceURI)`
`boolean`
`isEqualNode(Node arg)`
`boolean`
`isSameNode(Node other)`
`boolean`
`isSupported(String feature, String version)`
`String`
`lookupNamespaceURI(String prefix)`
`String`
`lookupPrefix(String namespaceURI)`
`void`
`normalize()`
Do nothing: text nodes in html documents are important and jtidy already removes useless text during parsing.
`Node`
`removeChild(Node oldChild)`
`Node`
`replaceChild(Node newChild, Node oldChild)`
`void`
`setNodeValue(String nodeValue)`
`void`
`setPrefix(String prefix)`
`void`
`setTextContent(String textContent)`
`Object`
`setUserData(String key, Object data, UserDataHandler handler)`
`boolean`
`supports(String feature, String version)`
DOM2 - not implemented.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### adaptee

protected Node adaptee
Wrapped tidy node.

## Constructor Details

### DOMNodeImpl

protected DOMNodeImpl(Node adaptee)
Intantiates a new DOM node.

Parameters:
  `adaptee` - wrapped Tidy node

## Method Details

### getNodeValue

public String getNodeValue()

Specified by:
  `getNodeValue` in interface `Node`
See Also:
  - `Node.getNodeValue()`

### setNodeValue

public void setNodeValue(String nodeValue)

Specified by:
  `setNodeValue` in interface `Node`
See Also:
  - `Node.setNodeValue(java.lang.String)`

### getNodeName

public String getNodeName()

Specified by:
  `getNodeName` in interface `Node`
See Also:
  - `Node.getNodeName()`

### getNodeType

public short getNodeType()

Specified by:
  `getNodeType` in interface `Node`
See Also:
  - `Node.getNodeType()`

### getParentNode

public Node getParentNode()

Specified by:
  `getParentNode` in interface `Node`
See Also:
  - `Node.getParentNode()`

### getChildNodes

public NodeList getChildNodes()

Specified by:
  `getChildNodes` in interface `Node`
See Also:
  - `Node.getChildNodes()`

### getFirstChild

public Node getFirstChild()

Specified by:
  `getFirstChild` in interface `Node`
See Also:
  - `Node.getFirstChild()`

### getLastChild

public Node getLastChild()

Specified by:
  `getLastChild` in interface `Node`
See Also:
  - `Node.getLastChild()`

### getPreviousSibling

public Node getPreviousSibling()

Specified by:
  `getPreviousSibling` in interface `Node`
See Also:
  - `Node.getPreviousSibling()`

### getNextSibling

public Node getNextSibling()

Specified by:
  `getNextSibling` in interface `Node`
See Also:
  - `Node.getNextSibling()`

### getAttributes

public NamedNodeMap getAttributes()

Specified by:
  `getAttributes` in interface `Node`
See Also:
  - `Node.getAttributes()`

### getOwnerDocument

public Document getOwnerDocument()

Specified by:
  `getOwnerDocument` in interface `Node`
See Also:
  - `Node.getOwnerDocument()`

### insertBefore

public Node insertBefore(Node newChild, Node refChild)

Specified by:
  `insertBefore` in interface `Node`
See Also:
  - `Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)`

### replaceChild

public Node replaceChild(Node newChild, Node oldChild)

Specified by:
  `replaceChild` in interface `Node`
See Also:
  - `Node.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)`

### removeChild

public Node removeChild(Node oldChild)

Specified by:
  `removeChild` in interface `Node`
See Also:
  - `Node.removeChild(org.w3c.dom.Node)`

### appendChild

public Node appendChild(Node newChild)

Specified by:
  `appendChild` in interface `Node`
See Also:
  - `Node.appendChild(org.w3c.dom.Node)`

### hasChildNodes

public boolean hasChildNodes()

Specified by:
  `hasChildNodes` in interface `Node`
See Also:
  - `Node.hasChildNodes()`

### cloneNode

public Node cloneNode(boolean deep)

Specified by:
  `cloneNode` in interface `Node`
See Also:
  - `Node.cloneNode(boolean)`

### normalize

public void normalize()
Do nothing: text nodes in html documents are important and jtidy already removes useless text during parsing.

Specified by:
  `normalize` in interface `Node`
See Also:
  - `Node.normalize()`

### supports

public boolean supports(String feature, String version)
DOM2 - not implemented.

See Also:
  - `isSupported(java.lang.String, java.lang.String)`

### getNamespaceURI

public String getNamespaceURI()

Specified by:
  `getNamespaceURI` in interface `Node`
See Also:
  - `Node.getNamespaceURI()`

### getPrefix

public String getPrefix()

Specified by:
  `getPrefix` in interface `Node`
See Also:
  - `Node.getPrefix()`

### setPrefix

public void setPrefix(String prefix) throws DOMException

Specified by:
  `setPrefix` in interface `Node`
Throws:
  `DOMException`
See Also:
  - `Node.setPrefix(java.lang.String)`

### getLocalName

public String getLocalName()

Specified by:
  `getLocalName` in interface `Node`
See Also:
  - `Node.getLocalName()`

### isSupported

public boolean isSupported(String feature, String version)

Specified by:
  `isSupported` in interface `Node`
See Also:
  - `Node.isSupported(java.lang.String, java.lang.String)`

### hasAttributes

public boolean hasAttributes()

Specified by:
  `hasAttributes` in interface `Node`
See Also:
  - `Node.hasAttributes()`

### compareDocumentPosition

public short compareDocumentPosition(Node other) throws DOMException

Specified by:
  `compareDocumentPosition` in interface `Node`
Throws:
  `DOMException`
See Also:
  - `Node.compareDocumentPosition(org.w3c.dom.Node)`
To Do:
  DOM level 3 compareDocumentPosition() Not implemented.

### getBaseURI

public String getBaseURI()

Specified by:
  `getBaseURI` in interface `Node`
See Also:
  - `Node.getBaseURI()`
To Do:
  DOM level 3 getBaseURI() Not implemented. Returns null.

### getFeature

public Object getFeature(String feature, String version)

Specified by:
  `getFeature` in interface `Node`
See Also:
  - `Node.getFeature(java.lang.String, java.lang.String)`
To Do:
  DOM level 3 getFeature() Not implemented. Returns null.

### getTextContent

public String getTextContent() throws DOMException

Specified by:
  `getTextContent` in interface `Node`
Throws:
  `DOMException`
See Also:
  - `Node.getTextContent()`
To Do:
  DOM level 3 getTextContent() Not implemented. Returns null.

### getUserData

public Object getUserData(String key)

Specified by:
  `getUserData` in interface `Node`
See Also:
  - `Node.getUserData(java.lang.String)`
To Do:
  DOM level 3 getUserData() Not implemented. Returns null.

### isDefaultNamespace

public boolean isDefaultNamespace(String namespaceURI)

Specified by:
  `isDefaultNamespace` in interface `Node`
See Also:
  - `Node.isDefaultNamespace(java.lang.String)`

### isEqualNode

public boolean isEqualNode(Node arg)

Specified by:
  `isEqualNode` in interface `Node`
See Also:
  - `Node.isEqualNode(org.w3c.dom.Node)`
To Do:
  DOM level 3 isEqualNode() Not implemented. Returns false.

### isSameNode

public boolean isSameNode(Node other)

Specified by:
  `isSameNode` in interface `Node`
See Also:
  - `Node.isSameNode(org.w3c.dom.Node)`
To Do:
  DOM level 3 isSameNode() Not implemented. Returns false.

### lookupNamespaceURI

public String lookupNamespaceURI(String prefix)

Specified by:
  `lookupNamespaceURI` in interface `Node`
See Also:
  - `Node.lookupNamespaceURI(java.lang.String)`

### lookupPrefix

public String lookupPrefix(String namespaceURI)

Specified by:
  `lookupPrefix` in interface `Node`
See Also:
  - `Node.lookupPrefix(java.lang.String)`

### setTextContent

public void setTextContent(String textContent) throws DOMException

Specified by:
  `setTextContent` in interface `Node`
Throws:
  `DOMException`
See Also:
  - `Node.setTextContent(java.lang.String)`
To Do:
  DOM level 3 setTextContent() Not implemented. Throws NO_MODIFICATION_ALLOWED_ERR

### setUserData

public Object setUserData(String key, Object data, UserDataHandler handler)

Specified by:
  `setUserData` in interface `Node`
See Also:
  - `Node.setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)`
To Do:
  DOM level 3 setUserData() Not implemented. Returns null.