ca.site.elkb
Class SG

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

public class SG
extends java.lang.Object

Represents a Roget's Thesaurus Semicolon Group. For example:

A Semicolon Group is defined by the following attributes:

Version:
1.4 2013
Author:
Mario Jarmasz and Alistsair Kennedy

Constructor Summary
SG()
          Default constructor.
SG(int num)
          Constructor takes a sg num
SG(int numSG, int numP, int numH, java.util.ArrayList<java.lang.String> currentSGWords, java.lang.String p)
          Constructor that sets the Semicolon Group number, Paragraph number, Head number, the words and phases of the Semicolon Group and the part-of-speech.
SG(int numSG, int numP, int numH, java.lang.String text, java.lang.String p)
          Constructor that sets the Semicolon Group number, Paragraph number, Head number, the words and phases of the Semicolon Group and the part-of-speech.
SG(int num, java.lang.String text)
          Constructor that sets the Semicolon Group number and the words and phases that it contains.
 
Method Summary
 void addSemRel(SemRel rel)
          Adds a relation to this Semicolon Group
 void addWord(java.lang.String word)
          Adds a word or phrase to this Semicolon Group.
 void addWord(java.lang.String word, java.lang.String tag)
          Adds a word or phrase and its style tag to this Semicolon Group.
 java.lang.String format()
          Returns this Semicolon Group formatted in a string, including references, style tags and punctuation.
 java.util.ArrayList<java.lang.String> getAllWordList()
          Returns the list of words and phrases, including the references, contained in this Semicolon Group.
 int getCRefCount()
          Returns the number Cross-references in this Semicolon Group.
 java.lang.String getGroup()
          Returns a string containing all of the words and phrases in the Semicolon Group minus the references.
 int getHeadNum()
          Returns the Head number of this Semicolon Group.
 java.lang.String getOffset()
          Returns a symbolic adress of this Semicolon Group.
 java.util.ArrayList<java.lang.String> getOffsetList()
          Returns a list of Semicolon Groups with their symbolic addresses.
 java.lang.String getParaKey()
          Returns the Paragraph keyword of this Semicolon Group.
 int getParaNum()
          Returns the Paragraph number of this Semicolon Group.
 java.lang.String getPOS()
          Returns the part-of-speech of this Semicolon Group.
 java.lang.String getReference()
          Returns a string containing only the references of this Semicolon Group.
 int getSeeCount()
          Returns the number See refereces in this Semicolon Group.
 java.util.ArrayList<SemRel> getSemRelList()
          Returns the list of relations of this Semicolon Group.
 int getSGNum()
          Returns the number of this Semicolon Group.
 java.util.ArrayList<java.lang.String> getStyleTagList()
          Returns the list of style tags of this Semicolon Group.
 int getWordCount()
          Returns the number of words and phrases in this Semicolon Group.
 java.util.ArrayList<java.lang.String> getWordList()
          Returns the list of words and phrases, minus the references, contained in this Semicolon Group.
 void print()
          Prints this Semicolon Group to the standard output.
 void setHeadNum(int num)
          Sets the Head number of this Semicolon Group.
 void setParaKey(java.lang.String key)
          Sets the Paragraph keyword of this Semicolon Group.
 void setParaNum(int num)
          Sets the Paragraph number of this Semicolon Group.
 void setPOS(java.lang.String p)
          Sets the part-of-speech of this Semicolon Group.
 void setSGNum(int num)
          Sets the number of this Semicolon Group.
 void setText(java.lang.String text)
          Sets the words and phrases used in this Semicolon Group.
 java.lang.String toString()
          Converts to a string representation the SG object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SG

public SG()
Default constructor.


SG

public SG(int num)
Constructor takes a sg num

Parameters:
num -

SG

public SG(int num,
          java.lang.String text)
Constructor that sets the Semicolon Group number and the words and phases that it contains.

Parameters:
num -
text -

SG

public SG(int numSG,
          int numP,
          int numH,
          java.lang.String text,
          java.lang.String p)
Constructor that sets the Semicolon Group number, Paragraph number, Head number, the words and phases of the Semicolon Group and the part-of-speech.

Parameters:
numSG -
numP -
numH -
text -
p -

SG

public SG(int numSG,
          int numP,
          int numH,
          java.util.ArrayList<java.lang.String> currentSGWords,
          java.lang.String p)
Constructor that sets the Semicolon Group number, Paragraph number, Head number, the words and phases of the Semicolon Group and the part-of-speech.

Parameters:
numSG -
numP -
numH -
currentSGWords -
p -
Method Detail

getSGNum

public int getSGNum()
Returns the number of this Semicolon Group.

Returns:
semicolon group number

setSGNum

public void setSGNum(int num)
Sets the number of this Semicolon Group.

Parameters:
num -

getParaNum

public int getParaNum()
Returns the Paragraph number of this Semicolon Group.

Returns:
paragraph number

setParaNum

public void setParaNum(int num)
Sets the Paragraph number of this Semicolon Group.

Parameters:
num -

getHeadNum

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

Returns:
head number

setHeadNum

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

Parameters:
num -

getParaKey

public java.lang.String getParaKey()
Returns the Paragraph keyword of this Semicolon Group.

Returns:
paragraph key

setParaKey

public void setParaKey(java.lang.String key)
Sets the Paragraph keyword of this Semicolon Group.

Parameters:
key -

getPOS

public java.lang.String getPOS()
Returns the part-of-speech of this Semicolon Group.

Returns:
part of speech

setPOS

public void setPOS(java.lang.String p)
Sets the part-of-speech of this Semicolon Group.

Parameters:
p -

getCRefCount

public int getCRefCount()
Returns the number Cross-references in this Semicolon Group.

Returns:
number of cross references

getSeeCount

public int getSeeCount()
Returns the number See refereces in this Semicolon Group.

Returns:
number of See references

getOffset

public java.lang.String getOffset()
Returns a symbolic adress of this Semicolon Group. It is representd as Head Number.Paragraph Number.Semicolon Group Number.

Returns:
the offset

addWord

public void addWord(java.lang.String word)
Adds a word or phrase to this Semicolon Group.

Parameters:
word -

addWord

public void addWord(java.lang.String word,
                    java.lang.String tag)
Adds a word or phrase and its style tag to this Semicolon Group.

Parameters:
word -
tag -

addSemRel

public void addSemRel(SemRel rel)
Adds a relation to this Semicolon Group

Parameters:
rel -

getWordList

public java.util.ArrayList<java.lang.String> getWordList()
Returns the list of words and phrases, minus the references, contained in this Semicolon Group.

Returns:
ArrayList of words

getAllWordList

public java.util.ArrayList<java.lang.String> getAllWordList()
Returns the list of words and phrases, including the references, contained in this Semicolon Group.

Returns:
ArrayList of words

getStyleTagList

public java.util.ArrayList<java.lang.String> getStyleTagList()
Returns the list of style tags of this Semicolon Group.

Returns:
ArrayList of tag styles

getSemRelList

public java.util.ArrayList<SemRel> getSemRelList()
Returns the list of relations of this Semicolon Group.

Returns:
ArrayList of semantic relationships

getWordCount

public int getWordCount()
Returns the number of words and phrases in this Semicolon Group.

Returns:
number of words and phrases

setText

public void setText(java.lang.String text)
Sets the words and phrases used in this Semicolon Group. The words and phrases are supplied as an ELKB formatted string.

Parameters:
text -

toString

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

Overrides:
toString in class java.lang.Object

print

public void print()
Prints this Semicolon Group to the standard output.


getGroup

public java.lang.String getGroup()
Returns a string containing all of the words and phrases in the Semicolon Group minus the references.

Returns:
semicolon group in a string

getReference

public java.lang.String getReference()
Returns a string containing only the references of this Semicolon Group.

Returns:
String of references

format

public java.lang.String format()
Returns this Semicolon Group formatted in a string, including references, style tags and punctuation.

Returns:
semicolon group as a string

getOffsetList

public java.util.ArrayList<java.lang.String> getOffsetList()
Returns a list of Semicolon Groups with their symbolic addresses.

Returns:
ArrayList of offsets