+ *
+ * @throws IOException
+ * in case of IOException
+ */
+ public abstract Image getCover(String luid) throws IOException;
+
+ // TODO: ensure it is the main used interface
+ public MetaResultList getList(Progress pg) throws IOException {
+ return new MetaResultList(getMetas(pg));
+ }
+
+ // TODO: make something for (normal and custom) not-story covers
+
+ /**
+ * Return the cover image associated to this source.
+ * <p>
+ * By default, return the custom cover if any, and if not, return the cover
+ * of the first story with this source.
+ *
+ * @param source
+ * the source
+ *
+ * @return the cover image or NULL
+ *
+ * @throws IOException
+ * in case of IOException
+ */
+ public Image getSourceCover(String source) throws IOException {
+ Image custom = getCustomSourceCover(source);
+ if (custom != null) {
+ return custom;
+ }
+
+ List<MetaData> metas = getList().filter(source, null, null);
+ if (metas.size() > 0) {
+ return getCover(metas.get(0).getLuid());
+ }
+
+ return null;
+ }
+
+ /**
+ * Return the cover image associated to this author.
+ * <p>
+ * By default, return the custom cover if any, and if not, return the cover
+ * of the first story with this author.
+ *
+ * @param author
+ * the author
+ *
+ * @return the cover image or NULL
+ *
+ * @throws IOException
+ * in case of IOException
+ */
+ public Image getAuthorCover(String author) throws IOException {
+ Image custom = getCustomAuthorCover(author);
+ if (custom != null) {
+ return custom;
+ }
+
+ List<MetaData> metas = getList().filter(null, author, null);
+ if (metas.size() > 0) {
+ return getCover(metas.get(0).getLuid());
+ }
+
+ return null;
+ }
+
+ /**
+ * Return the custom cover image associated to this source.
+ * <p>
+ * By default, return NULL.
+ *
+ * @param source
+ * the source to look for
+ *
+ * @return the custom cover or NULL if none
+ *
+ * @throws IOException
+ * in case of IOException
+ */
+ @SuppressWarnings("unused")
+ public Image getCustomSourceCover(String source) throws IOException {
+ return null;
+ }
+
+ /**
+ * Return the custom cover image associated to this author.
+ * <p>
+ * By default, return NULL.
+ *
+ * @param author
+ * the author to look for
+ *
+ * @return the custom cover or NULL if none
+ *
+ * @throws IOException
+ * in case of IOException
+ */
+ @SuppressWarnings("unused")
+ public Image getCustomAuthorCover(String author) throws IOException {
+ return null;
+ }
+
+ /**
+ * Set the source cover to the given story cover.
+ *
+ * @param source
+ * the source to change
+ * @param luid
+ * the story LUID
+ *
+ * @throws IOException
+ * in case of IOException