ca.site.elkb
Class SubSection

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

public class SubSection
extends java.lang.Object

Represents a Roget's Thesaurus Sub-section. A Sub-section may or may not exist. Here is an example:

Sub-sections may contain several Head groups.

Version:
1.4 2013
Author:
Mario Jarmasz and Alistsair Kennedy

Constructor Summary
SubSection()
          Default constructor.
SubSection(int start)
          Constructor which sets the number of the first Head.
SubSection(int start, java.lang.String sInfo)
          Constructor which sets the number of the first Head and the name of the Section supplied as a string to be parsed.
SubSection(java.lang.String sInfo)
          Constructor which sets the name of the Section by parsing a string.
 
Method Summary
 void addGroup(Group group)
          Adds a Head Group to this Sub-section.
 int getGroupCount()
          Returns the number of Head groups in this Sub-section.
 java.util.ArrayList<Group> getGroupList()
          Returns the list of Head groups in this Sub-section.
 int getHeadCount()
          Returns the number of Heads in this Sub-section.
 int getHeadStart()
          Returns the number of the first Head in this Sub-section.
 void print()
          Displays the content of a Sub-section in a similar way to Roget's Thesaurus Tabular Synopisis of Categories to the standard output.
 void setHeadStart(int start)
          Sets the number of the first Head in this Sub-section.
 java.lang.String toString()
          Converts to a string representation the SubSection object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubSection

public SubSection()
Default constructor.


SubSection

public SubSection(int start)
Constructor which sets the number of the first Head.

Parameters:
start -

SubSection

public SubSection(java.lang.String sInfo)
Constructor which sets the name of the Section by parsing a string. An example of a string to parse is:
^subSectionTitle>#Abstract#^/subSectionTitle>

Parameters:
sInfo -

SubSection

public SubSection(int start,
                  java.lang.String sInfo)
Constructor which sets the number of the first Head and the name of the Section supplied as a string to be parsed. An example of a string to parse is:
^subSectionTitle>#Abstract#^/subSectionTitle>

Parameters:
start -
sInfo -
Method Detail

getGroupList

public java.util.ArrayList<Group> getGroupList()
Returns the list of Head groups in this Sub-section.

Returns:
ArrayList of groups

addGroup

public void addGroup(Group group)
Adds a Head Group to this Sub-section.

Parameters:
group -

getHeadCount

public int getHeadCount()
Returns the number of Heads in this Sub-section.

Returns:
number of heads

getGroupCount

public int getGroupCount()
Returns the number of Head groups in this Sub-section.

Returns:
group count

setHeadStart

public void setHeadStart(int start)
Sets the number of the first Head in this Sub-section.

Parameters:
start -

getHeadStart

public int getHeadStart()
Returns the number of the first Head in this Sub-section.

Returns:
number of first head

print

public void print()
Displays the content of a Sub-section in a similar way to Roget's Thesaurus Tabular Synopisis of Categories to the standard output. An example of this display is:
Absolute: 9 Relation 10 Unrelatedness
11 Consanguinity
12 Correlation
13 Identity 14 Contrariety
15 Difference


toString

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

Overrides:
toString in class java.lang.Object