public class DataManager
extends java.lang.Object
| Constructor and Description |
|---|
DataManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialiseHibernate()
Initialise Hibernate library.
|
void |
removeAllData()
Remove each sentence, paragraph, and the source information of all the sources in the database.
|
void |
removeData(java.lang.String url)
Remove each sentence, paragraph, entity and the source information by the name of the source.
|
Source |
retrieveSource(int id,
int type)
Retrieve a source information by sentence/entity/paragraph ID.
|
Source |
retrieveSource(java.lang.String url)
Retrieve a source information by source url.
|
Suggestion |
retrieveSubsequentText(int id,
int type)
Retrieve subsequent suggestion by the ID of previous Sentence object and the requested
type of subsequent suggestion.
|
java.util.List<Suggestion> |
searchBasedOnRequest(java.lang.String userInput,
Preference prefs,
boolean autoTrigger)
Search for relevant suggestion by input from the user and the user preferences.
|
int |
storeProcessedText(ProcessedText processedText)
Store processed information from an extracted source (Source, Paragraph, Sentence, Entities).
|
public void initialiseHibernate()
throws java.lang.Throwable
java.lang.Throwablepublic void removeData(java.lang.String url)
url - source name of the source document.public void removeAllData()
public Source retrieveSource(java.lang.String url)
url - source url.Suggestionpublic Source retrieveSource(int id, int type)
id - sentence/entity/paragraph ID.type - type of Suggestion with regard to the ID. (Refer to Suggestion class constant variable)Suggestionpublic Suggestion retrieveSubsequentText(int id, int type)
id - ID of previous sentence.type - type of subsequent suggestion. (Refer to Suggestion class constant variable)Suggestionpublic java.util.List<Suggestion> searchBasedOnRequest(java.lang.String userInput, Preference prefs, boolean autoTrigger)
userInput - search string input from the user.prefs - user preferences of ACP.autoTrigger - indication of the suggestion trigger mode.Suggestionpublic int storeProcessedText(ProcessedText processedText)
processedText - processed information from an extracted source.ProcessedText