com.icl.saxon.tinytree
Class TinyNamespaceImpl

java.lang.Object
  |
  +--com.icl.saxon.om.AbstractNode
        |
        +--com.icl.saxon.tinytree.TinyNodeImpl
              |
              +--com.icl.saxon.tinytree.TinyNamespaceImpl
All Implemented Interfaces:
javax.xml.transform.dom.DOMLocator, org.w3c.dom.Node, NodeInfo, javax.xml.transform.Source, javax.xml.transform.SourceLocator

final class TinyNamespaceImpl
extends TinyNodeImpl

A node in the XML parse tree representing a Namespace. Note that this is generated only "on demand", when the namespace axis is expanded.

Version:
28 September 2000
Author:
Fields inherited from class com.icl.saxon.tinytree.TinyNodeImpl
document, nodeNr, parent
 
Fields inherited from class com.icl.saxon.om.AbstractNode
NODE_LETTER
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface com.icl.saxon.om.NodeInfo
ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, NODE, NONE, NUMBER_OF_TYPES, PI, ROOT, TEXT
 
Constructor Summary
TinyNamespaceImpl(TinyDocumentImpl doc, int nodeNr)
           
 
Method Summary
 void copy(Outputter out)
          Copy this node to a given outputter
 java.lang.String generateId()
          Get unique identifier.
 java.lang.String getDisplayName()
          Get the display name of this node.
 int getFingerprint()
          Get the fingerprint
 java.lang.String getLocalName()
          Get the local name of this node.
 int getNameCode()
          Get the nameCode, for name matching
 int getNamespaceCode()
          Get the namespace code (a numeric representation of the prefix and URI)
 short getNodeType()
          Return the type of node.
 NodeInfo getParent()
          Get the parent element of this namespace node
 java.lang.String getPrefix()
          Get the prefix part of the name of this node.
protected  long getSequenceNumber()
          Get the node sequence number (in document order).
 java.lang.String getStringValue()
          Return the string value of the node.
 java.lang.String getURI()
          Get the URI part of the name of this node.
 boolean isSameNode(NodeInfo other)
          Determine whether this is the same node as another node
protected  void setParentNode(int nodeNr)
          Set the parent element for this namespace node
 
Methods inherited from class com.icl.saxon.tinytree.TinyNodeImpl
compareOrder, getAttributeValue, getAttributeValue, getBaseURI, getDocumentRoot, getEnumeration, getLineNumber, getOriginatingNode, getSystemId, hasAttributes, hasChildNodes, outputNamespaceNodes, setLineNumber, setParentNode, setSystemId
 
Methods inherited from class com.icl.saxon.om.AbstractNode
appendChild, appendData, cloneNode, copyStringValue, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, disallowUpdate, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getChildNodes, getColumnNumber, getData, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getImplementation, getLastChild, getLength, getName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getOwnerElement, getParentNode, getPreviousSibling, getPublicId, getSpecified, getTagName, getValue, hasAttribute, hasAttributeNS, importNode, insertBefore, insertData, isSupported, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, replaceData, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setNodeValue, setPrefix, setValue, splitText, substringData, supports
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TinyNamespaceImpl

public TinyNamespaceImpl(TinyDocumentImpl doc,
                         int nodeNr)
Method Detail

getNamespaceCode

public int getNamespaceCode()
Get the namespace code (a numeric representation of the prefix and URI)

getFingerprint

public int getFingerprint()
Get the fingerprint
Overrides:
getFingerprint in class TinyNodeImpl

setParentNode

protected void setParentNode(int nodeNr)
Set the parent element for this namespace node

getNameCode

public int getNameCode()
Get the nameCode, for name matching
Overrides:
getNameCode in class TinyNodeImpl
Following copied from interface: com.icl.saxon.om.NodeInfo
See Also:
allocate, getFingerprint

getPrefix

public java.lang.String getPrefix()
Get the prefix part of the name of this node. This is the name before the ":" if any.
Overrides:
getPrefix in class TinyNodeImpl
Returns:
the prefix part of the name. Always null.

getDisplayName

public java.lang.String getDisplayName()
Get the display name of this node. For namespaces this is the namespace prefix.
Overrides:
getDisplayName in class TinyNodeImpl
Returns:
The display name of this node. For a node with no name, return an empty string.

getLocalName

public java.lang.String getLocalName()
Get the local name of this node. For namespaces this is the namespace prefix.
Overrides:
getLocalName in class TinyNodeImpl
Returns:
The local name of this node.

getURI

public java.lang.String getURI()
Get the URI part of the name of this node.
Overrides:
getURI in class TinyNodeImpl
Returns:
The URI of the namespace of this node. Always null.

getParent

public NodeInfo getParent()
Get the parent element of this namespace node
Overrides:
getParent in class TinyNodeImpl
Following copied from class: com.icl.saxon.tinytree.TinyNodeImpl
Returns:
The Node object describing the containing element or root node.

isSameNode

public final boolean isSameNode(NodeInfo other)
Determine whether this is the same node as another node
Overrides:
isSameNode in class TinyNodeImpl
Returns:
true if this Node object and the supplied Node object represent the same node in the tree.

getNodeType

public final short getNodeType()
Return the type of node.
Returns:
NodeInfo.NAMESPACE

getStringValue

public final java.lang.String getStringValue()
Return the string value of the node.
Returns:
the namespace uri

generateId

public java.lang.String generateId()
Get unique identifier. Returns key of owning element with the namespace prefix as a suffix
Overrides:
generateId in class TinyNodeImpl
Following copied from class: com.icl.saxon.tinytree.TinyNodeImpl
Returns:
a string.

copy

public void copy(Outputter out)
          throws javax.xml.transform.TransformerException
Copy this node to a given outputter

getSequenceNumber

protected long getSequenceNumber()
Get the node sequence number (in document order). Sequence numbers are monotonic but not consecutive. In the current implementation, parent nodes (elements and roots) have a zero least-significant word, while namespaces, attributes, text nodes, comments, and PIs have the top word the same as their owner and the bottom half reflecting their relative position.
Overrides:
getSequenceNumber in class TinyNodeImpl