org.cdlib.xtf.lazyTree
Class TextImpl

Object
  extended by NodeImpl
      extended by TextImpl
All Implemented Interfaces:
Source, SourceLocator, FingerprintedNode, Item, NodeInfo, ValueRepresentation
Direct Known Subclasses:
SearchTextImpl

 class TextImpl
extends NodeImpl

A simple text node, which knows how to load its text from the persistent disk file.

Author:
Martin Haye

Field Summary
protected  String text
           
 
Fields inherited from class NodeImpl
document, nameCode, nextSibNum, NODE_LETTER, nodeNum, parentNum, prevSibNum
 
Fields inherited from interface NodeInfo
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES
 
Fields inherited from interface ValueRepresentation
EMPTY_VALUE_ARRAY
 
Constructor Summary
TextImpl()
           
 
Method Summary
 void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId)
          Copy this node to a given outputter
 int getNodeKind()
          Return the type of node.
 String getStringValue()
          Return the character value of the node.
 void init(int textOffset, int textLen)
          Initialize the text node, and load the text.
 
Methods inherited from class NodeImpl
atomize, compareOrder, equals, generateId, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getDocumentRoot, getFingerprint, getFirstChild, getLastChild, getLineNumber, getLocalPart, getNameCode, getNamePool, getNextInDocument, getNextSibling, getParent, getPrefix, getPreviousInDocument, getPreviousSibling, getPublicId, getRoot, getSequenceNumber, getStringValueCS, getSystemId, getTypeAnnotation, getTypedValue, getURI, hasChildNodes, hashCode, isSameNodeInfo, iterateAxis, iterateAxis, sendNamespaceDeclarations, setSystemId
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

text

protected String text
Constructor Detail

TextImpl

TextImpl()
Method Detail

init

public void init(int textOffset,
                 int textLen)
          throws IOException
Initialize the text node, and load the text.

Overrides:
init in class NodeImpl
Throws:
IOException

getStringValue

public String getStringValue()
Return the character value of the node.

Returns:
the string value of the node

getNodeKind

public final int getNodeKind()
Return the type of node.

Returns:
Type.TEXT

copy

public void copy(Receiver out,
                 int whichNamespaces,
                 boolean copyAnnotations,
                 int locationId)
          throws XPathException
Copy this node to a given outputter

Throws:
XPathException