Package org.rssowl.core.persist

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


    ILabel label3 = new Label(null, "Label3");

    IFeed feed = new Feed(new URI("http://www.link.com"));
    INews news1 = new News(null, feed, new Date());
    news1.addLabel(label1);
    news1.addLabel(label3);

    INews news2 = new News(null, feed, new Date());
    news2.addLabel(label1);

    INews news3 = new News(null, feed, new Date());
View Full Code Here


    INews news1 = new News(null, feed, new Date());
    news1.addLabel(label1);
    news1.addLabel(label3);

    INews news2 = new News(null, feed, new Date());
    news2.addLabel(label1);

    INews news3 = new News(null, feed, new Date());
    news3.setPublishDate(new Date(System.currentTimeMillis() + 1000));
    news3.addLabel(label1);
    news3.addLabel(label2);
View Full Code Here

    INews news2 = new News(null, feed, new Date());
    news2.addLabel(label1);

    INews news3 = new News(null, feed, new Date());
    news3.setPublishDate(new Date(System.currentTimeMillis() + 1000));
    news3.addLabel(label1);
    news3.addLabel(label2);

    INews news4 = new News(null, feed, new Date());

    feed.addNews(news1);
View Full Code Here

    news2.addLabel(label1);

    INews news3 = new News(null, feed, new Date());
    news3.setPublishDate(new Date(System.currentTimeMillis() + 1000));
    news3.addLabel(label1);
    news3.addLabel(label2);

    INews news4 = new News(null, feed, new Date());

    feed.addNews(news1);
    feed.addNews(news2);
View Full Code Here

    INews news3 = fFactory.createNews(null, feed, new Date());

    news1.addLabel(label1);
    news1.addLabel(label2);
    news2.addLabel(label1);
    news3.addLabel(label2);

    Set<ILabel> labels = ModelUtils.getLabelsForAll(new StructuredSelection(news1));
    assertEquals(2, labels.size());

    labels = ModelUtils.getLabelsForAll(new StructuredSelection(new Object[] { news1, news2 }));
View Full Code Here

    assertFalse(item.isStarred());
    assertTrue(item.isUnStarred());
    assertTrue(item.getAddedLabels().isEmpty());
    assertTrue(item.getRemovedLabels().isEmpty());

    currentNews.addLabel(label1);
    currentNews.addLabel(label2);
    item = SyncItem.toSyncItem(new NewsEvent(oldNews, currentNews, true));
    assertFalse(item.isMarkedRead());
    assertTrue(item.isMarkedUnread());
    assertFalse(item.isStarred());
View Full Code Here

    assertTrue(item.isUnStarred());
    assertTrue(item.getAddedLabels().isEmpty());
    assertTrue(item.getRemovedLabels().isEmpty());

    currentNews.addLabel(label1);
    currentNews.addLabel(label2);
    item = SyncItem.toSyncItem(new NewsEvent(oldNews, currentNews, true));
    assertFalse(item.isMarkedRead());
    assertTrue(item.isMarkedUnread());
    assertFalse(item.isStarred());
    assertTrue(item.isUnStarred());
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);
      IAttachment att1news1 = fFactory.createAttachment(null, news1);
      att1news1.setLink(new URI("http://www.attachment.com/att1news1.file"));
      att1news1.setType("bin/mp3");

      INews news2 = createNews(feed, " Bar", "http://www.news.com/news2.html", State.NEW);
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);
      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

      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);
      IAttachment att1news1 = fFactory.createAttachment(null, news1);
      att1news1.setLink(new URI("http://www.attachment.com/att1news1.file"));
      att1news1.setType("bin/mp3");

      INews news2 = createNews(feed, " Bar", "http://www.news.com/news2.html", State.NEW);
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.