com.jclark.xsl.dom
Class NodeBase

java.lang.Object
  |
  +--com.jclark.xsl.dom.NodeBase
All Implemented Interfaces:
Node
Direct Known Subclasses:
AttributeNode, CommentNode, ContainerNode, ProcessingInstructionNode, TextNode

public abstract class NodeBase
extends java.lang.Object
implements Node


Field Summary
 org.w3c.dom.Node domNode
           
(package private)  int level
           
(package private)  ContainerNode parent
           
(package private)  RootNode root
           
 
Fields inherited from interface com.jclark.xsl.om.Node
ATTRIBUTE, COMMENT, ELEMENT, N_TYPES, PROCESSING_INSTRUCTION, ROOT, TEXT
 
Constructor Summary
(package private) NodeBase(org.w3c.dom.Node domNode)
           
(package private) NodeBase(org.w3c.dom.Node domNode, ContainerNode parent, int childIndex)
           
 
Method Summary
 int compareTo(Node node)
           
 boolean equals(java.lang.Object obj)
           
 Node getAttribute(Name name)
           
 SafeNodeIterator getAttributes()
           
 java.lang.String getAttributeValue(Name name)
           
 SafeNodeIterator getChildren()
           
 java.lang.String getData()
          Returns text for TEXT node; value for attribute node; content for comment node; content after PI for PI node; null otherwise.
 Node getElementWithId(java.lang.String id)
           
 SafeNodeIterator getFollowingSiblings()
           
 java.lang.String getGeneratedId()
           
 int getLineNumber()
           
 Name getName()
          Returns element type name for element; attribute name for an attribute; target for a PI.
 NamespacePrefixMap getNamespacePrefixMap()
           
 Node getParent()
           
 Node getRoot()
           
 java.lang.String getUnparsedEntityURI(java.lang.String name)
           
 java.net.URL getURL()
           
 boolean isId(java.lang.String id)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jclark.xsl.om.Node
getType
 

Field Detail

domNode

public final org.w3c.dom.Node domNode

level

int level

parent

ContainerNode parent

root

RootNode root
Constructor Detail

NodeBase

NodeBase(org.w3c.dom.Node domNode)

NodeBase

NodeBase(org.w3c.dom.Node domNode,
         ContainerNode parent,
         int childIndex)
Method Detail

getParent

public Node getParent()
Specified by:
getParent in interface Node

getGeneratedId

public java.lang.String getGeneratedId()
Specified by:
getGeneratedId in interface Node

compareTo

public int compareTo(Node node)
Specified by:
compareTo in interface Node

getData

public java.lang.String getData()
Description copied from interface: Node
Returns text for TEXT node; value for attribute node; content for comment node; content after PI for PI node; null otherwise.

Specified by:
getData in interface Node

getName

public Name getName()
Description copied from interface: Node
Returns element type name for element; attribute name for an attribute; target for a PI.

Specified by:
getName in interface Node

getAttributeValue

public java.lang.String getAttributeValue(Name name)
Specified by:
getAttributeValue in interface Node

getAttribute

public Node getAttribute(Name name)
Specified by:
getAttribute in interface Node

getElementWithId

public Node getElementWithId(java.lang.String id)
Specified by:
getElementWithId in interface Node

isId

public boolean isId(java.lang.String id)
Specified by:
isId in interface Node

getNamespacePrefixMap

public NamespacePrefixMap getNamespacePrefixMap()
Specified by:
getNamespacePrefixMap in interface Node

getUnparsedEntityURI

public java.lang.String getUnparsedEntityURI(java.lang.String name)
Specified by:
getUnparsedEntityURI in interface Node

getChildren

public SafeNodeIterator getChildren()
Specified by:
getChildren in interface Node

getAttributes

public SafeNodeIterator getAttributes()
Specified by:
getAttributes in interface Node

getURL

public java.net.URL getURL()
Specified by:
getURL in interface Node

getLineNumber

public int getLineNumber()
Specified by:
getLineNumber in interface Node

getFollowingSiblings

public SafeNodeIterator getFollowingSiblings()
Specified by:
getFollowingSiblings in interface Node

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getRoot

public Node getRoot()
Specified by:
getRoot in interface Node