ca.site.elkb
Class RogetClass

java.lang.Object
  extended by ca.site.elkb.RogetClass

public class RogetClass
extends java.lang.Object

Represents the topmost element in Roget's Thesaurus Tabular Synopsis of Categories. It is represented by its number, name, subclass name if it is a subclass of an original Roget Class, and range of Sections that it contains. For example, Class 4. Intellect: the exercise of the mind (Formation of ideas) is represented as:

Version:
1.4 2013
Author:
Mario Jarmasz and Alistsair Kennedy

Constructor Summary
RogetClass()
          Default constructor.
RogetClass(int num, java.lang.String name)
          Constructor which sets the Class number and name.
RogetClass(int num, java.lang.String name, int start, int end)
          Constructor which sets the Class number and name, as well as the first and last Section number.
RogetClass(int num, java.lang.String strClassNum, java.lang.String strClassName)
          Constructor which sets the Class number, Class number in string format and Class name, while parsing the strings for the Class number and name.
RogetClass(int num, java.lang.String snum, java.lang.String name, int start, int end)
          onstructor which sets the Class number, Class number in string format, Class name, as well as the first and last Section number.
RogetClass(int num, java.lang.String snum, java.lang.String name, java.lang.String subClass)
          Constructor which sets the Class number, Class number in string format, Class and Sub-class name.
RogetClass(int num, java.lang.String snum, java.lang.String name, java.lang.String subClass, int start, int end)
          Constructor which sets the Class number, Class number in string format, Class name, Sub-class name as well as the first and last Section number.
 
Method Summary
 void addSection(Section section)
          Adds a Section to this RogetClass.
 java.lang.String getClassName()
          Returns the name of this RogetClass.
 int getClassNum()
          Returns the number of this RogetClass.
 int getSectionEnd()
          Returns the number of the last section of this RogetClass.
 java.util.ArrayList<Section> getSectionList()
          Returns the array of Section objects in this RogetClass.
 int getSectionStart()
          Returns the number of the first section of this RogetClass.
 java.lang.String getStrClassNum()
          Returns the number of this RogetClass in string format.
 java.lang.String getSubClassName()
          Returns the Sub-class name of this RogetClass.
 int headCount()
          Returns the number of Heads of this RogetClass.
 void print()
          Prints the contents of this RogetClass to the standard output.
 int sectionCount()
          Returns the number of Sections of this RogetClass.
 void setClassName(java.lang.String name)
          Sets the name of this RogetClass.
 void setClassNum(int num)
          Sets the number of this RogetClass.
 void setSectionEnd(int end)
          Sets the number of the last section of this RogetClass.
 void setSectionStart(int start)
          Sets the number of the first section of this RogetClass.
 void setStrClassNum(java.lang.String snum)
          Sets the number of this RogetClass in string format.
 void setSubClassName(java.lang.String subClass)
          Sets the Sub-class name of this RogetClass.
 java.lang.String toString()
          Converts to a string representation the RogetClass object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RogetClass

public RogetClass()
Default constructor.


RogetClass

public RogetClass(int num,
                  java.lang.String name)
Constructor which sets the Class number and name.

Parameters:
num -
name -

RogetClass

public RogetClass(int num,
                  java.lang.String snum,
                  java.lang.String name,
                  java.lang.String subClass)
Constructor which sets the Class number, Class number in string format, Class and Sub-class name.

Parameters:
num -
snum -
name -
subClass -

RogetClass

public RogetClass(int num,
                  java.lang.String name,
                  int start,
                  int end)
Constructor which sets the Class number and name, as well as the first and last Section number.

Parameters:
num -
name -
start -
end -

RogetClass

public RogetClass(int num,
                  java.lang.String snum,
                  java.lang.String name,
                  int start,
                  int end)
onstructor which sets the Class number, Class number in string format, Class name, as well as the first and last Section number.

Parameters:
num -
snum -
name -
start -
end -

RogetClass

public RogetClass(int num,
                  java.lang.String snum,
                  java.lang.String name,
                  java.lang.String subClass,
                  int start,
                  int end)
Constructor which sets the Class number, Class number in string format, Class name, Sub-class name as well as the first and last Section number.

Parameters:
num -
snum -
name -
subClass -
start -
end -

RogetClass

public RogetClass(int num,
                  java.lang.String strClassNum,
                  java.lang.String strClassName)
Constructor which sets the Class number, Class number in string format and Class name, while parsing the strings for the Class number and name. Examples of the strings to be parsed are:
^classNumber>#^i>#Class one #^/i>#^/classNumber>
^classTitle>#^i>#Abstract Relations #^/i>#^/classTitle>

Parameters:
num -
strClassNum -
strClassName -
Method Detail

getClassNum

public int getClassNum()
Returns the number of this RogetClass.

Returns:
class number

setClassNum

public void setClassNum(int num)
Sets the number of this RogetClass.

Parameters:
num -

getStrClassNum

public java.lang.String getStrClassNum()
Returns the number of this RogetClass in string format.

Returns:
class number as string

setStrClassNum

public void setStrClassNum(java.lang.String snum)
Sets the number of this RogetClass in string format.

Parameters:
snum -

getClassName

public java.lang.String getClassName()
Returns the name of this RogetClass.

Returns:
class name

setClassName

public void setClassName(java.lang.String name)
Sets the name of this RogetClass.

Parameters:
name -

getSubClassName

public java.lang.String getSubClassName()
Returns the Sub-class name of this RogetClass.

Returns:
sub class name

setSubClassName

public void setSubClassName(java.lang.String subClass)
Sets the Sub-class name of this RogetClass.

Parameters:
subClass -

getSectionStart

public int getSectionStart()
Returns the number of the first section of this RogetClass.

Returns:
section start number

setSectionStart

public void setSectionStart(int start)
Sets the number of the first section of this RogetClass.

Parameters:
start -

getSectionEnd

public int getSectionEnd()
Returns the number of the last section of this RogetClass.

Returns:
section end number

setSectionEnd

public void setSectionEnd(int end)
Sets the number of the last section of this RogetClass.

Parameters:
end -

addSection

public void addSection(Section section)
Adds a Section to this RogetClass.

Parameters:
section -

getSectionList

public java.util.ArrayList<Section> getSectionList()
Returns the array of Section objects in this RogetClass.

Returns:
ArrayList of sections

sectionCount

public int sectionCount()
Returns the number of Sections of this RogetClass.

Returns:
number of sections

headCount

public int headCount()
Returns the number of Heads of this RogetClass.

Returns:
number of heads

toString

public java.lang.String toString()
Converts to a string representation the RogetClass object.

Overrides:
toString in class java.lang.Object

print

public void print()
Prints the contents of this RogetClass to the standard output.