| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IBiNode
this interface is used to store typcial information about a xml-node.
| 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. | 
|  Node | createDOMSubtree(Document doc)create a DOM-tree from node. | 
|  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. | 
|  BiType | getType()get the type of node, can be BiNode, EmptyNode or TextNode. | 
|  void | insert(BiTree biTree,
             int offset,
             int len,
             int totalOffset)insert characters to node. | 
|  void | remove(BiTree biTree,
             int offset,
             int len,
             int totalOffset)remove characters from node. | 
|  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. | 
|  String | toString(int level)print biNode. | 
| Method Detail | 
|---|
IBiNode getPrevious()
void setPrevious(IBiNode prev)
prev - previous node for this nodeBiNode getParent()
IBiNode getSibling()
void setSibling(IBiNode sibl)
sibl - new sibling for this nodevoid addSibling(IBiNode sibl)
sibl - new sibling for this nodeNode getNode()
void setNode(Node n)
n - reference in DOM-treeint getLength()
void setLength(int len)
len - to setvoid changeLengthRec(int change)
change - changevalue (can be positive or negative)BiType getType()
void insert(BiTree biTree,
            int offset,
            int len,
            int totalOffset)
            throws ReparseException,
                   NonIncrementalElementException
biTree - reference to BiTree to which this node containsoffset - position to insert characterslen - number of characters to inserttotalOffset - 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.
void remove(BiTree biTree,
            int offset,
            int len,
            int totalOffset)
            throws ReparseException,
                   NonIncrementalElementException
biTree - reference to BiTree to which this node containsoffset - position to remove characterslen - number of characters to 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.
void forwardToSibling(boolean insert,
                      BiTree biTree,
                      int offset,
                      int len,
                      int totalOffset)
                      throws ReparseException,
                             NonIncrementalElementException
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.Node createDOMSubtree(Document doc)
doc - Document to create DOM-tree
TextPosition searchNode(Node n,
                        int totalOffset)
n - DOM node to search fortotalOffset - offset of node to begin of inputtext
String toString(int level)
level - level of recursion tree
String formatLength()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||