edu.northwestern.at.monk.model
Class MajorWordClass

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.MajorWordClass
All Implemented Interfaces:
Feature, java.lang.Comparable<MajorWordClass>

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

A major word class.

See Also:
MONK Datastore Overview, Licensing Agreement

Nested Class Summary
static class MajorWordClass.Comparator
          A multi-column major word class comparator.
static class MajorWordClass.SortOption
          Major word class sorting options.
 
Method Summary
 int compareTo(MajorWordClass other)
          Compares this instance with another.
static java.util.Collection<MajorWordClass> find(java.util.Collection<SearchCriterion> criteria)
          Finds major word classes.
static java.util.Collection<MajorWordClass> find(SearchCriteria criteria)
          Finds major word classes.
static java.util.Collection<MajorWordClass> find(SearchCriterion... criteria)
          Finds major word classes.
static MajorWordClass get(java.lang.String tag)
          Gets a major word class by tag.
static java.util.Collection<MajorWordClass> getAll()
          Gets all the major word classes.
static MajorWordClass[] sort(java.util.Collection<MajorWordClass> collection, MajorWordClass.SortOption... options)
          Sorts a collection of major word classes.
static void sort(MajorWordClass[] array, MajorWordClass.SortOption... options)
          Sorts an array of major word classes.
 
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 MajorWordClass get(java.lang.String tag)
Gets a major word class by tag.

Parameters:
tag - Tag.
Returns:
Major word class, or null if none.

getAll

public static java.util.Collection<MajorWordClass> getAll()
Gets all the major word classes.

Returns:
Unmodifiable collection of all the major word classes in case and diacritical-insensitive alphabetical order by tag.

find

public static java.util.Collection<MajorWordClass> find(SearchCriterion... criteria)
                                                 throws ModelException
Finds major word classes.

Parameters:
criteria - Search criteria.
Returns:
Collection of major word classes, 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<MajorWordClass> find(java.util.Collection<SearchCriterion> criteria)
                                                 throws ModelException
Finds major word classes.

Parameters:
criteria - Collection of search criteria.
Returns:
Collection of major word classes, 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<MajorWordClass> find(SearchCriteria criteria)
                                                 throws ModelException
Finds major word classes.

Parameters:
criteria - Search criteria.
Returns:
Collection of major word classes, 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(MajorWordClass[] array,
                        MajorWordClass.SortOption... options)
Sorts an array of major word classes.

Parameters:
array - Array of major word classes.
options - Sort options, or null to use the natural ordering.

sort

public static MajorWordClass[] sort(java.util.Collection<MajorWordClass> collection,
                                    MajorWordClass.SortOption... options)
Sorts a collection of major word classes.

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

compareTo

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

Major word classes are ordered in case and diacritical-insensitve increasing alphabetical order by tag.

Specified by:
compareTo in interface java.lang.Comparable<MajorWordClass>
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.