net.sourceforge.pmd.lang.ast.xpath.saxon

## Class DocumentNode

- java.lang.Object
- - net.sourceforge.pmd.lang.ast.xpath.saxon.AbstractNodeInfo
  - - net.sourceforge.pmd.lang.ast.xpath.saxon.DocumentNode

All Implemented Interfaces:
  Source, net.sf.saxon.evpull.PullEvent, net.sf.saxon.om.DocumentInfo, net.sf.saxon.om.Item, net.sf.saxon.om.NodeInfo, net.sf.saxon.om.SiblingCountingNode, net.sf.saxon.om.ValueRepresentation, net.sf.saxon.om.VirtualNode

    public class DocumentNode
    extends AbstractNodeInfo
    implements net.sf.saxon.om.DocumentInfo

A Saxon OM Document node for an AST Node.

### Field Summary

Fields
`Map<Node,ElementNode>` `nodeToElementNode` Mapping from AST Node to corresponding ElementNode.
`protected ElementNode` `rootNode` The root ElementNode of the DocumentNode.

### Fields inherited from interface net.sf.saxon.om.NodeInfo

`ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES`

### Fields inherited from interface net.sf.saxon.om.ValueRepresentation

`EMPTY_VALUE_ARRAY`

### Constructor Summary

Constructors
Constructor and Description
`DocumentNode(Node node)` Construct a DocumentNode, with the given AST Node serving as the root ElementNode.

### Method Summary

Methods
`net.sf.saxon.om.DocumentInfo` `getDocumentRoot()`
`int` `getNodeKind()`
`String[]` `getUnparsedEntity(String name)`
`Iterator` `getUnparsedEntityNames()`
`boolean` `hasChildNodes()`
`net.sf.saxon.om.AxisIterator` `iterateAxis(byte axisNumber)`
`net.sf.saxon.om.NodeInfo` `selectID(String id)`

### Methods inherited from class net.sourceforge.pmd.lang.ast.xpath.saxon.AbstractNodeInfo

`atomize, compareOrder, copy, createUnsupportedOperationException, equals, generateId, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getFingerprint, getLineNumber, getLocalPart, getNameCode, getNamePool, getParent, getPrefix, getRoot, getSiblingPosition, getStringValue, getStringValueCS, getSystemId, getTypeAnnotation, getTypedValue, getUnderlyingNode, getURI, isId, isIdref, isNilled, isSameNodeInfo, iterateAxis, setSystemId`

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

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

### Methods inherited from interface net.sf.saxon.om.NodeInfo

`atomize, compareOrder, copy, equals, generateId, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getFingerprint, getLineNumber, getLocalPart, getNameCode, getNamePool, getParent, getPrefix, getRoot, getStringValue, getSystemId, getTypeAnnotation, getURI, hashCode, isId, isIdref, isNilled, isSameNodeInfo, iterateAxis`

### Methods inherited from interface javax.xml.transform.Source

`setSystemId`

### Methods inherited from interface net.sf.saxon.om.Item

`getStringValueCS, getTypedValue`

### Field Detail

#### rootNode

    protected final ElementNode rootNode

The root ElementNode of the DocumentNode.

#### nodeToElementNode

    public final Map<Node,ElementNode> nodeToElementNode

Mapping from AST Node to corresponding ElementNode.

### Constructor Detail

#### DocumentNode

    public DocumentNode(Node node)

Construct a DocumentNode, with the given AST Node serving as the root ElementNode.

Parameters:
  `node` - The root AST Node.
See Also:
  `ElementNode`

### Method Detail

#### getUnparsedEntity

    public String[] getUnparsedEntity(String name)

Specified by:
  `getUnparsedEntity` in interface `net.sf.saxon.om.DocumentInfo`

#### getUnparsedEntityNames

    public Iterator getUnparsedEntityNames()

Specified by:
  `getUnparsedEntityNames` in interface `net.sf.saxon.om.DocumentInfo`

#### selectID

    public net.sf.saxon.om.NodeInfo selectID(String id)

Specified by:
  `selectID` in interface `net.sf.saxon.om.DocumentInfo`

#### getNodeKind

    public int getNodeKind()

Description copied from class: `AbstractNodeInfo`

Specified by:
  `getNodeKind` in interface `net.sf.saxon.om.NodeInfo`
Overrides:
  `getNodeKind` in class `AbstractNodeInfo`

#### getDocumentRoot

    public net.sf.saxon.om.DocumentInfo getDocumentRoot()

Description copied from class: `AbstractNodeInfo`

Specified by:
  `getDocumentRoot` in interface `net.sf.saxon.om.NodeInfo`
Overrides:
  `getDocumentRoot` in class `AbstractNodeInfo`

#### hasChildNodes

    public boolean hasChildNodes()

Description copied from class: `AbstractNodeInfo`

Specified by:
  `hasChildNodes` in interface `net.sf.saxon.om.NodeInfo`
Overrides:
  `hasChildNodes` in class `AbstractNodeInfo`

#### iterateAxis

    public net.sf.saxon.om.AxisIterator iterateAxis(byte axisNumber)

Description copied from class: `AbstractNodeInfo`

Specified by:
  `iterateAxis` in interface `net.sf.saxon.om.NodeInfo`
Overrides:
  `iterateAxis` in class `AbstractNodeInfo`