edu.northwestern.at.wordhoard.swing.calculator.modelutils
Class CorpusUtils

java.lang.Object
  extended by edu.northwestern.at.wordhoard.swing.calculator.modelutils.CorpusUtils

public class CorpusUtils
extends java.lang.Object

Corpus utilities.


Constructor Summary
protected CorpusUtils()
          Don't allow instantiation but do allow overrides.
 
Method Summary
static Corpus[] getCorpora()
          Get all available corpora as an array.
static Corpus getCorpus(java.lang.String title)
          Get a corpus by title.
static Corpus getCorpusByTag(java.lang.String tag)
          Get a corpus by tag.
static WorkPart[] getWorkParts(Corpus corpus)
          Get all available work parts in a corpus as an array.
static Work[] getWorks(Corpus corpus)
          Get all available works in a corpus as an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorpusUtils

protected CorpusUtils()
Don't allow instantiation but do allow overrides.

Method Detail

getCorpus

public static Corpus getCorpus(java.lang.String title)
Get a corpus by title.

Parameters:
title - The title of the corpus to fetch.
Returns:
The corpus with the requested title, or null if not found.

getCorpusByTag

public static Corpus getCorpusByTag(java.lang.String tag)
Get a corpus by tag.

Parameters:
tag - The tag of the corpus to fetch.
Returns:
The corpus with the requested tag, or null if not found.

getCorpora

public static Corpus[] getCorpora()
Get all available corpora as an array.

Returns:
All available corpora as an array of Corpus.

getWorks

public static Work[] getWorks(Corpus corpus)
Get all available works in a corpus as an array.

Parameters:
corpus - The corpus.
Returns:
All available works in the corpus as an array of Work.

Returns null if corpus is null.


getWorkParts

public static WorkPart[] getWorkParts(Corpus corpus)
Get all available work parts in a corpus as an array.

Parameters:
corpus - The corpus.
Returns:
All available work parts in the corpus as an array of WorkPart.

Returns null if corpus is null.