edu.northwestern.at.monk.model
Class NegativeCriterion

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

public class NegativeCriterion
extends CoreObjectCriterion

A part of speech negative category search criterion.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
NegativeCriterion(java.util.Collection<?> values)
          Creates a new negative category search criterion.
NegativeCriterion(NegativeCategory... negativeCategories)
          Creates a new negative category search criterion.
NegativeCriterion(java.lang.String... tags)
          Creates a new negative category search criterion.
 
Method Summary
 java.util.Collection<NegativeCategory> getNegativeCategories()
          Gets the negative categories.
 NegativeCategory getNegativeCategory()
          Gets the negative 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

NegativeCriterion

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

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

NegativeCriterion

public NegativeCriterion(NegativeCategory... negativeCategories)
                  throws ModelException
Creates a new negative category search criterion.

Parameters:
negativeCategories - Negative categories.
Throws:
ModelException -
Should never be thrown.

NegativeCriterion

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

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

getNegativeCategories

public java.util.Collection<NegativeCategory> getNegativeCategories()
Gets the negative categories.

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

getNegativeCategory

public NegativeCategory getNegativeCategory()
Gets the negative category.

Returns:
Negative 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.