|
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
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)
public StructuredDocument getRoot()
getRoot
in interface Element
public Element getParent()
getParent
in interface Element
public Enumeration getChildren()
getChildren
in interface Element
public String getName()
getName
in interface TextElement
public String getTextValue()
getTextValue
in interface TextElement
public void appendChild(TextElement element)
appendChild
in interface TextElement
public 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 Attributable
public String addAttribute(Attribute newAttrib)
addAttribute
in interface Attributable
newAttrib
- new attribute.
public Enumeration getAttributes()
getAttributes
in interface Attributable
public 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 |