|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--WordTokenTable
Stores a list of highlighted words in amalgamations in a particular text.
This class will serve as the basis for allowing an editable list of word
parts. Given this table, it's simple to generate links to container parts,
à la the termlist format.
| Constructor Summary | |
WordTokenTable()
|
|
| Method Summary | |
void |
add(Amalgamation amalg,
int start,
int end,
java.lang.String lang,
SuperAmalgamation samalg,
java.lang.String displayText,
java.util.List highlights)
Adds an entry to the table if the passed-in highlight range corresponds to a word. |
Span |
getFirstInvalidSpan()
Returns the first invalid range in the text. |
int |
getGroups()
Returns the number of groups. |
java.util.List |
getTable()
Returns the table. |
boolean |
isValid()
Returns true if the WordTokenTable is valid. |
boolean |
isValidAndNonEmpty()
Returns true if the WordTokenTable is valid and not
empty. |
void |
markInvalid()
Marks the WordTokenTable as invalid. |
void |
reset()
Clears the table and resets it to its initial state. |
void |
setGroups(int groups)
Sets the number of groups, which corresponds to the number of term instance parts, and to the number of regex groups - 1 for n > 1, or 1 when n = 1. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WordTokenTable()
| Method Detail |
public void add(Amalgamation amalg,
int start,
int end,
java.lang.String lang,
SuperAmalgamation samalg,
java.lang.String displayText,
java.util.List highlights)
amalg - amalgamation on container or subcontainerstart - highlight start offsetend - highlight end offsetlang - language of amalgamationsamalg - SuperAmalgamation on amalgamationdisplayText - filtered, normalized text for amalgamationhighlights - highlights from Highlighterpublic boolean isValid()
WordTokenTable is valid.public void markInvalid()
WordTokenTable as invalid.public boolean isValidAndNonEmpty()
WordTokenTable is valid and not
empty.public void setGroups(int groups)
groups - number of groupspublic int getGroups()
public java.util.List getTable()
WordTokenspublic Span getFirstInvalidSpan()
public void reset()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||