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

java.lang.Object
  extended by edu.northwestern.at.wordhoard.model.morphology.Pos
All Implemented Interfaces:
GroupingObject, PersistentObject, SearchCriterion, SearchDefaults, java.io.Serializable

public class Pos
extends java.lang.Object
implements GroupingObject, PersistentObject, SearchDefaults, SearchCriterion, java.io.Serializable

A part of speech.

Parts of speech have the following attributes:

See Also:
Serialized Form

Field Summary
static byte ENGLISH
          English part of speech taxonomy.
static byte GREEK
          Greek part of speech taxonomy.
 
Constructor Summary
Pos()
          Creates a new part of speech.
 
Method Summary
 void appendDescription(TextLine line, FontInfo romanFontInfo, FontInfo[] fontInfo)
          Appends a description to a text line.
 boolean equals(java.lang.Object obj)
          Returns true if some other object is equal to this one.
 java.lang.String getDegree()
          Gets the degree.
 java.lang.String getDescription()
          Gets the description.
 java.lang.String getGender()
          Gets the gender.
 Spelling getGroupingSpelling(int numHits)
          Gets the spelling of the grouping object.
 java.lang.Long getId()
          Gets the unique id.
 java.lang.Class getJoinClass()
          Gets the join class.
 java.lang.String getLanguage()
          Gets the language.
 java.lang.String getMood()
          Gets the mood.
 java.lang.String getNegative()
          Gets the negative attribute.
 java.lang.String getNumber()
          Gets the number.
 java.lang.String getPerson()
          Gets the person.
 java.lang.String getReportPhrase()
          Gets the report phrase.
 SearchCriterion getSearchDefault(java.lang.Class cls)
          Gets a search criterion default value.
 java.lang.String getSyntax()
          Gets the syntax.
 java.lang.String getTag()
          Gets the tag.
 java.lang.String getTagWithDescription()
          Gets the tag with the description (if available).
 java.lang.String getTense()
          Gets the tense.
 java.lang.String getVoice()
          Gets the voice.
 java.lang.String getWhereClause()
          Gets the Hibernate where clause.
 WordClass getWordClass()
          Gets the word class.
 java.lang.String getXcase()
          Gets the case.
 int hashCode()
          Returns a hash code for the object.
 void setArg(org.hibernate.Query q, org.hibernate.Session session)
          Sets the Hibernate query argument.
 void setCase(java.lang.String xcase)
          Sets the case.
 void setDegree(java.lang.String degree)
          Sets the degree.
 void setDescription(java.lang.String description)
          Sets the description.
 void setGender(java.lang.String gender)
          Sets the gender.
 void setLanguage(java.lang.String language)
          Sets the language.
 void setMood(java.lang.String mood)
          Sets the mood.
 void setNegative(java.lang.String negative)
          Sets the negative attribute.
 void setNumber(java.lang.String number)
          Sets the number.
 void setPerson(java.lang.String person)
          Sets the person.
 void setSyntax(java.lang.String syntax)
          Sets the syntax.
 void setTag(java.lang.String tag)
          Sets the tag.
 void setTense(java.lang.String tense)
          Sets the tense.
 void setVoice(java.lang.String voice)
          Sets the voice.
 void setWordClass(WordClass wordClass)
          Sets the word class.
 java.lang.String toString()
          Gets a string representation of the part of speech.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ENGLISH

public static final byte ENGLISH
English part of speech taxonomy.

See Also:
Constant Field Values

GREEK

public static final byte GREEK
Greek part of speech taxonomy.

See Also:
Constant Field Values
Constructor Detail

Pos

public Pos()
Creates a new part of speech.

Method Detail

getId

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

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

getTag

public java.lang.String getTag()
Gets the tag.

Returns:
The tag.

setTag

public void setTag(java.lang.String tag)
Sets the tag.

Parameters:
tag - The tag.

getDescription

public java.lang.String getDescription()
Gets the description.

Returns:
The description, or null if none.

setDescription

public void setDescription(java.lang.String description)
Sets the description.

Parameters:
description - Description.

getWordClass

public WordClass getWordClass()
Gets the word class.

Returns:
The word class. Null for Greek parts of speech.

setWordClass

public void setWordClass(WordClass wordClass)
Sets the word class.

Parameters:
wordClass - Word class.

getSyntax

public java.lang.String getSyntax()
Gets the syntax.

Returns:
The syntax.

setSyntax

public void setSyntax(java.lang.String syntax)
Sets the syntax.

Parameters:
syntax - Syntax.

getTense

public java.lang.String getTense()
Gets the tense.

Returns:
The tense.

setTense

public void setTense(java.lang.String tense)
Sets the tense.

Parameters:
tense - The tense.

getMood

public java.lang.String getMood()
Gets the mood.

Returns:
The mood.

setMood

public void setMood(java.lang.String mood)
Sets the mood.

Parameters:
mood - The mood.

getVoice

public java.lang.String getVoice()
Gets the voice.

Returns:
The voice.

setVoice

public void setVoice(java.lang.String voice)
Sets the voice.

Parameters:
voice - The voice.

getXcase

public java.lang.String getXcase()
Gets the case.

Returns:
The case.

setCase

public void setCase(java.lang.String xcase)
Sets the case.

Parameters:
xcase - The case.

getGender

public java.lang.String getGender()
Gets the gender.

Returns:
The gender.

setGender

public void setGender(java.lang.String gender)
Sets the gender.

Parameters:
gender - The gender.

getPerson

public java.lang.String getPerson()
Gets the person.

Returns:
The person.

setPerson

public void setPerson(java.lang.String person)
Sets the person.

Parameters:
person - The person.

getNumber

public java.lang.String getNumber()
Gets the number.

Returns:
The number.

setNumber

public void setNumber(java.lang.String number)
Sets the number.

Parameters:
number - The number.

getDegree

public java.lang.String getDegree()
Gets the degree.

Returns:
The degree.

setDegree

public void setDegree(java.lang.String degree)
Sets the degree.

Parameters:
degree - The degree.

getNegative

public java.lang.String getNegative()
Gets the negative attribute.

Returns:
The negative attribute.

setNegative

public void setNegative(java.lang.String negative)
Sets the negative attribute.

Parameters:
negative - The negative attribute.

getLanguage

public java.lang.String getLanguage()
Gets the language.

Returns:
The language.

setLanguage

public void setLanguage(java.lang.String language)
Sets the language.

Parameters:
language - The language.

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.

getTagWithDescription

public java.lang.String getTagWithDescription()
Gets the tag with the description (if available).

Returns:
Tag (description).

getReportPhrase

public java.lang.String getReportPhrase()
Gets the report phrase.

Specified by:
getReportPhrase in interface GroupingObject
Returns:
The report phrase "with part of speech".

getGroupingSpelling

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

Specified by:
getGroupingSpelling in interface GroupingObject
Parameters:
numHits - Number of hits.
Returns:
The spelling of the grouping object.

getJoinClass

public java.lang.Class getJoinClass()
Gets the join class.

Specified by:
getJoinClass in interface SearchCriterion
Returns:
The join class, or null if none.

getWhereClause

public java.lang.String getWhereClause()
Gets the Hibernate where clause.

Specified by:
getWhereClause in interface SearchCriterion
Returns:
The Hibernate where clause.

setArg

public void setArg(org.hibernate.Query q,
                   org.hibernate.Session session)
Sets the Hibernate query argument.

Specified by:
setArg in interface SearchCriterion
Parameters:
q - Hibernate query.
session - Hibernate session.

appendDescription

public void appendDescription(TextLine line,
                              FontInfo romanFontInfo,
                              FontInfo[] fontInfo)
Appends a description to a text line.

Specified by:
appendDescription in interface SearchCriterion
Parameters:
line - Text line.
romanFontInfo - Roman font info.
fontInfo - Array of font info indexed by character set.

toString

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

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

equals

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

The two parts of speech are equal if their classes and tags are equal.

Specified by:
equals in interface GroupingObject
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.

Specified by:
hashCode in interface GroupingObject
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.