|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.wordhoard.model.userdata.WordSet
public class WordSet
A word set.
A word set contains a list of word occurrences. Typically these come from various works and do not necessarily appear sequentially. For example, a word set might contain all the words used by female speakers in Shakespeare comedies.
Each word set has the following attributes:
| Field Summary | |
|---|---|
protected java.util.Date |
creationTime
Original creation date/time. |
protected java.lang.String |
description
Description of word set. |
protected java.lang.Long |
id
Unique persistence id (primary key). |
protected boolean |
isActive
True if work set is active (available for use). |
protected boolean |
isPublic
True if public word set (can be seen by other users), false if private word set. |
protected java.util.Date |
modificationTime
Last modification date/time. |
protected java.lang.String |
owner
Owner of this word set. |
protected java.lang.String |
query
The query which generates this word set's word list. |
protected static long |
serialVersionUID
Serial version UID. |
protected java.lang.String |
title
The title of the word set. |
protected java.lang.String |
webPageURL
Web page URL. |
protected java.util.Collection |
wordTags
Collection of words belonging to this word set. |
protected java.util.Collection |
workPartTags
Collection of work parts for words. |
protected java.util.Collection |
workTags
Collection of works for words. |
| Constructor Summary | |
|---|---|
WordSet()
Create an empty word set. |
|
WordSet(org.w3c.dom.Node wordSetNode,
java.lang.String owner)
Create a word set from a DOM document node. |
|
WordSet(java.lang.String title,
java.lang.String description,
java.lang.String webPageURL,
java.lang.String owner,
boolean isPublic)
Create an empty word set with a specified name. |
|
WordSet(java.lang.String title,
java.lang.String description,
java.lang.String webPageURL,
java.lang.String owner,
boolean isPublic,
java.lang.String query)
Create an empty word set with a specified name and query string. |
|
| Method Summary | |
|---|---|
boolean |
addToDOMDocument(org.w3c.dom.Document document)
Add word set to DOM document. |
void |
addWord(Word word)
Adds a word Id from a Word object. |
void |
addWords(java.util.Collection wordCollection)
Adds words from a collection of Word. |
void |
addWords(Word[] wordArray)
Adds words from an array of Word. |
void |
addWordTags(java.util.Collection wordTags)
Adds word tags. |
void |
addWordTags(java.lang.String[] wordTagsArray)
Adds word tags. |
void |
addWorkPartTags(java.lang.String[] workPartTagsArray)
Adds work part tags. |
void |
addWorkTags(java.lang.String[] workTagsArray)
Adds work tags. |
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.util.Date |
getCreationTime()
Gets the creation date. |
java.lang.String |
getDescription()
Gets the description. |
Spelling |
getGroupingSpelling(int numHits)
Gets the spelling of the grouping object. |
java.lang.Long |
getId()
Gets the unique id. |
boolean |
getIsActive()
Get the active flag. |
boolean |
getIsPublic()
Get the public flag. |
java.lang.Class |
getJoinClass()
Gets the join class. |
java.util.Date |
getModificationTime()
Gets the modification date. |
java.lang.String |
getOwner()
Get the owner. |
java.lang.String |
getQuery()
Get the query. |
java.lang.String |
getReportPhrase()
Gets the report phrase. |
SearchCriterion |
getSearchDefault(java.lang.Class cls)
Gets a search criterion default value. |
java.lang.String |
getTitle()
Gets the title. |
java.lang.String |
getWebPageURL()
Gets the web page URL. |
java.lang.String |
getWhereClause()
Gets the Hibernate where clause. |
java.util.Collection |
getWordTags()
Get the word tags. |
java.util.Collection |
getWorkPartTags()
Get the work part tags. |
java.util.Collection |
getWorkTags()
Gets the work tags. |
int |
hashCode()
Returns a hash code for the object. |
void |
readExternal(java.io.ObjectInput in)
Reads the word set from an object input stream (deserializes the object). |
void |
removeWords()
Removes all the words. |
void |
setArg(org.hibernate.Query q,
org.hibernate.Session session)
Sets the Hibernate query argument. |
void |
setCreationTime(java.util.Date creationTime)
Sets the creation time. |
void |
setDescription(java.lang.String description)
Sets the description. |
boolean |
setFromDOMDocumentNode(org.w3c.dom.Node wordSetNode)
Set values from DOM document node. |
void |
setIsActive(boolean isActive)
Set the active flag. |
void |
setIsPublic(boolean isPublic)
Set the public flag. |
void |
setModificationTime(java.util.Date modificationTime)
Sets the modification time. |
void |
setOwner(java.lang.String owner)
Set the owner. |
void |
setQuery(java.lang.String query)
Set the query. |
void |
setTitle(java.lang.String title)
Sets the title. |
void |
setWebPageURL(java.lang.String webPageURL)
Sets the web page URL. |
java.lang.String |
toString()
Gets a string representation of the word set. |
java.lang.String |
toStringDetailed()
Gets a detailed string representation of the word set. |
void |
writeExternal(java.io.ObjectOutput out)
Writes the word set to an object output stream (serializes the object). |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final long serialVersionUID
protected java.lang.Long id
protected java.lang.String title
protected java.lang.String description
protected java.lang.String webPageURL
protected java.util.Date creationTime
protected java.util.Date modificationTime
protected java.util.Collection wordTags
Element type is String. The strings are the unique word tags.
protected java.lang.String owner
protected boolean isPublic
protected boolean isActive
protected java.lang.String query
protected java.util.Collection workTags
protected java.util.Collection workPartTags
| Constructor Detail |
|---|
public WordSet()
public WordSet(java.lang.String title,
java.lang.String description,
java.lang.String webPageURL,
java.lang.String owner,
boolean isPublic)
title - The word set's title.description - The word set's description.webPageURL - The word set's web page URL.owner - The word set's owner.isPublic - True if the word set is public.
public WordSet(java.lang.String title,
java.lang.String description,
java.lang.String webPageURL,
java.lang.String owner,
boolean isPublic,
java.lang.String query)
title - The word set's title.description - The word set's description.webPageURL - The word set's web page URL.owner - The word set's owner.isPublic - True if the word set is public.query - Query properties for generating this word set.
public WordSet(org.w3c.dom.Node wordSetNode,
java.lang.String owner)
wordSetNode - The root node for the word set.owner - The word set's owner. | Method Detail |
|---|
public java.lang.Long getId()
getId in interface PersistentObjectgetId in interface UserDataObjectpublic java.lang.String getTitle()
getTitle in interface UserDataObjectpublic java.lang.String getDescription()
getDescription in interface UserDataObjectpublic java.lang.String getWebPageURL()
getWebPageURL in interface UserDataObjectpublic java.util.Date getCreationTime()
getCreationTime in interface UserDataObjectpublic java.util.Date getModificationTime()
getModificationTime in interface UserDataObjectpublic java.lang.String getOwner()
getOwner in interface UserDataObjectpublic boolean getIsPublic()
getIsPublic in interface UserDataObjectpublic boolean getIsActive()
getIsActive in interface UserDataObjectpublic java.lang.String getQuery()
getQuery in interface UserDataObjectpublic java.util.Collection getWordTags()
public java.util.Collection getWorkTags()
public java.util.Collection getWorkPartTags()
public void setTitle(java.lang.String title)
setTitle in interface UserDataObjecttitle - The title. public void setDescription(java.lang.String description)
setDescription in interface UserDataObjectdescription - The description. public void setWebPageURL(java.lang.String webPageURL)
setWebPageURL in interface UserDataObjectwebPageURL - The web page URL. public void setCreationTime(java.util.Date creationTime)
setCreationTime in interface UserDataObjectcreationTime - The creation time. public void setModificationTime(java.util.Date modificationTime)
setModificationTime in interface UserDataObjectmodificationTime - The modification time. public void setOwner(java.lang.String owner)
owner - The owner. public void setIsPublic(boolean isPublic)
isPublic - True if the word set is public, false if private. public void setIsActive(boolean isActive)
isActive - True if the word set is active. public void setQuery(java.lang.String query)
query - The query for generating this word set. public void addWord(Word word)
word - The new word.
The work Ids are updated as needed.
public void addWords(Word[] wordArray)
wordArray - The new words an array.
The work and work part collections are also updated as needed.
public void addWords(java.util.Collection wordCollection)
wordCollection - The new words as a collection.
The work and work part collection are also updated as needed.
public void addWordTags(java.lang.String[] wordTagsArray)
wordTagsArray - String array of word tags. public void addWordTags(java.util.Collection wordTags)
wordTags - Collection of word tags. public void addWorkTags(java.lang.String[] workTagsArray)
workTagsArray - String array of work tags. public void addWorkPartTags(java.lang.String[] workPartTagsArray)
workPartTagsArray - String array of work part tags. public void removeWords()
public boolean addToDOMDocument(org.w3c.dom.Document document)
addToDOMDocument in interface UserDataObjectdocument - DOM document to which to add word set.
Must not be null. In most cases,
this document should have a "wordhoard"
node as the root element.
public boolean setFromDOMDocumentNode(org.w3c.dom.Node wordSetNode)
setFromDOMDocumentNode in interface UserDataObjectwordSetNode - DOM document node with word set settings.
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringDetailed()
public SearchCriterion getSearchDefault(java.lang.Class cls)
cls - Model class of search criterion.
public java.lang.Class getJoinClass()
getJoinClass in interface SearchCriterionpublic java.lang.String getWhereClause()
getWhereClause in interface SearchCriterion
public void setArg(org.hibernate.Query q,
org.hibernate.Session session)
setArg in interface SearchCriterionq - Hibernate query.session - Hibernate session.
public void appendDescription(TextLine line,
FontInfo romanFontInfo,
FontInfo[] fontInfo)
appendDescription in interface SearchCriterionline - Text line.romanFontInfo - Roman font info.fontInfo - Array of font info indexed by character
set. public java.lang.String getReportPhrase()
public Spelling getGroupingSpelling(int numHits)
numHits - Number of hits.
public boolean equals(java.lang.Object obj)
The two objects are equal if their ids are equal.
equals in class java.lang.Objectobj - The other object.
public int hashCode()
hashCode in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - Object output stream.
java.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - Object input stream.
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||