From 711bbb0070e36164fcbac06de5432570efc5c7a0 Mon Sep 17 00:00:00 2001 From: Maurice Laveaux Date: Thu, 22 May 2014 09:23:47 +0200 Subject: Added the Search interface. --- src/mining/Search.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/mining/Search.java diff --git a/src/mining/Search.java b/src/mining/Search.java new file mode 100644 index 0000000..505e156 --- /dev/null +++ b/src/mining/Search.java @@ -0,0 +1,49 @@ +package mining; + +import provider.ExceptionListener; +import provider.ResultListener; + +/** + * An interface that defines the searching for tweets of a given user. + * + * @author Maurice Laveaux + */ +public interface Search { + + /** + * Search for all history (up to 3200) tweets for a specific user. + * + * @param screenName The profile to search tweets from. + * @param numberOfTweets The maximum amount of tweets to search. + */ + public void search(String screenName, int numberOfTweets); + + /** + * Closes the threads for searching and saves a tempfile. + */ + public void close(); + + /** + * Save the current work queue to a specific file. + * + * @param filename The filename to save to. + */ + public void save(String filename); + + /** + * Load the work queue of a specific file. + * + * @param filename The filename to load from. + */ + public void load(String filename); + + /** + * @param listener The listener for resulting tweets. + */ + public void setResultListener(ResultListener listener); + + /** + * @param listener The listener for exceptions. + */ + public void setExceptionListener(ExceptionListener listener); +} -- cgit v1.2.1