|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.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 IBiNode
public final void setPrevious(IBiNode prev)
setPrevious
in interface IBiNode
prev
- previous node for this nodepublic final BiNode getParent()
getParent
in interface IBiNode
public final IBiNode getSibling()
getSibling
in interface IBiNode
public final void setSibling(IBiNode sibl)
setSibling
in interface IBiNode
sibl
- new sibling for this nodepublic final void addSibling(IBiNode sibl)
addSibling
in interface IBiNode
sibl
- new sibling for this nodepublic final Node getNode()
getNode
in interface IBiNode
public final void setNode(Node n)
setNode
in interface IBiNode
n
- reference in DOM-treepublic final int getLength()
getLength
in interface IBiNode
public final void setLength(int len)
setLength
in interface IBiNode
len
- to setpublic final void changeLengthRec(int change)
changeLengthRec
in interface IBiNode
change
- 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 IBiNode
insert
- 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 IBiNode
n
- 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 |