edu.northwestern.at.monk.model
Class Pos

java.lang.Object
  extended by edu.northwestern.at.monk.model.TaggedObject
      extended by edu.northwestern.at.monk.model.CoreObject
          extended by edu.northwestern.at.monk.model.Pos
All Implemented Interfaces:
Feature, java.lang.Comparable<Pos>

public class Pos
extends CoreObject
implements Feature, java.lang.Comparable<Pos>

A part of speech.

See Also:
MONK Datastore Overview, Licensing Agreement

Nested Class Summary
static class Pos.Comparator
          A multi-column part of speech comparator.
static class Pos.SortOption
          Part of speech sorting options.
 
Method Summary
 int compareTo(Pos other)
          Compares this instance with another.
static java.util.Collection<Pos> find(java.util.Collection<SearchCriterion> criteria)
          Finds parts of speech.
static java.util.Collection<Pos> find(SearchCriteria criteria)
          Finds parts of speech.
static java.util.Collection<Pos> find(SearchCriterion... criteria)
          Finds parts of speech.
static Pos get(java.lang.String tag)
          Gets a part of speech by tag.
static java.util.Collection<Pos> getAll()
          Gets all the parts of speech.
 CaseCategory getCaseCategory()
          Gets the case category.
 DegreeCategory getDegreeCategory()
          Gets the degree category.
 MoodCategory getMoodCategory()
          Gets the mood category.
 NegativeCategory getNegativeCategory()
          Gets the negative category.
 NumberCategory getNumberCategory()
          Gets the number category.
 PersonCategory getPersonCategory()
          Gets the person category.
 SyntaxCategory getSyntaxCategory()
          Gets the syntax category.
 TenseCategory getTenseCategory()
          Gets the tense category.
 WordClass getWordClass()
          Gets the word class.
static Pos[] sort(java.util.Collection<Pos> collection, Pos.SortOption... options)
          Sorts a collection of parts of speech.
static void sort(Pos[] array, Pos.SortOption... options)
          Sorts an array of parts of speech.
 
Methods inherited from class edu.northwestern.at.monk.model.TaggedObject
getTag
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static Pos get(java.lang.String tag)
Gets a part of speech by tag.

Parameters:
tag - Tag.
Returns:
Part of speech, or null if none.

getAll

public static java.util.Collection<Pos> getAll()
Gets all the parts of speech.

Returns:
Unmodifiable collection of all the parts of speech in case and diacritical-insensitive alphabetical order by tag.

find

public static java.util.Collection<Pos> find(SearchCriterion... criteria)
                                      throws ModelException
Finds parts of speech.

Parameters:
criteria - Search criteria.
Returns:
Collection of parts of speech, in an undefined order. If you want the result to be ordered, you must call a sort method.
Throws:
ModelException -
Unable to execute search

find

public static java.util.Collection<Pos> find(java.util.Collection<SearchCriterion> criteria)
                                      throws ModelException
Finds parts of speech.

Parameters:
criteria - Collection of search criteria.
Returns:
Collection of parts of speech, in an undefined order. If you want the result to be ordered, you must call a sort method.
Throws:
ModelException -
Unable to execute search

find

public static java.util.Collection<Pos> find(SearchCriteria criteria)
                                      throws ModelException
Finds parts of speech.

Parameters:
criteria - Search criteria.
Returns:
Collection of parts of speech, in an undefined order. If you want the result to be ordered, you must call a sort method.
Throws:
ModelException -
Unable to execute search

sort

public static void sort(Pos[] array,
                        Pos.SortOption... options)
Sorts an array of parts of speech.

Parameters:
array - Array of parts of speech.
options - Sort options, or null to use the natural ordering.

sort

public static Pos[] sort(java.util.Collection<Pos> collection,
                         Pos.SortOption... options)
Sorts a collection of parts of speech.

Parameters:
collection - Collection of parts of speech.
options - Sort options, or null to use the natural ordering.
Returns:
Sorted array of parts of speech.

getWordClass

public WordClass getWordClass()
Gets the word class.

Returns:
The part of speech's word class.

getSyntaxCategory

public SyntaxCategory getSyntaxCategory()
Gets the syntax category.

Returns:
Syntax category, or null if none.

getTenseCategory

public TenseCategory getTenseCategory()
Gets the tense category.

Returns:
Tense category, or null if none.

getMoodCategory

public MoodCategory getMoodCategory()
Gets the mood category.

Returns:
Mood category, or null if none.

getCaseCategory

public CaseCategory getCaseCategory()
Gets the case category.

Returns:
Case category, or null if none.

getPersonCategory

public PersonCategory getPersonCategory()
Gets the person category.

Returns:
Person category, or null if none.

getNumberCategory

public NumberCategory getNumberCategory()
Gets the number category.

Returns:
Number category, or null if none.

getDegreeCategory

public DegreeCategory getDegreeCategory()
Gets the degree category.

Returns:
Degree category, or null if none.

getNegativeCategory

public NegativeCategory getNegativeCategory()
Gets the negative category.

Returns:
Negative category, or null if none.

compareTo

public int compareTo(Pos other)
Compares this instance with another.

Parts of speech are ordered in case and diacritical-insensitve increasing alphabetical order by tag.

Specified by:
compareTo in interface java.lang.Comparable<Pos>
Parameters:
other - The other instance to be compared.
Returns:
A negative integer, zero, or a positive integer as this instance is less than, equal to, or greater than the specified instance.