edu.northwestern.at.monk.model
Class PosCriterion

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

public class PosCriterion
extends CoreObjectCriterion

A part of speech search criterion.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
PosCriterion(java.util.Collection<?> values)
          Creates a new part of speech search criterion.
PosCriterion(Pos... poses)
          Creates a new part of speech search criterion.
PosCriterion(java.lang.String... tags)
          Creates a new part of speech search criterion.
 
Method Summary
 Pos getPos()
          Gets the part of speech.
 java.util.Collection<Pos> getPoses()
          Gets the parts of speech.
 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

PosCriterion

public PosCriterion(java.lang.String... tags)
             throws ModelException
Creates a new part of speech search criterion.

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

PosCriterion

public PosCriterion(Pos... poses)
             throws ModelException
Creates a new part of speech search criterion.

Parameters:
poses - Parts of speech.
Throws:
ModelException -
Should never be thrown.

PosCriterion

public PosCriterion(java.util.Collection<?> values)
             throws ModelException
Creates a new part of speech search criterion.

Parameters:
values - Collection of tags and/or parts of speech.
Throws:
ModelException -
No such pos tag: tag
Collection element neither String nor Pos.
Method Detail

getPoses

public java.util.Collection<Pos> getPoses()
Gets the parts of speech.

Returns:
Collection of parts of speech, or null if none.

getPos

public Pos getPos()
Gets the part of speech.

Returns:
Part of speech, 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.