|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.wordhoard.model.search.SearchCriteria
public class SearchCriteria
A set of word search criteria.
| Nested Class Summary | |
|---|---|
protected static class |
SearchCriteria.MyStringBuffer
A string buffer that knows how to append Hibernate where clauses separated by the word "and". |
| Field Summary | |
|---|---|
protected java.util.ArrayList |
criteriaList
List of search criterion. |
| Constructor Summary | |
|---|---|
SearchCriteria()
Creates a new empty set of word search criteria. |
|
SearchCriteria(Corpus corpus,
Lemma lemma,
Pos pos,
Spelling spelling,
int strength)
Creates a new set of word search criteria. |
|
| Method Summary | |
|---|---|
void |
add(SearchCriterion criterion)
Adds a criterion. |
boolean |
contains(java.lang.Class cls)
Returns true if the critera contains a criterion class. |
Corpus |
getCorpus()
Gets the corpus. |
TextLine |
getDescription(FontInfo[] fontInfo)
Gets a description of the search criteria. |
java.util.List |
search(org.hibernate.Session session)
Executes the query. |
boolean |
suspicious()
Returns true if the criteria are "suspicious". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ArrayList criteriaList
| Constructor Detail |
|---|
public SearchCriteria()
public SearchCriteria(Corpus corpus,
Lemma lemma,
Pos pos,
Spelling spelling,
int strength)
The collation strengths for spelling searches are:
corpus - The corpus to be searched, or null.lemma - The lemma, or null.pos - The part of speech, or null.spelling - The spelling, or null.strength - Collation strength for spelling searches. | Method Detail |
|---|
public void add(SearchCriterion criterion)
criterion - Search criterion. public Corpus getCorpus()
public boolean contains(java.lang.Class cls)
cls - Criterion class.
public java.util.List search(org.hibernate.Session session)
throws PersistenceException
session - Hibernate session.
search results which match the search criteria,
ordered by location (by work tag, then by ordinal
within work).
PersistenceException public TextLine getDescription(FontInfo[] fontInfo)
fontInfo - Array of font info indexed by character set.
public boolean suspicious()
A set of search criteria is "suspicious" if it contains neither a lemma criterion nor a spelling criterion. Such a search is likely to take a long time and produce a large number of results.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||