|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectConcordance.FileInputReader
public class FileInputReader
Constructor Summary | |
---|---|
FileInputReader()
|
Method Summary | |
---|---|
int |
getLineNumber()
|
java.util.LinkedList<ConcordanceResult> |
getResultsList(java.lang.String selectedIndex)
This method returns a LinkedList of ConcordanceResult, these contain the context and line numbers needed to provide extra information about the index word |
void |
processInputIndex(java.lang.String indexToLoad,
java.lang.String textToLoad)
This method creates an input stream to allow the index text file to be read in. |
void |
processInputText(java.lang.String textToLoad)
Creates an input stream to read in a reference text file, this file is then tokenized (split up into individual words), this allows each word to be compared to the index words contained in the hashtable. |
java.util.Hashtable<java.lang.String,java.util.LinkedList<ConcordanceResult>> |
returnHashTable()
Returns the HashTable |
java.util.ArrayList<java.lang.String> |
returnList()
This method provides a sort, the items are added to an ArrayList and then Collections.sort() is called to sort them into alphabetical order, the sorted list is then returned to be displayed on the GUI. |
void |
setLineNumber(int lineNumber)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileInputReader()
Method Detail |
---|
public void processInputIndex(java.lang.String indexToLoad, java.lang.String textToLoad)
indexToLoad
- A String reference of a filepath to the desired index file to load in .txt formattextToLoad
- A String reference of a filepath to the desired text file to load in .txt formatpublic void processInputText(java.lang.String textToLoad) throws java.io.IOException
textToLoad
- A String reference of a filepath to the desired text file to load in .txt format
java.io.IOException
- Exception thrown if file is not foundpublic java.util.Hashtable<java.lang.String,java.util.LinkedList<ConcordanceResult>> returnHashTable()
public java.util.ArrayList<java.lang.String> returnList()
public java.util.LinkedList<ConcordanceResult> getResultsList(java.lang.String selectedIndex)
selectedIndex
- The selected index of a JList to show the users desired choice of index word
public int getLineNumber()
public void setLineNumber(int lineNumber)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |