edu.northwestern.at.wordhoard.swing.calculator.analysis
Class CollocateContextRow

java.lang.Object
  extended by edu.northwestern.at.wordhoard.swing.calculator.analysis.CollocateContextRow
All Implemented Interfaces:
SortedTableModel.Row

public class CollocateContextRow
extends java.lang.Object
implements SortedTableModel.Row

Holds collocate context entries for tabular display.


Field Summary
protected  java.lang.String contextText
          The collocation context text.
protected static java.lang.String emptyString
          An empty string to handle requests for invalid columns.
protected  java.lang.String plainContextText
          The context text as a plain (non-html) string.
protected  int rowID
          Row ID.
protected static int uniqueRowIDBase
          Row ID generator base.
protected  java.lang.String wordPath
          The word path in which the collocation occurs.
protected  java.lang.String wordTag
          The unique word tag for this collocate.
 
Constructor Summary
CollocateContextRow(java.lang.String wordTag, java.lang.String wordPath, java.lang.String contextText)
          Constructs a new row.
 
Method Summary
 int compareTo(SortedTableModel.Row obj, int columnIndex)
          Compares this row to another row using a specified column.
 java.lang.Object getSortableValue(int columnIndex)
          Gets the value of a column for sorting.
 java.lang.Object getUniqueRowID()
          Gets the associated unique ID for this row.
 java.lang.Object getValue(int columnIndex)
          Gets the value of a column.
 java.lang.String getWordTag()
          Get word tag for this row.
 java.lang.String toString()
          Display text associated with node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wordTag

protected java.lang.String wordTag
The unique word tag for this collocate.


wordPath

protected java.lang.String wordPath
The word path in which the collocation occurs.


contextText

protected java.lang.String contextText
The collocation context text.


plainContextText

protected java.lang.String plainContextText
The context text as a plain (non-html) string.


emptyString

protected static final java.lang.String emptyString
An empty string to handle requests for invalid columns.

See Also:
Constant Field Values

rowID

protected int rowID
Row ID.


uniqueRowIDBase

protected static int uniqueRowIDBase
Row ID generator base.

Constructor Detail

CollocateContextRow

public CollocateContextRow(java.lang.String wordTag,
                           java.lang.String wordPath,
                           java.lang.String contextText)
Constructs a new row.

Parameters:
wordTag - Word tag of collocate.
wordPath - Word path for collocate.
contextText - The context text.
Method Detail

getValue

public java.lang.Object getValue(int columnIndex)
Gets the value of a column.

Specified by:
getValue in interface SortedTableModel.Row
Parameters:
columnIndex - Column index.
Returns:
Column value.

getSortableValue

public java.lang.Object getSortableValue(int columnIndex)
Gets the value of a column for sorting.

Parameters:
columnIndex - Column index.
Returns:
Column value.

compareTo

public int compareTo(SortedTableModel.Row obj,
                     int columnIndex)
Compares this row to another row using a specified column.

Specified by:
compareTo in interface SortedTableModel.Row
Parameters:
obj - The other row.
columnIndex - Column index.
Returns:
< 0 if this row < other row, 0 if this row = other row, > 0 if this row > other row.

getUniqueRowID

public java.lang.Object getUniqueRowID()
Gets the associated unique ID for this row.

Specified by:
getUniqueRowID in interface SortedTableModel.Row
Returns:
Unique ID for this row. This should be something unique to each table row.

getWordTag

public java.lang.String getWordTag()
Get word tag for this row.

Returns:
Word tag for this row.

toString

public java.lang.String toString()
Display text associated with node.

Overrides:
toString in class java.lang.Object
Returns:
The context text.