|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.model.speakers.Speaker
public class Speaker
A speaker.
Each speaker has the following attributes:
work
in which the speaker occurs.
gender
of the speaker.
mortality
of the speaker.
Note that speakers belong to works. For example, the speaker "Zeus" in The Iliad is different from the speaker "Zeus" in The Odyssey. Thus, there is no way to form an identification of speakers across multiple works. Another example is the speaker "HenryIV" in King Henry the Fourth parts 1 and 2 in Shakespeare.
This is arguably a bad model for speakers, but for now we have decided that it's the best way to go given the current state of the data, time constraints, and the inability of our puny brains to untangle these kinds of complexities.
Constructor Summary | |
---|---|
Speaker()
Creates a new speaker. |
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 |
getDescription()
Gets the role description. |
Gender |
getGender()
Gets the gender. |
void |
getGroupingObjects(java.lang.Class groupBy,
java.util.List list)
Gets grouping objects. |
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. |
Mortality |
getMortality()
Gets the mortality. |
java.lang.String |
getName()
Gets the English name. |
Spelling |
getOriginalName()
Gets the name in the original language. |
java.lang.String |
getReportPhrase()
Gets the report phrase. |
SearchCriterion |
getSearchDefault(java.lang.Class cls)
Gets a search criterion default value. |
java.lang.String |
getTag()
Gets the tag. |
java.lang.String |
getWhereClause()
Gets the Hibernate where clause. |
Work |
getWork()
Gets the work. |
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 |
setDescription(java.lang.String description)
Sets the role description. |
void |
setGender(byte gender)
Sets the gender. |
void |
setGender(Gender gender)
Sets the gender. |
void |
setMortality(byte mortality)
Sets the mortality. |
void |
setMortality(Mortality mortality)
Sets the mortality. |
void |
setName(java.lang.String name)
Sets the English name. |
void |
setOriginalName(Spelling originalName)
Sets the name in the original language. |
void |
setTag(java.lang.String tag)
Sets the tag. |
void |
setWork(Work work)
Sets the work. |
java.lang.String |
toString()
Gets a string representation of the speaker. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Speaker()
Method Detail |
---|
public java.lang.Long getId()
getId
in interface PersistentObject
public Work getWork()
public void setWork(Work work)
work
- The work. public java.lang.String getTag()
public void setTag(java.lang.String tag)
tag
- The tag. public java.lang.String getName()
public void setName(java.lang.String name)
name
- The English name. public Spelling getOriginalName()
public void setOriginalName(Spelling originalName)
originalName
- The name in the original language. public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- The role description. public Gender getGender()
public void setGender(Gender gender)
gender
- The gender. public void setGender(byte gender)
gender
- The gender. public Mortality getMortality()
public void setMortality(Mortality mortality)
mortality
- The mortality. public void setMortality(byte mortality)
mortality
- The mortality. public SearchCriterion getSearchDefault(java.lang.Class cls)
getSearchDefault
in interface SearchDefaults
cls
- Model class of search criterion.
public java.lang.Class getJoinClass()
getJoinClass
in interface SearchCriterion
public java.lang.String getWhereClause()
getWhereClause
in interface SearchCriterion
public void setArg(org.hibernate.Query q, org.hibernate.Session session)
setArg
in interface SearchCriterion
q
- Hibernate query.session
- Hibernate session. public void appendDescription(TextLine line, FontInfo romanFontInfo, FontInfo[] fontInfo)
appendDescription
in interface SearchCriterion
line
- Text line.romanFontInfo
- Roman font info.fontInfo
- Array of font info indexed by character
set. public java.lang.String getReportPhrase()
getReportPhrase
in interface GroupingObject
public Spelling getGroupingSpelling(int numHits)
getGroupingSpelling
in interface GroupingObject
numHits
- Number of hits.
public void getGroupingObjects(java.lang.Class groupBy, java.util.List list)
groupBy
- Grouping class.list
- A list. The grouping objects are appended
to this list. public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
The two speakers are equal if their works and names are equal.
equals
in interface GroupingObject
equals
in class java.lang.Object
obj
- The other object.
public int hashCode()
hashCode
in interface GroupingObject
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |