LibreOffice Module xmerge (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
org.openoffice.xmerge.merger.diff.CharacterParser Class Reference

This is a parser to return a character array for difference purpose. More...

Collaboration diagram for org.openoffice.xmerge.merger.diff.CharacterParser:
[legend]

Public Member Functions

 CharacterParser (Node node)
 Standard constructor. More...
 
List< TextNodeEntrygetNodeList ()
 Returns the Node pointer with the given character position. More...
 
char[] getCharArray ()
 Returns the character array representation of the text. More...
 

Private Member Functions

void parseNodes ()
 
void addNewNodeEntry (int textLen, Node node)
 Adds a new Node entry. More...
 

Private Attributes

final TextNodeIterator textNodes
 
int currentPosition = 0
 
final List< TextNodeEntrynodeList_
 
char[] charArray
 

Detailed Description

This is a parser to return a character array for difference purpose.

It will use depth first search to traverse all the characters inside the text Node under a given Node (most likely to be a paragraph Node).

Note: Once the XML Tree is parsed, then the Iterator will be a snapshot of that tree. That means even the tree is modified later, then the cached paragraph Node list will not be updated accordingly. For this reason and for performance reasons this Iterator does not support any operation methods such as insert, remove or replace. The main purpose of this Iterator is to be used with difference, not with merge.

Definition at line 43 of file CharacterParser.java.

Constructor & Destructor Documentation

◆ CharacterParser()

org.openoffice.xmerge.merger.diff.CharacterParser.CharacterParser ( Node  node)
inline

Member Function Documentation

◆ addNewNodeEntry()

void org.openoffice.xmerge.merger.diff.CharacterParser.addNewNodeEntry ( int  textLen,
Node  node 
)
inlineprivate

◆ getCharArray()

char[] org.openoffice.xmerge.merger.diff.CharacterParser.getCharArray ( )
inline

Returns the character array representation of the text.

Returns
The character array representation of the text.

Definition at line 77 of file CharacterParser.java.

References org.openoffice.xmerge.merger.diff.CharacterParser.charArray.

Referenced by org.openoffice.xmerge.merger.merge.CharacterBaseParagraphMerge.coreMerge(), and org.openoffice.xmerge.merger.merge.CharacterBaseParagraphMerge.merge().

◆ getNodeList()

List< TextNodeEntry > org.openoffice.xmerge.merger.diff.CharacterParser.getNodeList ( )
inline

Returns the Node pointer with the given character position.

Returns
The Node pointer with the given character position.

Definition at line 67 of file CharacterParser.java.

References org.openoffice.xmerge.merger.diff.CharacterParser.nodeList_.

Referenced by org.openoffice.xmerge.merger.merge.CharacterBaseParagraphMerge.applyDifference().

◆ parseNodes()

void org.openoffice.xmerge.merger.diff.CharacterParser.parseNodes ( )
inlineprivate

Member Data Documentation

◆ charArray

char [] org.openoffice.xmerge.merger.diff.CharacterParser.charArray
private

◆ currentPosition

int org.openoffice.xmerge.merger.diff.CharacterParser.currentPosition = 0
private

◆ nodeList_

final List<TextNodeEntry> org.openoffice.xmerge.merger.diff.CharacterParser.nodeList_
private

◆ textNodes

final TextNodeIterator org.openoffice.xmerge.merger.diff.CharacterParser.textNodes
private

The documentation for this class was generated from the following file: