edu.northwestern.at.monk.model
Class CoreObject

java.lang.Object
  extended by edu.northwestern.at.monk.model.TaggedObject
      extended by edu.northwestern.at.monk.model.CoreObject
Direct Known Subclasses:
Author, CaseCategory, Corpus, DegreeCategory, Lemma, MajorWordClass, MoodCategory, NegativeCategory, NumberCategory, PersonCategory, Pos, Spelling, SyntaxCategory, TenseCategory, WordClass, WorkPart

public abstract class CoreObject
extends TaggedObject

A core object.

Core objects are read into memory for efficient access at model initialization.

Core objects are immutable. The initialization method constructs all of them. There are no public constructors, factory methods, or setter methods. There is only one copy of each core object in memory. You may check for equality of core objects using the == operator. There is no need to use the equals method.

Each core object class implements the interface Comparable<T>. The compareTo method defines a "natural" ordering, typically a case and diacritical-insensitive increasing alphabetical ordering by tag, title, or name.

Each core object class T implements the following static methods:

static T get (String tag)

Gets an object given its tag.

static Collection<T> getAll ()

Gets all the objects of the class, in their natural order.

static Collection<T> find (SearchCriterion... criteria)

Finds all objects satisfying a vararg list or array of search criteria.

static Collection<T> find (Collection<SearchCriterion> criteria)

Finds all objects satisfying a collection of search criteria.

static Collection<T> find (SearchCriteria criteria)

Finds all objects satisfying a set of search criteria.

static void sort (T[] array, T.SortOption... options)

Sorts an array of objects using multi-column sort options.

static T[] sort (Collection<T> collection, T.SortOption... options)

Sorts a collection of objects using multi-column sort options.

Each core object class T has the following nested subclasses:

T.SortOption

An enum of multi-column sort option constants.

T.Comparator

A multi-column comparator for the class.

See Also:
MONK Datastore Overview, Licensing Agreement

Method Summary
 
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