Main Page | Class Hierarchy | Class List | Class Members

org::jdom::Text Class Reference

Inheritance diagram for org::jdom::Text:

org::jdom::Content org::jdom::CDATA List of all members.

Public Member Functions

 Text (String str)
String getText ()
String getTextTrim ()
String getTextNormalize ()
Text setText (String str)
void append (String str)
void append (Text text)
String getValue ()
String toString ()
Object clone ()

Static Public Member Functions

String normalizeString (String str)

Protected Member Functions

 Text ()

Protected Attributes

String value

Static Package Attributes

final String EMPTY_STRING = ""

Detailed Description

Character-based XML content. Provides a modular, parentable method of representing text. Text makes no guarantees about the underlying textual representation of character data, but does expose that data as a Java String.

Version:
Revision
1.24
,
Date
2004/02/27 11:32:57
Author:
Brett McLaughlin

Jason Hunter

Bradley S. Huffman


Constructor & Destructor Documentation

org::jdom::Text::Text  )  [inline, protected]
 

This is the protected, no-args constructor standard in all JDOM classes. It allows subclassers to get a raw instance with no initialization.

org::jdom::Text::Text String  str  )  [inline]
 

This constructor creates a new Text node, with the supplied string value as it's character content.

Parameters:
str the node's character content.
Exceptions:
IllegalDataException if str contains an illegal character such as a vertical tab (as determined by org.jdom.Verifier#checkCharacterData)


Member Function Documentation

void org::jdom::Text::append Text  text  )  [inline]
 

This will append the content of another Text node to this node.

Parameters:
text Text node to append.

void org::jdom::Text::append String  str  )  [inline]
 

This will append character content to whatever content already exists within this Text node.

Parameters:
str character content to append.
Exceptions:
IllegalDataException if str contains an illegal character such as a vertical tab (as determined by org.jdom.Verifier#checkCharacterData)

Reimplemented in org::jdom::CDATA.

Object org::jdom::Text::clone  )  [inline]
 

This will return a clone of this Text node, with the same character content, but no parent.

Returns:
Text - cloned node.

Reimplemented from org::jdom::Content.

String org::jdom::Text::getText  )  [inline]
 

This returns the value of this Text node as a Java String.

Returns:
String - character content of this node.

String org::jdom::Text::getTextNormalize  )  [inline]
 

This returns the textual content with all surrounding whitespace removed and internal whitespace normalized to a single space. If only whitespace exists, the empty string is returned.

Returns:
normalized text content or empty string

String org::jdom::Text::getTextTrim  )  [inline]
 

This returns the textual content with all surrounding whitespace removed. If only whitespace exists, the empty string is returned.

Returns:
trimmed text content or empty string

String org::jdom::Text::getValue  )  [inline, virtual]
 

Returns the XPath 1.0 string value of this element, which is the text itself.

Returns:
the text

Implements org::jdom::Content.

String org::jdom::Text::normalizeString String  str  )  [inline, static]
 

This returns a new string with all surrounding whitespace removed and internal whitespace normalized to a single space. If only whitespace exists, the empty string is returned.

Per XML 1.0 Production 3 whitespace includes: #x20, #x9, #xD, #xA

Parameters:
str string to be normalized.
Returns:
normalized string or empty string

Text org::jdom::Text::setText String  str  )  [inline]
 

This will set the value of this Text node.

Parameters:
str value for node's content.
Returns:
the object on which the method was invoked
Exceptions:
IllegalDataException if str contains an illegal character such as a vertical tab (as determined by org.jdom.Verifier#checkCharacterData)

Reimplemented in org::jdom::CDATA.

String org::jdom::Text::toString  )  [inline]
 

This returns a String representation of the Text node, suitable for debugging. If the XML representation of the Text node is desired, either getText or org.jdom.output.XMLOutputter#outputString(Text) should be used.

Returns:
String - information about this node.

Reimplemented in org::jdom::CDATA.


Member Data Documentation

String org::jdom::Text::value [protected]
 

The actual character content


The documentation for this class was generated from the following file:
Generated on Thu Dec 9 10:42:05 2004 for JDOM by  doxygen 1.3.9.1