.cache -> gophermap
[gofetch.git] / src / be / nikiroo / gofetch / support / BasicSupport.java
index daa0ed16b4cfe52889665fb9a5caaddd7aa2a6f8..7a1d0eab9da69291bc112dcbd7f67abb127a49c6 100644 (file)
@@ -7,12 +7,11 @@ import java.net.URLConnection;
 import java.util.List;
 import java.util.zip.GZIPInputStream;
 
-import be.nikiroo.gofetch.data.Comment;
 import be.nikiroo.gofetch.data.Story;
 
 public abstract class BasicSupport {
        public enum Type {
-               SLASHDOT, PIPEDOT,
+               SLASHDOT, PIPEDOT, LWN,
        }
 
        static private String preselector;
@@ -21,7 +20,17 @@ public abstract class BasicSupport {
 
        abstract public List<Story> list() throws IOException;
 
-       abstract public List<Comment> getComments(Story story) throws IOException;
+       /**
+        * Fetch the full article content as well as all the comments associated to
+        * this {@link Story}, if any (can be empty, but not NULL).
+        * 
+        * @param story
+        *            the story to fetch the comments of
+        * 
+        * @throws IOException
+        *             in case of I/O error
+        */
+       abstract public void fetch(Story story) throws IOException;
 
        abstract public String getDescription();
 
@@ -56,6 +65,9 @@ public abstract class BasicSupport {
                        case PIPEDOT:
                                support = new Pipedot();
                                break;
+                       case LWN:
+                               support = new LWN();
+                               break;
                        }
 
                        if (support != null) {