edu.northwestern.at.wordhoard.model.counts
Class LemmaWorkCounts

java.lang.Object
  extended by edu.northwestern.at.wordhoard.model.counts.LemmaWorkCounts
All Implemented Interfaces:
PersistentObject

public class LemmaWorkCounts
extends java.lang.Object
implements PersistentObject

Lemma/work counts.

These count objects provide summary statistics for lemma/work combinations. Given a lemma and a work, we can quickly provide the following information using a two-column index on work/lemma:

These objects are used to quickly provide information for get info windows for words.


Constructor Summary
LemmaWorkCounts()
          Creates a new lemma/work counts object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if some other object is equal to this one.
 java.lang.Long getId()
          Gets the unique id.
 Lemma getLemma()
          Gets the lemma.
 int getNumMajorClass()
          Gets the major word class count.
 int getRank1()
          Gets the lower rank.
 int getRank2()
          Gets the upper rank.
 int getTermFreq()
          Gets the term frequency.
 Work getWork()
          Gets the work.
 int hashCode()
          Returns a hash code for the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LemmaWorkCounts

public LemmaWorkCounts()
Creates a new lemma/work counts object.

Method Detail

getId

public java.lang.Long getId()
Gets the unique id.

Specified by:
getId in interface PersistentObject
Returns:
The unique id.

getWork

public Work getWork()
Gets the work.

Returns:
The work.

getLemma

public Lemma getLemma()
Gets the lemma.

Returns:
The lemma.

getTermFreq

public int getTermFreq()
Gets the term frequency.

Returns:
The term frequency = the number of times the lemma occurs in the work.

getRank1

public int getRank1()
Gets the lower rank.

Returns:
The lower rank of this lemma among all the lemmas with the same major word class in the work.

getRank2

public int getRank2()
Gets the upper rank.

Returns:
The upper rank of this lemma among all the lemmas with the same major word class in the work.

getNumMajorClass

public int getNumMajorClass()
Gets the major word class count.

Returns:
The number of distinct lemmas in the work with the same major word class as this lemma.

equals

public boolean equals(java.lang.Object obj)
Returns true if some other object is equal to this one.

The two objects are equal if their ids are equal.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The other object.
Returns:
True if this object equals the other object.

hashCode

public int hashCode()
Returns a hash code for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.