org.cdlib.xtf.textEngine
Class BoundedMarkPos
Object
MarkPos
BasicMarkPos
BoundedMarkPos
- All Implemented Interfaces:
- Cloneable
public class BoundedMarkPos
- extends BasicMarkPos
Helps with marking fields that contain bump markers.
- Author:
- Martin Haye
Constructor Summary |
BoundedMarkPos(Token[] tokens)
Creates a new mark pos |
Method Summary |
String |
getTextTo(MarkPos other,
boolean checkUnmarkable)
Ensures that no XML elements or attributes are accidentally included in
the text. |
(package private) void |
setTokNum(int tokNum)
Establishes the token number of this mark pos |
void |
stripMarkers(int termEnd)
Called by BoundedWordIter when called to get the END_PLUS of a token. |
Methods inherited from class Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tokens
private Token[] tokens
tokNum
private int tokNum
BoundedMarkPos
BoundedMarkPos(Token[] tokens)
- Creates a new mark pos
setTokNum
final void setTokNum(int tokNum)
- Establishes the token number of this mark pos
getTextTo
public String getTextTo(MarkPos other,
boolean checkUnmarkable)
- Ensures that no XML elements or attributes are accidentally included in
the text. This is because, at the moment, we don't deal with all the
complexities of marking across XML tags (and it is very complex.)
stripMarkers
public void stripMarkers(int termEnd)
- Called by BoundedWordIter when called to get the END_PLUS of a token. We
strip off bump markers, whitespace, and end-of-field markers.