public class Search
extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static List<Page> | pageListParsed pages. | 
| private String | pageListFilePage List File Path | 
| static List<Result> | resultSetList of Results. | 
| static List<Word> | wordListList of Word objects. | 
| private String | wordListFileWord List File Path | 
| Constructor and Description | 
|---|
| Search(String wordListFile,
      String pageListFile)Constructor for Search should load word list and page list from object files specified. | 
| Modifier and Type | Method and Description | 
|---|---|
| List<Result> | executeQuery(String query)Execute a query over the built tables and return an
 ArrayList of Result objects. | 
| void | nullCheck()Utility method to check if we have not read in our
 lists from file. | 
| void | setup(String wordListFile,
     String pageListFile)Read in word and page table Objects from files. | 
| void | sort()Method to sort our ArrayList of Results by
 their score. | 
public static List<Page> pageList
public static List<Word> wordList
public static List<Result> resultSet
private String wordListFile
private String pageListFile
public Search(String wordListFile,
              String pageListFile)
wordListFile - path to the serialized word list filepageListFile - path to the serialized page list filepublic void setup(String wordListFile,
                  String pageListFile)
wordListFile - path to the serialized word list filepageListFile - path to the serialized page list filepublic List<Result> executeQuery(String query)
query - query to executepublic void nullCheck()
public void sort()