edu.northwestern.at.monk.model
Class MoodCriterion

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.MoodCriterion

public class MoodCriterion
extends CoreObjectCriterion

A part of speech mood category search criterion.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
MoodCriterion(java.util.Collection<?> values)
          Creates a new mood category search criterion.
MoodCriterion(MoodCategory... moodCategories)
          Creates a new mood category search criterion.
MoodCriterion(java.lang.String... tags)
          Creates a new mood category search criterion.
 
Method Summary
 java.util.Collection<MoodCategory> getMoodCategories()
          Gets the mood categories.
 MoodCategory getMoodCategory()
          Gets the mood category.
 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

MoodCriterion

public MoodCriterion(java.lang.String... tags)
              throws ModelException
Creates a new mood category search criterion.

Parameters:
tags - Tags.
Throws:
ModelException -
No such mood category: tag

MoodCriterion

public MoodCriterion(MoodCategory... moodCategories)
              throws ModelException
Creates a new mood category search criterion.

Parameters:
moodCategories - Mood categories.
Throws:
ModelException -
Should never be thrown.

MoodCriterion

public MoodCriterion(java.util.Collection<?> values)
              throws ModelException
Creates a new mood category search criterion.

Parameters:
values - Collection of tags and/or mood categories.
Throws:
ModelException -
No such mood category: tag
Collection element is neither String nor MoodCategory
Method Detail

getMoodCategories

public java.util.Collection<MoodCategory> getMoodCategories()
Gets the mood categories.

Returns:
Collection of mood categories, or null if none.

getMoodCategory

public MoodCategory getMoodCategory()
Gets the mood category.

Returns:
Mood category, 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.