X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2FReader.java;h=59ed024f42380a8a50f2b3e5fa199146d9092459;hp=b001e304842f4956095050160d5bf65b8795d3f3;hb=91b82a5cbd8a9c90798d1bd49bfa9a061e652a6a;hpb=c5097604f0980c574b2c7cd14d0da589cf143977 diff --git a/src/be/nikiroo/fanfix/reader/Reader.java b/src/be/nikiroo/fanfix/reader/Reader.java index b001e30..59ed024 100644 --- a/src/be/nikiroo/fanfix/reader/Reader.java +++ b/src/be/nikiroo/fanfix/reader/Reader.java @@ -6,6 +6,7 @@ import java.net.URL; import be.nikiroo.fanfix.data.MetaData; import be.nikiroo.fanfix.data.Story; import be.nikiroo.fanfix.library.BasicLibrary; +import be.nikiroo.fanfix.supported.SupportType; import be.nikiroo.utils.Progress; /** @@ -169,6 +170,58 @@ public interface Reader { */ public void browse(String source); + /** + * Search for the given terms and find stories that correspond if possible. + * + * @param searchOn + * the website to search on + * @param keywords + * the words to search for (cannot be NULL) + * @param page + * the page of results to show (0 = request the maximum number of + * pages, pages start at 1) + * @param item + * the item to select (0 = do not select a specific item but show + * all the page, items start at 1) + * + * @throws IOException + * in case of I/O error + */ + public void search(SupportType searchOn, String keywords, int page, int item) + throws IOException; + + /** + * Search based upon a hierarchy of tags, or search for (sub)tags. + *

+ * We use the tags DisplayName. + *

+ * If no tag is given, the main tags will be shown. + *

+ * If a non-leaf tag is given, the subtags will be shown. + *

+ * If a leaf tag is given (or a full hierarchy ending with a leaf tag), + * stories will be shown. + *

+ * You can select the story you want with the item number. + * + * @param searchOn + * the website to search on + * @param page + * the page of results to show (0 = request the maximum number of + * pages, pages start at 1) + * @param item + * the item to select (0 = do not select a specific item but show + * all the page, items start at 1) + * @param tags + * the tags display names to search for (this is a tag + * hierarchy, NOT a multiple tags choice) + * + * @throws IOException + * in case of I/O error + */ + public void searchTag(SupportType searchOn, int page, int item, + String... tags) throws IOException; + /** * Open the {@link Story} with an external reader (the program should be * passed the main file associated with this {@link Story}).