Project JXTA

net.jxta.impl.document
Class PlainTextElement

java.lang.Object
  |
  +--net.jxta.impl.document.TextElementCommon
        |
        +--net.jxta.impl.document.PlainTextElement
Direct Known Subclasses:
PlainTextDocument

public class PlainTextElement
extends TextElementCommon

This class is an implementation of the StructuredDocument interface using simple text

Since:
JXTA 1.0

Field Summary
protected  PlainTextDocument doc
           
protected  java.lang.String name
           
protected  net.jxta.document.Element parent
           
protected  java.lang.String val
           
 
Constructor Summary
protected PlainTextElement(PlainTextDocument doc, java.lang.String name)
          Creates new PlainTextElement
protected PlainTextElement(PlainTextDocument doc, java.lang.String name, java.lang.String val)
          Creates new PlainTextElement
 
Method Summary
 void appendChild(net.jxta.document.TextElement element)
           
 boolean equals(java.lang.Object element)
          Tests two elements for equality.
 java.util.Enumeration getChildren()
           
 java.util.Enumeration getChildren(java.lang.String name)
           
 java.lang.String getName()
           
 net.jxta.document.Element getParent()
           
 java.lang.String getTextValue()
           
protected  void printNice(java.io.Writer into, int indent, boolean recurse)
           
 
Methods inherited from class net.jxta.impl.document.TextElementCommon
appendChild, getChildren, getKey, getValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

doc

protected PlainTextDocument doc

parent

protected net.jxta.document.Element parent

name

protected final java.lang.String name

val

protected final java.lang.String val
Constructor Detail

PlainTextElement

protected PlainTextElement(PlainTextDocument doc,
                           java.lang.String name)
Creates new PlainTextElement

PlainTextElement

protected PlainTextElement(PlainTextDocument doc,
                           java.lang.String name,
                           java.lang.String val)
Creates new PlainTextElement
Method Detail

getName

public java.lang.String getName()

getTextValue

public java.lang.String getTextValue()

getParent

public net.jxta.document.Element getParent()

appendChild

public void appendChild(net.jxta.document.TextElement element)

getChildren

public java.util.Enumeration getChildren()

getChildren

public java.util.Enumeration getChildren(java.lang.String name)

equals

public boolean equals(java.lang.Object element)
Tests two elements for equality.
Overrides:
equals in class java.lang.Object
Parameters:
element - the element to be compared against.
Returns:
true if the elements are equal (by whatever definition of equality is appropriate) otherwise false

printNice

protected void printNice(java.io.Writer into,
                         int indent,
                         boolean recurse)

Project JXTA