BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.apache.xalan.stree
Class TextImpl

java.lang.Object
  |
  +--weblogic.apache.xml.utils.UnImplNode
        |
        +--weblogic.apache.xalan.stree.Child
              |
              +--weblogic.apache.xalan.stree.TextImpl
Direct Known Subclasses:
CDATASectionImpl, CommentImpl

public class TextImpl
extends Child
implements org.w3c.dom.Text

Class to hold information about a Text node.

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.


Field Summary
protected  java.lang.String m_data
          Text from this Text node
protected  int m_length
          The length of text in the text buffer.
protected  int m_start
          Start of text from this Text node
 
Fields inherited from class weblogic.apache.xalan.stree.Child
m_doc, m_parent
 
Constructor Summary
TextImpl(DocumentImpl doc, char[] ch, int start, int length)
          Constructor TextImpl
TextImpl(DocumentImpl doc, java.lang.String data)
          Constructor TextImpl
 
Method Summary
 void dispatchCharactersEvent(org.xml.sax.ContentHandler ch)
          Send content of this text node as a SAX Characters event.
 java.lang.String getData()
          Retrieve character data currently stored in this node.
 int getLength()
          Report number of characters currently stored in this node's data.
 int getLengthInBuffer()
          Get the length of text in the text buffer.
 java.lang.String getLocalName()
          Returns the local part of the qualified name of this node.
 java.lang.String getNodeName()
          Returns the node name.
 short getNodeType()
          A short integer indicating what type of node this is.
 java.lang.String getNodeValue()
          Return the text that constitutes this node's data.
 int getStartOffsetInBuffer()
          Get the start of text in the text buffer.
 boolean isWhitespace()
           
 
Methods inherited from class weblogic.apache.xalan.stree.Child
getAttributes, getFirstChild, getLastChild, getLevel, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTagName, getTransformer, getUid, hasChildNodes, isComplete, isNamespaceNode, isSupported, setAttribute, setComplete, setDoc, setLevel, setParent, setUid, throwIfParseError, throwParseError
 
Methods inherited from class weblogic.apache.xml.utils.UnImplNode
appendChild, appendData, cloneNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, error, error, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildNodes, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, getOwnerElement, getSpecified, hasAttribute, hasAttributeNS, hasAttributes, importNode, insertBefore, insertData, item, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, replaceChild, replaceData, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setNodeValue, setPrefix, setValue, splitText, substringData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_data

protected java.lang.String m_data
Text from this Text node

m_start

protected int m_start
Start of text from this Text node

m_length

protected int m_length
The length of text in the text buffer.
Constructor Detail

TextImpl

public TextImpl(DocumentImpl doc,
                java.lang.String data)
Constructor TextImpl

Parameters:
doc - Document object
data - Text from node

TextImpl

public TextImpl(DocumentImpl doc,
                char[] ch,
                int start,
                int length)
Constructor TextImpl

Parameters:
doc - Document object
ch - Array containing text from node
start - Start location of text in array
length - Length of text in array
Method Detail

getStartOffsetInBuffer

public int getStartOffsetInBuffer()
Get the start of text in the text buffer.

Returns:
the start of text in the text buffer.

getLengthInBuffer

public int getLengthInBuffer()
Get the length of text in the text buffer.

Returns:
the length of text in the text buffer.

dispatchCharactersEvent

public void dispatchCharactersEvent(org.xml.sax.ContentHandler ch)
                             throws org.xml.sax.SAXException
Send content of this text node as a SAX Characters event. Handles both the case where the Text node has stored its data as a local string and that in which the data has been placed in a FastStringBuffer pool.

Parameters:
ch - Content handler to handle SAX events
Throws:
SAXException - if the content handler characters event throws a SAXException.
Overrides:
dispatchCharactersEvent in class Child

getNodeType

public short getNodeType()
A short integer indicating what type of node this is. The named constants for this value are defined in the org.w3c.dom.Node interface.

Returns:
TEXT_NODE node type
Overrides:
getNodeType in class UnImplNode

getNodeName

public java.lang.String getNodeName()
Returns the node name.

Returns:
Text node name
Overrides:
getNodeName in class UnImplNode

getLocalName

public java.lang.String getLocalName()
Returns the local part of the qualified name of this node.
For nodes created with a DOM Level 1 method, such as createElement from the Document interface, it is null.

Returns:
Text node name
Overrides:
getLocalName in class Child

getData

public java.lang.String getData()
Retrieve character data currently stored in this node.

Returns:
Text from this text node
Throws:
DOMExcpetion(DOMSTRING_SIZE_ERR) - In some implementations, the stored data may exceed the permitted length of strings. If so, getData() will throw this DOMException advising the user to instead retrieve the data in chunks via the substring() operation.

getLength

public int getLength()
Report number of characters currently stored in this node's data. It may be 0, meaning that the value is an empty string.

Returns:
number of characters in this node's data.
Overrides:
getLength in class UnImplNode

getNodeValue

public java.lang.String getNodeValue()
Return the text that constitutes this node's data.

Returns:
this node's data
Overrides:
getNodeValue in class UnImplNode

isWhitespace

public boolean isWhitespace()


Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.