Package org.rssowl.core.internal.persist

Examples of org.rssowl.core.internal.persist.Feed


   */
  @Test
  @SuppressWarnings("nls")
  public void testRSSElements() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_rss_elements.xml");
    IFeed feed = new Feed(new URI("http://www.data.interpreter.feed_rss_elements.xml"));
    Owl.getInterpreter().interpret(inS, feed, null);

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

    assertNotNull(feed.getImage());

    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 testRSSNamespaces() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_rss_namespaces.xml");
    IFeed feed = new Feed(new URI("http://www.data.interpreter.feed_rss_namespaces.xml"));
    Owl.getInterpreter().interpret(inS, feed, null);

    assertEquals("custom_formatAttribute", feed.getProperty("custom_formatAttribute"));
    assertEquals("custom_channelAttribute", feed.getProperty("custom_channelAttribute"));
    assertEquals("sub_channel_leveld", feed.getProperty("sub_channel_leveld"));
    assertEquals("custom_skipHoursAttribute", feed.getProperty("custom_skipHoursAttribute"));
    assertEquals("custom_skipDaysAttribute", feed.getProperty("custom_skipDaysAttribute"));

    assertEquals(1, feed.getCategories().size());
    assertEquals("custom_categoryAttribute", feed.getCategories().get(0).getProperty("custom_categoryAttribute"));

    assertNotNull(feed.getImage());

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

    assertNotNull(news.getSource());
View Full Code Here

   */
  @Test
  @SuppressWarnings("nls")
  public void testAtomElements() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_atom_elements.xml");
    IFeed feed = new Feed(new URI("http://www.data.interpreter.feed_atom_elements.xml"));
    Owl.getInterpreter().interpret(inS, feed, null);

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

    assertNotNull(feed.getAuthor());
    assertEquals("sub_author_leveld", feed.getAuthor().getProperty("sub_author_leveld"));

    assertEquals(1, feed.getNews().size());
    INews news = feed.getNews().get(0);
    assertEquals("sub_entry_leveld", news.getProperty("sub_entry_leveld"));

    assertNotNull(news.getSource());

    assertNotNull(news.getAuthor());
View Full Code Here

   */
  @Test
  @SuppressWarnings("nls")
  public void testAtomNamespaces() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_atom_namespaces.xml");
    IFeed feed = new Feed(new URI("http://www.data.interpreter.feed_atom_namespaces.xml"));
    Owl.getInterpreter().interpret(inS, feed, null);

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

    assertEquals(1, feed.getCategories().size());
    assertEquals("custom_categoryAttribute", feed.getCategories().get(0).getProperty("custom_categoryAttribute"));

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

    assertNotNull(feed.getAuthor());
    assertEquals("sub_author_leveld", feed.getAuthor().getProperty("sub_author_leveld"));
    assertEquals("custom_authorAttribute", feed.getAuthor().getProperty("custom_authorAttribute"));
    assertEquals("custom_nameAttribute", feed.getAuthor().getProperty("custom_nameAttribute"));

    assertEquals(1, feed.getNews().size());
    INews news = feed.getNews().get(0);
    assertEquals("sub_entry_leveld", news.getProperty("sub_entry_leveld"));
    assertEquals("custom_entryAttribute", news.getProperty("custom_entryAttribute"));
    assertEquals("custom_titleAttribute", news.getProperty("custom_titleAttribute"));
    assertEquals("custom_linkAttribute", news.getProperty("custom_linkAttribute"));

View Full Code Here

   */
  @Test
  @SuppressWarnings("nls")
  public void testOPMLElements() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_opml_elements.xml");
    IFeed feed = new Feed(new URI("http://www.data.interpreter.feed_opml_elements.xml"));
    Owl.getInterpreter().interpret(inS, feed, null);

    assertEquals("head_leveld", feed.getProperty("head_leveld"));
    assertEquals("sub_head_leveld", feed.getProperty("sub_head_leveld"));
    assertEquals("outline_leveld", feed.getProperty("outline_leveld"));
  }
View Full Code Here

   */
  @Test
  @SuppressWarnings("nls")
  public void testOPMLNamespaces() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_opml_namespaces.xml");
    IFeed feed = new Feed(new URI("http://www.data.interpreter.feed_opml_namespaces.xml"));
    Owl.getInterpreter().interpret(inS, feed, null);

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

    assertEquals("head_leveld", feed.getProperty("head_leveld"));
    assertEquals("sub_head_leveld", feed.getProperty("sub_head_leveld"));
    assertEquals("outline_leveld", feed.getProperty("outline_leveld"));

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

   */
  @Test
  @SuppressWarnings("nls")
  public void testCDFElements() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_cdf_elements.xml");
    IFeed feed = new Feed(new URI("http://www.data.interpreter.feed_cdf_elements.xml"));
    Owl.getInterpreter().interpret(inS, feed, null);

    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"));
  }
View Full Code Here

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

    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 URI("http://www.data.interpreter.feed_rdf_elements.xml"));
    Owl.getInterpreter().interpret(inS, feed, null);

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

    assertNotNull(feed.getImage());

    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 URI("http://www.data.interpreter.feed_rdf_namespaces.xml"));
    Owl.getInterpreter().interpret(inS, feed, null);

    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(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

TOP

Related Classes of org.rssowl.core.internal.persist.Feed

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.