edu.northwestern.at.wordhoard.model.tconview
Class TconView

java.lang.Object
  extended by edu.northwestern.at.wordhoard.model.tconview.TconView

public class TconView
extends java.lang.Object

A corpus table of contents view.

Each corpus has one or more table of contents views. There are five types of views:

Each table of contents view has an optional label for the radio button in the table of contents window. Radio buttons are used and labels should be specified if a corpus has more than one table of contents view.


Field Summary
static int BY_AUTHOR_VIEW_TYPE
          By author, then by pub year.
static int CATEGORY_VIEW_TYPE
          A list of categories, each of which contains a list of works.
static int LIST_PUB_YEAR_VIEW_TYPE
          A list of works in increasing order by publication year.
static int LIST_TAG_VIEW_TYPE
          A list of works in alphabetical order by tag (the default view).
static int LIST_VIEW_TYPE
          A list of works in a specified order.
 
Constructor Summary
TconView()
          Creates a new table of contents view.
 
Method Summary
 void addCategory(TconCategory category)
          Adds a category.
 void addWorkTag(java.lang.String workTag)
          Adds a work tag.
 java.util.List getCategories()
          Gets the list of categories.
 java.lang.Long getId()
          Gets the unique id.
 java.lang.String getRadioButtonLabel()
          Gets the radio button label.
 int getViewType()
          Gets the type of the view.
 java.util.List getWorkTags()
          Gets the list of work tags.
 void setRadioButtonLabel(java.lang.String radioButtonLabel)
          Sets the radio button label.
 void setViewType(int viewType)
          Sets the type of the view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIST_TAG_VIEW_TYPE

public static final int LIST_TAG_VIEW_TYPE
A list of works in alphabetical order by tag (the default view).

See Also:
Constant Field Values

LIST_PUB_YEAR_VIEW_TYPE

public static final int LIST_PUB_YEAR_VIEW_TYPE
A list of works in increasing order by publication year.

See Also:
Constant Field Values

LIST_VIEW_TYPE

public static final int LIST_VIEW_TYPE
A list of works in a specified order.

See Also:
Constant Field Values

CATEGORY_VIEW_TYPE

public static final int CATEGORY_VIEW_TYPE
A list of categories, each of which contains a list of works.

See Also:
Constant Field Values

BY_AUTHOR_VIEW_TYPE

public static final int BY_AUTHOR_VIEW_TYPE
By author, then by pub year.

See Also:
Constant Field Values
Constructor Detail

TconView

public TconView()
Creates a new table of contents view.

Method Detail

getId

public java.lang.Long getId()
Gets the unique id.

Returns:
The unique id.

getViewType

public int getViewType()
Gets the type of the view.

Returns:
The type of the view.

setViewType

public void setViewType(int viewType)
Sets the type of the view.

Parameters:
viewType - The type of the view.

getRadioButtonLabel

public java.lang.String getRadioButtonLabel()
Gets the radio button label.

Returns:
The radio button label, or null if none.

setRadioButtonLabel

public void setRadioButtonLabel(java.lang.String radioButtonLabel)
Sets the radio button label.

Parameters:
radioButtonLabel - The radio button label, or null if none.

getWorkTags

public java.util.List getWorkTags()
Gets the list of work tags.

Returns:
The list of work tags as an unmodifiable list. The list is empty if the view type is not LIST_VIEW_TYPE.

addWorkTag

public void addWorkTag(java.lang.String workTag)
Adds a work tag.

The new work tag is added to the ned of the ordered list of work tags.

Parameters:
workTag - Work tag.

getCategories

public java.util.List getCategories()
Gets the list of categories.

Returns:
The list of categories as an unmodifiable list. The list is empty if the view type is not CATEGORY_VIEW_TYPE.

addCategory

public void addCategory(TconCategory category)
Adds a category.

The new category is added to the end of the ordered list of categories.

Parameters:
category - Category.