Package org.rssowl.core.model.types

Examples of org.rssowl.core.model.types.IFeed


   */
  @Test
  @SuppressWarnings("nls")
  public void testCDFNamespaces() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_cdf_namespaces.xml");
    IFeed feed = new Feed(new URL("http://www.data.interpreter.feed_cdf_namespaces.xml"));
    Interpreter.getDefault().interpret(inS, feed);

    assertEquals("custom_formatAttribute", feed.getProperty("custom_formatAttribute"));
    assertEquals("custom_titleAttribute", feed.getProperty("custom_titleAttribute"));

    assertEquals("item_leveld", feed.getProperty("item_leveld"));

    assertEquals(1, feed.getNews().size());
    INews news = feed.getNews().get(0);
    assertEquals("sub_item_leveld", news.getProperty("sub_item_leveld"));
    assertEquals("custom_itemAttribute", news.getProperty("custom_itemAttribute"));
    assertEquals("custom_titleAttribute", news.getProperty("custom_titleAttribute"));
  }
View Full Code Here


   */
  @Test
  @SuppressWarnings("nls")
  public void testRDFElements() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_rdf_elements.xml");
    IFeed feed = new Feed(new URL("http://www.data.interpreter.feed_rdf_elements.xml"));
    Interpreter.getDefault().interpret(inS, feed);

    assertEquals("channel_leveld", feed.getProperty("channel_leveld"));
    assertEquals("sub_channel_leveld", feed.getProperty("sub_channel_leveld"));

    assertNotNull(feed.getImage());
    assertEquals("sub_image_leveld", feed.getImage().getProperty("sub_image_leveld"));

    assertEquals(1, feed.getNews().size());
    INews news = feed.getNews().get(0);
    assertEquals("sub_item_leveld", news.getProperty("sub_item_leveld"));
  }
View Full Code Here

   */
  @Test
  @SuppressWarnings("nls")
  public void testRDFNamespaces() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_rdf_namespaces.xml");
    IFeed feed = new Feed(new URL("http://www.data.interpreter.feed_rdf_namespaces.xml"));
    Interpreter.getDefault().interpret(inS, feed);

    assertEquals("custom_formatAttribute", feed.getProperty("custom_formatAttribute"));
    assertEquals("custom_channelAttribute", feed.getProperty("custom_channelAttribute"));
    assertEquals("custom_titleAttribute", feed.getProperty("custom_titleAttribute"));

    assertEquals("channel_leveld", feed.getProperty("channel_leveld"));
    assertEquals("sub_channel_leveld", feed.getProperty("sub_channel_leveld"));

    assertNotNull(feed.getImage());
    assertEquals("sub_image_leveld", feed.getImage().getProperty("sub_image_leveld"));
    assertEquals("custom_imageAttribute", feed.getImage().getProperty("custom_imageAttribute"));
    assertEquals("custom_imageUrlAttribute", feed.getImage().getProperty("custom_imageUrlAttribute"));

    assertEquals(1, feed.getNews().size());
    INews news = feed.getNews().get(0);
    assertEquals("sub_item_leveld", news.getProperty("sub_item_leveld"));
    assertEquals("custom_itemAttribute", news.getProperty("custom_itemAttribute"));
    assertEquals("custom_titleAttribute", news.getProperty("custom_titleAttribute"));
  }
View Full Code Here

  @Test
  @SuppressWarnings("nls")
  public void testSearchUnreadNewUpdatedNews() throws Exception {
    try {
      /* First add some Types */
      IFeed feed = fTypesFactory.createFeed(null, new URL("http://www.feed.com/feed.xml"));

      INews news1 = fTypesFactory.createNews(null, feed, new Date(System.currentTimeMillis()));
      news1.setState(State.READ);
      news1.setLink(new URI("http://www.news.com/news1.html"));

View Full Code Here

  public void testSearchNewsByState() throws Exception {
    try {
      List<ISearchCondition> conditions = new ArrayList<ISearchCondition>();

      /* First add some Types */
      IFeed feed = fTypesFactory.createFeed(null, new URL("http://www.feed.com/feed.xml"));

      INews news1 = fTypesFactory.createNews(null, feed, new Date(System.currentTimeMillis()));
      news1.setState(State.READ);
      news1.setLink(new URI("http://www.news.com/news1.html"));

View Full Code Here

  public void testSearchNews1() throws Exception {
    try {
      List<ISearchCondition> conditions = new ArrayList<ISearchCondition>();

      /* First add some Types */
      IFeed feed = fTypesFactory.createFeed(null, new URL("http://www.feed.com/feed.xml"));

      INews news1 = fTypesFactory.createNews(null, feed, new Date(System.currentTimeMillis()));
      news1.setState(State.READ);
      news1.setLink(new URI("http://www.news.com/news1.html"));

View Full Code Here

  public void testSearchNews2() throws Exception {
    try {
      List<ISearchCondition> conditions = new ArrayList<ISearchCondition>();

      /* First add some Types */
      IFeed feed1 = fTypesFactory.createFeed(null, new URL("http://www.feed.com/feed1.xml"));
      IFeed feed2 = fTypesFactory.createFeed(null, new URL("http://www.feed.com/feed2.xml"));

      INews news1 = fTypesFactory.createNews(null, feed1, new Date(System.currentTimeMillis()));
      news1.setDescription("News #1 Description");
      news1.setLink(new URI("http://www.news.com/news1.html"));

View Full Code Here

  public void testSearchNews3() throws Exception {
    try {
      List<ISearchCondition> conditions = new ArrayList<ISearchCondition>();

      /* First add some Types */
      IFeed feed = fTypesFactory.createFeed(null, new URL("http://www.feed.com/feed.xml"));

      INews news1 = fTypesFactory.createNews(null, feed, new Date(System.currentTimeMillis()));
      news1.setLink(new URI("http://www.news.com/news1.html"));

      INews news2 = fTypesFactory.createNews(null, feed, new Date(System.currentTimeMillis()));
View Full Code Here

   */
  @Test
  @SuppressWarnings("nls")
  public void testBugzilla() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_bugzilla.xml");
    IFeed feed = new Feed(new URL("http://www.data.interpreter.feed_bugzilla.xml"));
    Interpreter.getDefault().interpret(inS, feed);

    assertEquals("Bugzilla 2.20", feed.getFormat());
    assertEquals(new URI("http://dev.rssowl.org/"), feed.getBase());
    assertEquals("bugzilla_short_description", feed.getTitle());
    assertEquals(new URI("http://dev.rssowl.org/show_bug.cgi?id=10"), feed.getHomepage());
    assertEquals(new URI("bugzilla_reporter@mail.xx"), feed.getAuthor().getEmail());

    assertEquals(3, feed.getNews().size());
    INews news = feed.getNews().get(0);
    assertEquals(new URI("http://dev.rssowl.org/show_bug.cgi?id=10"), news.getLink());
    assertEquals("Comment from bugzilla_who", news.getTitle());
    assertEquals("bugzilla_thetext", news.getDescription());
    assertEquals(DateUtils.parseDate("2006-01-12 22:29"), news.getModifiedDate());

View Full Code Here

  @SuppressWarnings("null")
  @Test
  public void testEntityPropertyPage() throws Exception {
    ILabel entity1 = NewsModel.getDefault().getTypesFactory().createLabel(null, "Label1");
    ILabel entity2 = NewsModel.getDefault().getTypesFactory().createLabel(null, "Label2");
    IFeed entity3 = NewsModel.getDefault().getTypesFactory().createFeed(null, new URL("http://www.link.com"));

    /* Case 1: Single Selection */
    {
      List<IEntity> entities = new ArrayList<IEntity>();
      entities.add(entity1);
View Full Code Here

TOP

Related Classes of org.rssowl.core.model.types.IFeed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.