edu.northwestern.at.monk.model
Class SyntaxCriterion

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

public class SyntaxCriterion
extends CoreObjectCriterion

A part of speech syntax category search criterion.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
SyntaxCriterion(java.util.Collection<?> values)
          Creates a new syntax category search criterion.
SyntaxCriterion(java.lang.String... tags)
          Creates a new syntax category search criterion.
SyntaxCriterion(SyntaxCategory... syntaxCategories)
          Creates a new syntax category search criterion.
 
Method Summary
 java.util.Collection<SyntaxCategory> getSyntaxCategories()
          Gets the syntax categories.
 SyntaxCategory getSyntaxCategory()
          Gets the syntax 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

SyntaxCriterion

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

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

SyntaxCriterion

public SyntaxCriterion(SyntaxCategory... syntaxCategories)
                throws ModelException
Creates a new syntax category search criterion.

Parameters:
syntaxCategories - Syntax categories.
Throws:
ModelException -
Should never be thrown.

SyntaxCriterion

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

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

getSyntaxCategories

public java.util.Collection<SyntaxCategory> getSyntaxCategories()
Gets the syntax categories.

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

getSyntaxCategory

public SyntaxCategory getSyntaxCategory()
Gets the syntax category.

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