1 25 26 package org.snipsnap.semanticweb.rss; 27 28 import org.snipsnap.snip.Blog; 29 import org.snipsnap.snip.SnipSpaceFactory; 30 import org.snipsnap.snip.Snip; 31 import org.snipsnap.feeder.Feeder; 32 33 import java.util.List ; 34 35 43 44 public class BlogFeeder implements Feeder { 45 private Blog blog; 46 47 public BlogFeeder() { 48 blog = SnipSpaceFactory.getInstance().getBlog(); 49 } 50 51 public BlogFeeder(String blogName) { 52 blog = SnipSpaceFactory.getInstance().getBlog(blogName); 53 } 54 55 public String getName() { 56 return "blog"; 57 } 58 59 public List getFeed() { 60 return blog.getFlatPosts(); 61 }; 62 63 public Snip getContextSnip() { 64 return blog.getSnip(); 65 } 66 } 67 | Popular Tags |