|
Project JXTA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jxta.impl.document.TextElementCommon
net.jxta.impl.document.PlainTextElement
public class PlainTextElement
This class is an implementation of the StructuredDocument interface using simple text
| Field Summary | |
|---|---|
protected PlainTextDocument |
doc
|
protected String |
name
|
protected Element |
parent
|
protected String |
val
|
| Constructor Summary | |
|---|---|
protected |
PlainTextElement(PlainTextDocument doc,
String name)
Creates new PlainTextElement |
protected |
PlainTextElement(PlainTextDocument doc,
String name,
String val)
Creates new PlainTextElement |
| Method Summary | |
|---|---|
String |
addAttribute(Attribute newAttrib)
Adds an attribute with the given name and value. |
String |
addAttribute(String name,
String value)
|
void |
appendChild(TextElement element)
|
boolean |
equals(Object element)
|
Attribute |
getAttribute(String name)
|
Enumeration |
getAttributes()
|
Enumeration |
getChildren()
|
Enumeration |
getChildren(String name)
|
String |
getName()
|
Element |
getParent()
|
StructuredDocument |
getRoot()
|
String |
getTextValue()
|
protected void |
printNice(Writer into,
int indent,
boolean recurse)
Write the contents of this element and optionally its children. |
| 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 |
|---|
protected PlainTextDocument doc
protected Element parent
protected final String name
protected final String val
| Constructor Detail |
|---|
protected PlainTextElement(PlainTextDocument doc,
String name)
protected PlainTextElement(PlainTextDocument doc,
String name,
String val)
| Method Detail |
|---|
public boolean equals(Object element)
equals in class Objectpublic StructuredDocument getRoot()
getRoot in interface Elementpublic Element getParent()
getParent in interface Elementpublic Enumeration getChildren()
getChildren in interface Elementpublic String getName()
getName in interface TextElementpublic String getTextValue()
getTextValue in interface TextElementpublic void appendChild(TextElement element)
appendChild in interface TextElementpublic Enumeration getChildren(String name)
getChildren in interface TextElement
protected void printNice(Writer into,
int indent,
boolean recurse)
throws IOException
into - The java.io.Writer that the output will be sent to.indent - the number of tabs which will be inserted before each
line.recurse - if true then also print the children of this element.
IOException
public String addAttribute(String name,
String value)
addAttribute in interface Attributablepublic String addAttribute(Attribute newAttrib)
addAttribute in interface AttributablenewAttrib - new attribute.
public Enumeration getAttributes()
getAttributes in interface Attributablepublic Attribute getAttribute(String name)
getAttribute in interface Attributable
|
JXTA J2SE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||