|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.bliki.wiki.tags.util.AbstractNode
public abstract class AbstractNode
The concrete base class for all types of nodes.
| Constructor Summary | |
|---|---|
AbstractNode(int start,
int end)
Create an abstract node with the page positions given. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clone this object. |
int |
getEndPosition()
Gets the ending position of the node. |
int |
getStartPosition()
Gets the starting position of the node. |
java.lang.String |
getText()
Returns the text of the node. |
void |
setEndPosition(int position)
Sets the ending position of the node. |
void |
setStartPosition(int position)
Sets the starting position of the node. |
void |
setText(java.lang.String text)
Sets the string contents of the node. |
java.lang.String |
toHtml()
Return the HTML for this node. |
abstract java.lang.String |
toHtml(boolean verbatim)
Return the HTML for this node. |
abstract java.lang.String |
toPlainTextString()
Returns a string representation of the node. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractNode(int start,
int end)
page - The page this tag was read from.start - The starting offset of this node within the page.end - The ending offset of this node within the page.| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic abstract java.lang.String toPlainTextString()
Node node;
for (Enumeration e = parser.elements(); e.hasMoreElements();) {
node = (Node) e.nextElement();
System.out.println(node.toPlainTextString());
// or do whatever processing you wish with the plain text string
}
public java.lang.String toHtml()
public abstract java.lang.String toHtml(boolean verbatim)
verbatim - If true return as close to the original page
text as possible.
public int getStartPosition()
public void setStartPosition(int position)
position - The new start position.public int getEndPosition()
public void setEndPosition(int position)
position - The new end position.public java.lang.String getText()
null.public void setText(java.lang.String text)
text - The new text for the node.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||