X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsearchable%2FBasicSearchable.java;h=cb0b1712ccb3fc7762354f799a04f65b45d89de8;hb=98b95fb81566ca8b04c8d891a02c8019d8bed63d;hp=d38505e7660fb9f0348394ac23390fa3cdb4aa65;hpb=12b90437b5f22c2ae6e9b9b14c3b62b60f6143e5;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/searchable/BasicSearchable.java b/src/be/nikiroo/fanfix/searchable/BasicSearchable.java deleted file mode 100644 index d38505e..0000000 --- a/src/be/nikiroo/fanfix/searchable/BasicSearchable.java +++ /dev/null @@ -1,276 +0,0 @@ -package be.nikiroo.fanfix.searchable; - -import java.io.IOException; -import java.net.URL; -import java.util.List; - -import org.jsoup.helper.DataUtil; -import org.jsoup.nodes.Document; - -import be.nikiroo.fanfix.Instance; -import be.nikiroo.fanfix.data.MetaData; -import be.nikiroo.fanfix.supported.BasicSupport; -import be.nikiroo.fanfix.supported.SupportType; - -/** - * This class supports browsing through stories on the supported websites. It - * will fetch some {@link MetaData} that satisfy a search query or some tags if - * supported. - * - * @author niki - */ -public abstract class BasicSearchable { - private SupportType type; - private BasicSupport support; - - /** - * Create a new {@link BasicSearchable} of the given type. - * - * @param type - * the type, must not be NULL - */ - public BasicSearchable(SupportType type) { - setType(type); - support = BasicSupport.getSupport(getType(), null); - } - - /** - * Find the given tag by its hierarchical IDs. - *
- * I.E., it will take the tag A, subtag B, subsubtag C...
- *
- * @param ids
- * the IDs to look for
- *
- * @return the appropriate tag fully filled, or NULL if not found
- *
- * @throws IOException
- * in case of I/O error
- */
- public SearchableTag getTag(Integer... ids) throws IOException {
- SearchableTag tag = null;
- List
- * Mostly used to download content.
- *
- * @return the support
- */
- protected BasicSupport getSupport() {
- return support;
- }
-
- /**
- * Get a list of tags that can be browsed here.
- *
- * @return the list of tags
- *
- * @throws IOException
- * in case of I/O error
- */
- abstract public List
- * Not that the returned stories will NOT be complete, but will only
- * contain enough information to present them to the user and retrieve them.
- *
- * URL is guaranteed to be usable, LUID will always be NULL.
- *
- * @param search
- * the term to search for
- * @param page
- * the page to use for result pagination, index is 1-based
- *
- * @return a list of stories that satisfy that search term
- *
- * @throws IOException
- * in case of I/O error
- */
- abstract public List
- * Not that the returned stories will NOT be complete, but will only
- * contain enough information to present them to the user and retrieve them.
- *
- * URL is guaranteed to be usable, LUID will always be NULL.
- *
- * @param tag
- * the tag to search for
- * @param page
- * the page to use for result pagination (see
- * {@link SearchableTag#getPages()}, remember to check for -1),
- * index is 1-based
- *
- * @return a list of stories that satisfy that search term
- *
- * @throws IOException
- * in case of I/O error
- */
- abstract public List