ca.site.elkb
Class HeadInfo

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

public class HeadInfo
extends java.lang.Object

Object used to store the information that defines a Head but not its words and phrases. It contains the following attributes:

Version:
1.4 2013
Author:
Mario Jarmasz and Alistsair Kennedy

Constructor Summary
HeadInfo()
          Default constructor.
HeadInfo(int number, java.lang.String name, int cn, int sn, int ssn, int hgn, java.lang.String subName, java.util.ArrayList<java.lang.String> groupList)
          Constructor which sets the Head number and name, as well as the Class and Section number, Sub-section name and Head group list.
HeadInfo(int number, java.lang.String name, int cn, int sn, java.lang.String subName, java.util.ArrayList<java.lang.String> groupList)
          Constructor which sets the Head number and name, as well as the Class and Section number, Sub-section name and Head group list.
HeadInfo(java.lang.String sInfo, int cn, int sn, java.lang.String subSectInfo, java.lang.String sGroupInfo)
          Constructor which sets the Head number and name, as well as the Class and Section number, Sub-section name and Head group list.
 
Method Summary
 int getClassNum()
          Returns the Class number of this Head.
 java.util.ArrayList<java.lang.String> getHeadGroup()
          Returns the array of HeadGroup objects of this Head.
 int getHeadGroupNum()
          Returns the Head Group number of this Head.
 java.lang.String getHeadName()
          Returns the name of this Head.
 int getHeadNum()
          Returns the number of this Head.
 int getSectNum()
          Returns the Section number of this Head.
 java.lang.String getSubSectName()
          Returns the Sub-section name of this Head.
 int getSubSectNum()
          Returns the Sub-Section number of this Head.
 void print()
          prints out the toString method.
 void setClassNum(int num)
          Sets the number of this Head.
 void setHeadGroup(java.util.ArrayList<java.lang.String> group)
          Sets the array of HeadGroup objects of this Head.
 void setHeadName(java.lang.String name)
          Sets the name of this Head.
 void setHeadNum(int num)
          Sets the number of this Head.
 void setSectNum(int num)
          Sets the Section number of this Head.
 void setSubSectName(java.lang.String name)
          Sets the Section name of this Head.
 java.lang.String toString()
          Converts to a string representation the HeadInfo object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HeadInfo

public HeadInfo()
Default constructor.


HeadInfo

public HeadInfo(int number,
                java.lang.String name,
                int cn,
                int sn,
                java.lang.String subName,
                java.util.ArrayList<java.lang.String> groupList)
Constructor which sets the Head number and name, as well as the Class and Section number, Sub-section name and Head group list.

Parameters:
number -
name -
cn -
sn -
subName -
groupList -

HeadInfo

public HeadInfo(int number,
                java.lang.String name,
                int cn,
                int sn,
                int ssn,
                int hgn,
                java.lang.String subName,
                java.util.ArrayList<java.lang.String> groupList)
Constructor which sets the Head number and name, as well as the Class and Section number, Sub-section name and Head group list. Contains sub-section and head group numbers.

Parameters:
number -
name -
cn -
sn -
ssn -
hgn -
subName -
groupList -

HeadInfo

public HeadInfo(java.lang.String sInfo,
                int cn,
                int sn,
                java.lang.String subSectInfo,
                java.lang.String sGroupInfo)
Constructor which sets the Head number and name, as well as the Class and Section number, Sub-section name and Head group list.

This constructor parses strings containing the Sub-section name, Head group list and Head passed in the following format:

 
 ^subSectionTitle>#Abstract#^/subSectionTitle> ^headGroup 1 2 >
 ^headword>#^b>#[001] #1# Existence #^/b>#^/headword>
 
 
The Class and Section numbers are represented by and int. The Sub-section is an optional element. It can also be an empty String.

Parameters:
sInfo -
cn -
sn -
subSectInfo -
sGroupInfo -
Method Detail

getHeadNum

public int getHeadNum()
Returns the number of this Head.

Returns:
head number

getClassNum

public int getClassNum()
Returns the Class number of this Head.

Returns:
class number

getSectNum

public int getSectNum()
Returns the Section number of this Head.

Returns:
section number

getSubSectNum

public int getSubSectNum()
Returns the Sub-Section number of this Head.

Returns:
sub section number

getHeadGroupNum

public int getHeadGroupNum()
Returns the Head Group number of this Head.

Returns:
head group number

getSubSectName

public java.lang.String getSubSectName()
Returns the Sub-section name of this Head.

Returns:
sub section number

getHeadGroup

public java.util.ArrayList<java.lang.String> getHeadGroup()
Returns the array of HeadGroup objects of this Head.

Returns:
ArrayList of head groups

setHeadNum

public void setHeadNum(int num)
Sets the number of this Head.

Parameters:
num -

getHeadName

public java.lang.String getHeadName()
Returns the name of this Head.

Returns:
head name

setHeadName

public void setHeadName(java.lang.String name)
Sets the name of this Head.

Parameters:
name -

setClassNum

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

Parameters:
num -

setSectNum

public void setSectNum(int num)
Sets the Section number of this Head.

Parameters:
num -

setSubSectName

public void setSubSectName(java.lang.String name)
Sets the Section name of this Head.

Parameters:
name -

setHeadGroup

public void setHeadGroup(java.util.ArrayList<java.lang.String> group)
Sets the array of HeadGroup objects of this Head.

Parameters:
group -

toString

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

Overrides:
toString in class java.lang.Object

print

public void print()
prints out the toString method.