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. 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. 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

under a given

(most likely to be a paragraph

).

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

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

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

Standard constructor.

Parameters
nodeThe initial root .

Definition at line 55 of file CharacterParser.java.

References org.openoffice.xmerge.merger.diff.CharacterParser.parseNodes().

Member Function Documentation

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

Adds a new.

entry.

Parameters
textLenThe text length.
nodeThe .

Definition at line 119 of file CharacterParser.java.

Referenced by org.openoffice.xmerge.merger.diff.CharacterParser.parseNodes().

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().

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

Returns the.

pointer with the given character position.

Returns
The 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().

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

Member Data Documentation

char [] org.openoffice.xmerge.merger.diff.CharacterParser.charArray
private
int org.openoffice.xmerge.merger.diff.CharacterParser.currentPosition = 0
private

Definition at line 46 of file CharacterParser.java.

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

Definition at line 45 of file CharacterParser.java.


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