edu.northwestern.at.monk.model
Class CorpusCriterion

java.lang.Object
  extended by edu.northwestern.at.monk.model.SearchCriterion
      extended by edu.northwestern.at.monk.model.CoreObjectCriterion
          extended by edu.northwestern.at.monk.model.CorpusCriterion

public class CorpusCriterion
extends CoreObjectCriterion

A corpus search criterion.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
CorpusCriterion(java.util.Collection<?> values)
          Creates a new corpus search criterion.
CorpusCriterion(Corpus... corpora)
          Creates a new corpus search criterion.
CorpusCriterion(java.lang.String... tags)
          Creates a new corpus search criterion.
 
Method Summary
 java.util.Collection<Corpus> getCorpora()
          Gets the corpora.
 Corpus getCorpus()
          Gets the corpus.
 java.lang.String getTag()
          Gets the tag.
 java.util.Collection<java.lang.String> getTags()
          Gets the tags.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorpusCriterion

public CorpusCriterion(java.lang.String... tags)
                throws ModelException
Creates a new corpus search criterion.

Parameters:
tags - Tags.
Throws:
ModelException -
No such corpus tag: tag

CorpusCriterion

public CorpusCriterion(Corpus... corpora)
                throws ModelException
Creates a new corpus search criterion.

Parameters:
corpora - Corpora.
Throws:
ModelException -
Should never be thrown.

CorpusCriterion

public CorpusCriterion(java.util.Collection<?> values)
                throws ModelException
Creates a new corpus search criterion.

Parameters:
values - Collection of tags and/or corpora.
Throws:
ModelException -
No such corpus tag: tag
Collection element neither String nor Corpus.
Method Detail

getCorpora

public java.util.Collection<Corpus> getCorpora()
Gets the corpora.

Returns:
Collection of corpora, or null if none.

getCorpus

public Corpus getCorpus()
Gets the corpus.

Returns:
Corpus, or null if none or more than one.

getTags

public java.util.Collection<java.lang.String> getTags()
Gets the tags.

Returns:
The tags, or null if none.

getTag

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

Returns:
Tag, or null if none or more than one.