|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jeuclid.biparser.AbstractBiNode
public abstract class AbstractBiNode
this class is used to store typical information about a xml-node.
| Constructor Summary | |
|---|---|
AbstractBiNode()
|
|
| Method Summary | |
|---|---|
void |
addSibling(IBiNode sibl)
add sibling to a node, not possible at a textnode. if node already has a sibling, forward to sibling. |
void |
changeLengthRec(int change)
change length of node and recursive of all parents. |
String |
formatLength()
helper method for outputting the length of node. |
void |
forwardToSibling(boolean insert,
BiTree biTree,
int offset,
int len,
int totalOffset)
helper method to insert or remove characters. |
int |
getLength()
get length of node (number of characters). |
Node |
getNode()
get reference to node in DOM-tree. |
BiNode |
getParent()
get parent node for this node. |
IBiNode |
getPrevious()
get previous node, null if node is root. |
IBiNode |
getSibling()
get sibling node, can be null. |
TextPosition |
searchNode(Node n,
int totalOffset)
search a DOM node in this node. if nodes are equal return offset to begin of inputtext, else null |
void |
setLength(int len)
set length of node. |
void |
setNode(Node n)
set reference to node in DOM-tree. |
void |
setPrevious(IBiNode prev)
set previous for this node. |
void |
setSibling(IBiNode sibl)
set sibling for this node and set previous of sibling to this. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sourceforge.jeuclid.biparser.IBiNode |
|---|
createDOMSubtree, getType, insert, remove, toString |
| Constructor Detail |
|---|
public AbstractBiNode()
| Method Detail |
|---|
public final IBiNode getPrevious()
getPrevious in interface IBiNodepublic final void setPrevious(IBiNode prev)
setPrevious in interface IBiNodeprev - previous node for this nodepublic final BiNode getParent()
getParent in interface IBiNodepublic final IBiNode getSibling()
getSibling in interface IBiNodepublic final void setSibling(IBiNode sibl)
setSibling in interface IBiNodesibl - new sibling for this nodepublic final void addSibling(IBiNode sibl)
addSibling in interface IBiNodesibl - new sibling for this nodepublic final Node getNode()
getNode in interface IBiNodepublic final void setNode(Node n)
setNode in interface IBiNoden - reference in DOM-treepublic final int getLength()
getLength in interface IBiNodepublic final void setLength(int len)
setLength in interface IBiNodelen - to setpublic final void changeLengthRec(int change)
changeLengthRec in interface IBiNodechange - changevalue (can be positive or negative)
public void forwardToSibling(boolean insert,
BiTree biTree,
int offset,
int len,
int totalOffset)
throws ReparseException,
NonIncrementalElementException
forwardToSibling in interface IBiNodeinsert - if true call insert-method else remove-methodbiTree - reference to BiTree to which this node containsoffset - position to insert/remove characterslen - number of characters to insert/removetotalOffset - offset of node to begin of text
ReparseException - if a reparse at upper level is needed
NonIncrementalElementException - if the subtree contains an element which cannot be
incrementally updated.
public TextPosition searchNode(Node n,
int totalOffset)
searchNode in interface IBiNoden - DOM node to search fortotalOffset - offset of node to begin of inputtext
public String formatLength()
formatLength in interface IBiNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||