com.jclark.xsl.dom

Class NodeBase

Implemented Interfaces:
Node, SourceLocator
Known Direct Subclasses:
AttributeNode, CommentNode, ContainerNode, ProcessingInstructionNode, TextNode

(package private) abstract class NodeBase
extends java.lang.Object
implements Node

Base class wrapper which presents our xt om Node interface around a W3C Level 1 DOM node

Field Summary

(package private) 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

ALLTYPES, ATTRIBUTE, COMMENT, ELEMENT, N_TYPES, PROCESSING_INSTRUCTION, ROOT, TEXT

Constructor Summary

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

Method Summary

int
compareTo(Node node)
also compares document order
boolean
equals(Object obj)
Node
getAttribute(Name name)
default behavior -- return null.
String
getAttributeValue(Name name)
default behavior -- return null.
SafeNodeIterator
getAttributes()
does this only work on Elements?
SafeNodeIterator
getChildren()
as the name implies ...
int
getColumnNumber()
String
getData()
default behavior -- return null.
Node
getElementWithId(String id)
finds an Element Node, in the this node's document, with the given ID
SafeNodeIterator
getFollowingSiblings()
as the name implies ...
String
getGeneratedId()
guaranteed to be unique (and repeatable)
int
getLineNumber()
if decorated with locator events, this returns the line number in the XML source where this node was found
Name
getName()
default behavior -- return null.
NamespacePrefixMap
getNamespacePrefixMap()
in-scope namespaces ??
Node
getParent()
as the name implies ...
String
getPublicId()
Node
getRoot()
gets the owning Document's root
String
getSystemId()
URL
getURL()
base URL ??
String
getUnparsedEntityURI(String name)
boolean
isId(String id)
if this is an attribute?? and it is of type ID ?

Field Details

domNode

(package private) final org.w3c.dom.Node domNode


level

(package private)  int level


parent

(package private)  ContainerNode parent


root

(package private)  RootNode root

Constructor Details

NodeBase

(package private)  NodeBase(org.w3c.dom.Node domNode)


NodeBase

(package private)  NodeBase(org.w3c.dom.Node domNode,
                            ContainerNode parent,
                            int childIndex)

Method Details

compareTo

public int compareTo(Node node)
also compares document order
Specified by:
compareTo in interface Node


equals

public boolean equals(Object obj)


getAttribute

public Node getAttribute(Name name)
default behavior -- return null. Descendant classes override
Specified by:
getAttribute in interface Node


getAttributeValue

public String getAttributeValue(Name name)
default behavior -- return null. Descendant classes override
Specified by:
getAttributeValue in interface Node


getAttributes

public SafeNodeIterator getAttributes()
does this only work on Elements?
Specified by:
getAttributes in interface Node


getChildren

public SafeNodeIterator getChildren()
as the name implies ...
Specified by:
getChildren in interface Node


getColumnNumber

public int getColumnNumber()


getData

public String getData()
default behavior -- return null. Descendant classes override
Specified by:
getData in interface Node


getElementWithId

public Node getElementWithId(String id)
finds an Element Node, in the this node's document, with the given ID
Specified by:
getElementWithId in interface Node


getFollowingSiblings

public SafeNodeIterator getFollowingSiblings()
as the name implies ...
Specified by:
getFollowingSiblings in interface Node


getGeneratedId

public String getGeneratedId()
guaranteed to be unique (and repeatable)
Specified by:
getGeneratedId in interface Node


getLineNumber

public int getLineNumber()
if decorated with locator events, this returns the line number in the XML source where this node was found
Specified by:
getLineNumber in interface Node


getName

public Name getName()
default behavior -- return null. Descendant classes override
Specified by:
getName in interface Node


getNamespacePrefixMap

public NamespacePrefixMap getNamespacePrefixMap()
in-scope namespaces ??
Specified by:
getNamespacePrefixMap in interface Node


getParent

public Node getParent()
as the name implies ...
Specified by:
getParent in interface Node


getPublicId

public String getPublicId()


getRoot

public Node getRoot()
gets the owning Document's root
Specified by:
getRoot in interface Node


getSystemId

public String getSystemId()


getURL

public URL getURL()
base URL ??
Specified by:
getURL in interface Node


getUnparsedEntityURI

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


isId

public boolean isId(String id)
if this is an attribute?? and it is of type ID ?
Specified by:
isId in interface Node