|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.model.Corpus
public class Corpus
A corpus.
Each corpus has the following attributes:
works
.
Constructor Summary | |
---|---|
Corpus()
Creates a new corpus. |
Method Summary | |
---|---|
void |
addTconView(TconView tconView)
Adds a table of contents view. |
void |
addWork(Work work)
Adds a work. |
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. |
byte |
getCharset()
Gets the character set used by the corpus. |
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. |
int |
getMaxWordPathLength()
Gets the maximum word path length. |
int |
getNumLines()
Gets the number of lines in the corpus. |
int |
getNumWords()
Gets the number of words in the corpus. |
int |
getNumWorkParts()
Gets the number of work parts in the corpus. |
int |
getNumWorks()
Gets the number of works in the corpus. |
int |
getOrdinal()
Gets the ordinal. |
byte |
getPosType()
Gets the part of speech taxonomy used by the corpus. |
float |
getRelFreq(int count)
Gets the relative frequency of a word count in the corpus. |
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. |
TaggingData |
getTaggingData()
Gets the tagging data flags. |
java.util.List |
getTconViews()
Gets the list of table of contents views. |
java.lang.String |
getTitle()
Gets the title. |
java.lang.String |
getTranDescription()
Gets the translations description. |
java.lang.String |
getTranslations()
Gets the translations. |
java.util.List |
getTranslationsAsList()
Gets the translations as a list. |
java.lang.String |
getWhereClause()
Gets the Hibernate where clause. |
Work |
getWorkByTag(java.lang.String tag)
Gets a work by tag. |
java.util.Map |
getWorkMap()
Gets a map from work tags to works. |
java.util.Set |
getWorks()
Gets the works. |
int |
hashCode()
Returns a hash code for the object. |
boolean |
hasTranslations()
Returns true if the corpus has available translations. |
void |
removeWork(Work work)
Removes a work. |
void |
setArg(org.hibernate.Query q,
org.hibernate.Session session)
Sets the Hibernate query argument. |
void |
setCharset(byte charset)
Sets the character set used by the corpus. |
void |
setMaxWordPathLength(int maxWordPathLength)
Sets the maximum word path length. |
void |
setNumLines(int numLines)
Sets the number of lines in the corpus. |
void |
setNumWords(int numWords)
Sets the number of words in the corpus. |
void |
setNumWorkParts(int numWorkParts)
Sets the number of work parts in the corpus. |
void |
setPosType(byte posType)
Sets the part of speech taxonomy used by the corpus. |
void |
setTag(java.lang.String tag)
Sets the tag. |
void |
setTaggingData(TaggingData taggingData)
Sets the tagging data flags. |
void |
setTitle(java.lang.String title)
Sets the title. |
void |
setTranDescription(java.lang.String tranDescription)
Sets the translations description. |
void |
setTranslations(java.lang.String translations)
Sets the translations. |
java.lang.String |
toString()
Gets a string representation of the corpus. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Corpus()
Method Detail |
---|
public java.lang.Long getId()
getId
in interface PersistentObject
public java.lang.String getTag()
getTag
in interface HasTag
public void setTag(java.lang.String tag)
tag
- The tag. public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- The title. public byte getCharset()
public void setCharset(byte charset)
charset
- TextParams.ROMAN or TextParams.GREEK. public byte getPosType()
public void setPosType(byte posType)
posType
- Pos.ENGLISH or Pos.GREEK. public TaggingData getTaggingData()
public void setTaggingData(TaggingData taggingData)
taggingData
- Tagging data flags. public java.util.Set getWorks()
public void addWork(Work work)
work
- The new work. public void removeWork(Work work)
work
- The work. public int getNumWorks()
public int getNumWorkParts()
public void setNumWorkParts(int numWorkParts)
numWorkParts
- Number of work parts. public int getNumLines()
public void setNumLines(int numLines)
numLines
- Number of lines. public int getNumWords()
public void setNumWords(int numWords)
numWords
- Number of words. public int getMaxWordPathLength()
public void setMaxWordPathLength(int maxWordPathLength)
maxWordPathLength
- Maximum word path length. public java.lang.String getTranslations()
Returns a comma-delimited string listing all the available translations for the corpus. E.g., "English,German". If no translations are available, returns null.
public boolean hasTranslations()
public java.util.List getTranslationsAsList()
public void setTranslations(java.lang.String translations)
translations
- Available translations as a comma-
delimited string, or null if none. public java.lang.String getTranDescription()
public void setTranDescription(java.lang.String tranDescription)
tranDescription
- Translations description, or null if none. public java.util.List getTconViews()
public void addTconView(TconView tconView)
The new view is added to the end of the ordered list of views.
tconView
- Table of contents view. public int getOrdinal()
public java.util.Map getWorkMap()
public float getRelFreq(int count)
getRelFreq
in interface CanGetRelFreq
count
- Word count.
public Work getWorkByTag(java.lang.String tag)
tag
- Work tag.
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 java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
The two corpora are equal if their tags 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 |