|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuvi.Index
public class Index
This class contains all the verbs encountered during the parsing process
and the links associated with each verb. This class accumulates verbs and links
first during the XML parsing process and secondly during the PropBank and
FrameNet loading. The VerbNet verbs are added when a MEMBER tag is located in
an XML file. Once it contains all the links, the Generator
asks this class to sort each list of verbs (a list is a single letter, like A).
Finally, this class is the integral part in all of the index page creation.
NOTE: Any reference to "HTML Files" should be taken as a synonym for "PHP Files."
When this documentation was created, only *.html files were used. Later, they were
converted to *.php files to facilitate dynamic content (i.e. comments).
Generator.generateHTMLFiles()
,
Generator.generateIndexFiles()
,
Generator.addOthers(int)
,
Sweeper.startMEMBER(Node)
Nested Class Summary | |
---|---|
(package private) static class |
Index.Entry
Represents the index entry for a single English verb and holds all relevant links for that verb (from either VerbNet, PropBank, FrameNet). |
(package private) static class |
Index.Link
Represents a single link for a verb. |
Field Summary | |
---|---|
(package private) static ArrayList[] |
index
An array which can hold one ArrayList for each letter of the alphabet. |
(package private) static int |
LETTER_MAX
The number of letters in the alphabet. |
Constructor Summary | |
---|---|
private |
Index()
This constructor is private because the class is not intended to ever be instantiated. |
Method Summary | |
---|---|
(package private) static void |
addLink(String newVerb,
int newType,
String newText,
String newLink)
Registers a verb and one link with the index. |
(package private) static int |
getNumVerbs(int type)
Returns the total number of verbs represented in the index or the total number of links in the index for a given data source. |
(package private) static void |
sort()
Sort the verbs in each index entry array since verbs from the PropBank and FrameNet will have just been added to the end of the lists. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static int LETTER_MAX
static ArrayList[] index
ArrayList
for each letter of the alphabet.
Each index element begins as null
. Once the first verb for
that element's corresponding letter (i.e. C: index[2]) has been
encountered, the element is assigned to an instantiated ArrayList
.
That ArrayList
will hold Index.Entry
objects. Each
Index.Entry
object corresponds to a single English verb.
Constructor Detail |
---|
private Index()
Method Detail |
---|
static void addLink(String newVerb, int newType, String newText, String newLink)
ArrayList
is created
and assigned to the proper index
array element. If the
corresponding list is created, but the verb does not exist, the verb
and its link is added to the list. If the verb does exist in the list
for that first-letter already, then the link is simply added to the verb's
array of links (see Index.Entry.links
).
newVerb
- the verb found in the VerbNet, PropBank, or FrameNet sourcesnewType
- one of the values Generator.DS_*. This is used to identify
the source of this verb/link pair.newText
- the text to use in the index for this linknewLink
- the href
to use in the index for this linkGenerator.addOthers(int)
,
Sweeper.startMEMBER(Node)
,
Index.Entry
,
Index.Link
static void sort()
Generator.generateHTMLFiles()
static int getNumVerbs(int type)
type
- either the value -1 or one of the Generator.DS_* values
Generator.generateIndexFiles()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |