Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.INews.addLabel()


      ICategory news2cat1 = fFactory.createCategory(null, news2);
      news2cat1.setName("apple");
      ICategory news2cat2 = fFactory.createCategory(null, news2);
      news2cat2.setName("pasero");
      ILabel label2 = fFactory.createLabel(null, "todo");
      news2.addLabel(label2);
      IAttachment att1news2 = fFactory.createAttachment(null, news2);
      att1news2.setLink(new URI("http://www.attachment.com/att1news2.file"));
      att1news2.setType("bin/doc");
      IAttachment att2news2 = fFactory.createAttachment(null, news2);
      att2news2.setLink(new URI("http://www.attachment.com/att2news2.file"));
View Full Code Here


     */
    assertEquals("C News", ((INews) elements[0]).getTitle());
    assertEquals("B News", ((INews) elements[1]).getTitle());
    assertEquals("A News", ((INews) elements[2]).getTitle());

    news3.addLabel(label2);

    comp.setAscending(true);
    comp.sort(null, elements);

    /*
 
View Full Code Here

     */
    assertEquals("A News", ((INews) elements[0]).getTitle());
    assertEquals("B News", ((INews) elements[1]).getTitle());
    assertEquals("C News", ((INews) elements[2]).getTitle());

    news3.addLabel(label1);

    comp.sort(null, elements);

    /*
     * News 3: Label_1, Label_2 News 1: Label_1, Label_2 News 2: Label_1
View Full Code Here

     */
    assertEquals("C News", ((INews) elements[0]).getTitle());
    assertEquals("A News", ((INews) elements[1]).getTitle());
    assertEquals("B News", ((INews) elements[2]).getTitle());

    news3.addLabel(label3);

    comp.sort(null, elements);

    /*
     * News 3: Label_1, Label_2, Label_3 News 1: Label_1, Label_2 News 2:
View Full Code Here

    IFeed feed = Owl.getModelFactory().createFeed(null, new URI("feed"));
    INews news1 = Owl.getModelFactory().createNews(null, feed, new Date(0));
    news1.setTitle("A News");
    news1.setDescription("Foo Bar");
    news1.setFlagged(true);
    news1.addLabel(label);

    IPerson author = fFactory.createPerson(null, news1);
    author.setName("Benjamin Pasero");
    author.setEmail(new URI("foo@bar.de"));
    news1.setAuthor(author);
View Full Code Here

      if (sticky > i)
        news.setFlagged(true);

      if (label != null)
        news.addLabel(label);

      news.setPublishDate(new Date(from + (dateDif * i / total)));
    }

    return DynamicDAO.save(feed);
View Full Code Here

      INews news1 = createNews(feed, "Foo", "http://www.news.com/news1.html", State.READ);
      ICategory news1cat1 = fFactory.createCategory(null, news1);
      news1cat1.setName("apple");
      ILabel label1 = fFactory.createLabel(null, "work");
      news1.addLabel(label1);

      INews news2 = createNews(feed, " Bar", "http://www.news.com/news2.html", State.NEW);
      IPerson author2 = fFactory.createPerson(null, news2);
      author2.setName("Benjamin Pilazzi");
      ICategory news2cat1 = fFactory.createCategory(null, news2);
View Full Code Here

      ICategory news2cat1 = fFactory.createCategory(null, news2);
      news2cat1.setName("apple");
      ICategory news2cat2 = fFactory.createCategory(null, news2);
      news2cat2.setName("windows");
      ILabel label2 = fFactory.createLabel(null, "todo");
      news2.addLabel(label2);

      INews news3 = createNews(feed, "Foo Bar", "http://www.news.com/news3.html", State.NEW);
      IPerson author3 = fFactory.createPerson(null, news3);
      author3.setName("Benjamin Pasero");
      ICategory news3cat1 = fFactory.createCategory(null, news3);
View Full Code Here

      INews news1 = createNews(feed, "Foo", "http://www.news.com/news1.html", State.READ);
      ICategory news1cat1 = fFactory.createCategory(null, news1);
      news1cat1.setName("apple");
      ILabel label1 = fFactory.createLabel(null, "work");
      news1.addLabel(label1);

      INews news2 = createNews(feed, " Bar", "http://www.news.com/news2.html", State.NEW);
      IPerson author2 = fFactory.createPerson(null, news2);
      author2.setName("Benjamin Pilazzi");
      ICategory news2cat1 = fFactory.createCategory(null, news2);
View Full Code Here

      ICategory news2cat1 = fFactory.createCategory(null, news2);
      news2cat1.setName("apple");
      ICategory news2cat2 = fFactory.createCategory(null, news2);
      news2cat2.setName("windows");
      ILabel label2 = fFactory.createLabel(null, "todo");
      news2.addLabel(label2);

      INews news3 = createNews(feed, "Foo Bar", "http://www.news.com/news3.html", State.NEW);
      IPerson author3 = fFactory.createPerson(null, news3);
      author3.setName("Benjamin Pasero");
      ICategory news3cat1 = fFactory.createCategory(null, news3);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.