edu.northwestern.at.wordhoard.model.morphology
Class LemPos

java.lang.Object
  extended by edu.northwestern.at.wordhoard.model.morphology.LemPos
All Implemented Interfaces:
PersistentObject, SearchDefaults

public class LemPos
extends java.lang.Object
implements PersistentObject, SearchDefaults

A word form (lemma and part of speech).

Word forms have the following attributes:


Constructor Summary
LemPos()
          Creates a new LemPos object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if some other object is equal to this one.
 void export(TableExporterImporter exporterImporter)
          Exports the object to a MySQL table exporter/importer.
 void getGroupingObjects(java.lang.Class groupBy, java.util.List list)
          Gets grouping objects.
 Spelling getGroupingSpelling(int numHits)
          Gets the spelling of the LemPos.
 java.lang.Long getId()
          Gets the unique id.
 Lemma getLemma()
          Gets the lemma.
 Pos getPos()
          Gets the part of speech.
 SearchCriterion getSearchDefault(java.lang.Class cls)
          Gets a search criterion default value.
 Spelling getStandardSpelling()
          Gets the standard spelling.
 int hashCode()
          Returns a hash code for the object.
 void setId(java.lang.Long id)
          Sets the unique id.
 void setLemma(Lemma lemma)
          Sets the lemma.
 void setPos(Pos pos)
          Sets the part of speech.
 void setStandardSpelling(Spelling standardSpelling)
          Sets the standard spelling.
 java.lang.String toString()
          Gets a string representation of the LemPos.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LemPos

public LemPos()
Creates a new LemPos object.

Method Detail

getId

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

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

setId

public void setId(java.lang.Long id)
Sets the unique id.

Parameters:
id - The unique id.

getStandardSpelling

public Spelling getStandardSpelling()
Gets the standard spelling.

Returns:
The standard spelling.

setStandardSpelling

public void setStandardSpelling(Spelling standardSpelling)
Sets the standard spelling.

Parameters:
standardSpelling - The standard spelling.

getLemma

public Lemma getLemma()
Gets the lemma.

Returns:
The lemma.

setLemma

public void setLemma(Lemma lemma)
Sets the lemma.

Parameters:
lemma - The lemma.

getPos

public Pos getPos()
Gets the part of speech.

Returns:
The part of speech.

setPos

public void setPos(Pos pos)
Sets the part of speech.

Parameters:
pos - The part of speech.

getSearchDefault

public SearchCriterion getSearchDefault(java.lang.Class cls)
Gets a search criterion default value.

Specified by:
getSearchDefault in interface SearchDefaults
Parameters:
cls - Model class of search criterion.
Returns:
Default value for search criterion.

getGroupingObjects

public void getGroupingObjects(java.lang.Class groupBy,
                               java.util.List list)
Gets grouping objects.

Parameters:
groupBy - Grouping class.
list - A list. The grouping objects are appended to this list.

getGroupingSpelling

public Spelling getGroupingSpelling(int numHits)
Gets the spelling of the LemPos.

Parameters:
numHits - Number of hits.
Returns:
The spelling of the LemPos.

toString

public java.lang.String toString()
Gets a string representation of the LemPos.

Overrides:
toString in class java.lang.Object
Returns:
The id.

export

public void export(TableExporterImporter exporterImporter)
Exports the object to a MySQL table exporter/importer.

Parameters:
exporterImporter - MySQL table exporter/importer.

equals

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

The two LemPos objects are equal if their lemmas and parts of speech 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.