|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jeuclid.biparser.AbstractBiNode net.sourceforge.jeuclid.biparser.TextNode
public final class TextNode
this class is used to store specific information about a text node. the node cannot have a child nor a sibling
Constructor Summary | |
---|---|
TextNode(int length,
String t)
creates a new TextNode, constructor does not create a DOM-node. |
Method Summary | |
---|---|
Node |
createDOMSubtree(Document doc)
create a DOM-textnode. |
void |
forwardToSibling(boolean insert,
BiTree biTree,
int offset,
int length,
int totalOffset)
forward insert/remove to sibling not allowed at a TextNode. |
String |
getText()
get the text of TextNode. |
BiType |
getType()
get the type of node. |
void |
insert(BiTree biTree,
int offset,
int length,
int totalOffset)
insert characters in TextNode, always reparse parent node. |
void |
remove(BiTree biTree,
int offset,
int length,
int totalOffset)
remove characters in TextNode, always reparse parent node. |
TextPosition |
searchNode(Node node,
int totalOffset)
search a DOM node in this node. if nodes are equal return offset to begin of inputtext, else null |
String |
toString()
|
String |
toString(int level)
print biNode. |
Methods inherited from class net.sourceforge.jeuclid.biparser.AbstractBiNode |
---|
addSibling, changeLengthRec, formatLength, getLength, getNode, getParent, getPrevious, getSibling, setLength, setNode, setPrevious, setSibling |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TextNode(int length, String t)
length
- length of childt
- DOM-infoMethod Detail |
---|
public BiType getType()
public void insert(BiTree biTree, int offset, int length, int totalOffset) throws ReparseException
biTree
- reference to BiTree to which this node containsoffset
- position to insert characterslength
- number of characters to inserttotalOffset
- offset of node to begin of text
ReparseException
- if a reparse at upper level is neededpublic void remove(BiTree biTree, int offset, int length, int totalOffset) throws ReparseException
biTree
- reference to BiTree to which this node containsoffset
- position to remove characterslength
- number of characters to removetotalOffset
- offset of node to begin of text
ReparseException
- if a reparse at upper level is neededpublic void forwardToSibling(boolean insert, BiTree biTree, int offset, int length, int totalOffset) throws ReparseException
forwardToSibling
in interface IBiNode
forwardToSibling
in class AbstractBiNode
insert
- if true call insert-method else remove-methodbiTree
- reference to BiTree to which this node containsoffset
- position to insert/remove characterslength
- number of characters to insert/removetotalOffset
- offset of node to begin of text
ReparseException
- if a reparse at upper level is neededpublic String getText()
public Node createDOMSubtree(Document doc)
doc
- Document to create DOM-tree
public TextPosition searchNode(Node node, int totalOffset)
searchNode
in interface IBiNode
searchNode
in class AbstractBiNode
node
- DOM node to search fortotalOffset
- offset of node to begin of inputtext
public String toString()
toString
in class Object
public String toString(int level)
level
- level of recursion tree
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |