|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.site.elkb.Paragraph
public class Paragraph
Represents a Roget's Thesaurus Paragraph. A Paragraph is defined by the following attributes:
Constructor Summary | |
---|---|
Paragraph()
Default constructor. |
|
Paragraph(int head,
int para,
java.lang.String p)
Constructor which sets the Head number, Paragraph number and part-of-speech. |
|
Paragraph(int head,
int para,
java.lang.String key,
java.lang.String p)
Constructor which sets the Head number, Paragraph number, keyword, and part-of-speech. |
Method Summary | |
---|---|
void |
addSG(SG sgObj)
Adds a Semicolon Group, repreented as a string, to the Paragraph. |
void |
addSG(java.lang.String sg)
Adds a Semicolon Group, repreented as a string, to the Paragraph. |
boolean |
equals(java.lang.Object anObject)
Compares this paragraph to the specified object. |
java.lang.String |
format()
Converts to a string representation, similar to the printed format, the Paragraph object. |
java.util.ArrayList<java.lang.String> |
getAllWordList()
Returns all of the words and phrases in a paragraph. |
int |
getCRefCount()
Returns the number of Cross-references in this Paragraph. |
int |
getHeadNum()
Returns the Head number of this Paragraph. |
java.lang.String |
getParaKey()
Returns the keyword of this Paragraph. |
int |
getParaNum()
Returns the number of this Paragraph. |
java.lang.String |
getPOS()
Returns the part-of-speech of this Paragraph. |
int |
getSeeCount()
Returns the number of See references in this Paragraph. |
SG |
getSG(int index)
Returns the Semicolon Group at the specified position in the array of Semicolon Groups. |
SG |
getSG(java.lang.String word)
Returns the the first Semicolon Group in this Paragraph which contains the given word. |
int |
getSGCount()
Returns the number of Semicolon Groups in this Paragraph. |
SG |
getSGinPhrase(java.lang.String word)
Returns the the first Semicolon Group in this Paragraph which contains the given word either on its own or in a phrase. |
java.util.ArrayList<SG> |
getSGList()
Returns the array of Semicolon Groups of this Paragraph. |
int |
getWordCount()
Returns the number of words in this Paragraph. |
java.lang.String |
parseParaKey(java.lang.String line)
Extracts the keyword from a Semicolon Group represented as a string. |
void |
print()
Prints the contents of this Paragraph to the standard output. |
void |
printAllSG()
Prints all the contents of all Semicolon Groups, including references, without any special formatting. |
void |
printAllWords()
Prints all of the words and phrases in the Paragraph on a separate line to the standard output. |
void |
setHeadNum(int num)
Sets the Head number of this Paragraph. |
void |
setParaKey(java.lang.String key)
Sets the keyword of this Paragraph. |
void |
setParaNum(int num)
Sets the number of this Paragraph. |
void |
setPOS(java.lang.String p)
Sets the part-of-speech of this Paragraph. |
java.lang.String |
toString()
Converts to a string representation the Paragraph object. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Paragraph()
public Paragraph(int head, int para, java.lang.String p)
head
- para
- p
- public Paragraph(int head, int para, java.lang.String key, java.lang.String p)
head
- para
- key
- p
- Method Detail |
---|
public int getHeadNum()
public void setHeadNum(int num)
num
- public int getParaNum()
public void setParaNum(int num)
num
- public java.lang.String getParaKey()
public void setParaKey(java.lang.String key)
key
- public java.lang.String getPOS()
public void setPOS(java.lang.String p)
p
- public int getWordCount()
public int getCRefCount()
public int getSeeCount()
public int getSGCount()
public java.util.ArrayList<SG> getSGList()
public void addSG(java.lang.String sg)
^sg>^i>frenzy, ^/i>monomania,
furore, frenetic condition,;^/sg>
.
sg
- public void addSG(SG sgObj)
sgObj
- public SG getSG(java.lang.String word)
word
-
public SG getSGinPhrase(java.lang.String word)
word
-
public SG getSG(int index)
index
-
public java.lang.String parseParaKey(java.lang.String line)
^sg>^i>existence, ^/i>being, entity;^/sg>
line
-
public java.lang.String toString()
toString
in class java.lang.Object
public void print()
public java.lang.String format()
public boolean equals(java.lang.Object anObject)
true
if the argument is not null
and is a
Paragraph
object that has the same paraKey
as this object.
equals
in class java.lang.Object
anObject
- the object to compare this Paragraph
against.
true
if the Paragraph
have the same
paraKey
; false
otherwise.String.compareTo(java.lang.String)
,
String.equalsIgnoreCase(java.lang.String)
public java.util.ArrayList<java.lang.String> getAllWordList()
public void printAllWords()
word:keyword:headnum:pos
public void printAllSG()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |