Examples of IGuid


Examples of org.rssowl.core.persist.IGuid

    IFeed feed = fFactory.createFeed(null, new URI("feed"));
    INews news1 = fFactory.createNews(null, feed, new Date());

    assertNull(CoreUtils.getLink(news1));

    IGuid guid = fFactory.createGuid(news1, "www.guid.de", false);
    news1.setGuid(guid);
    assertEquals("http://www.guid.de", CoreUtils.getLink(news1));

    news1.setLink(new URI("www.link.de"));
    assertEquals("http://www.link.de", CoreUtils.getLink(news1));
View Full Code Here

Examples of org.rssowl.core.persist.IGuid

    String link = news.getLinkAsText();
    if (StringUtils.isSet(link))
      return link;

    /* Fallback to Guid if available */
    IGuid guid = news.getGuid();
    if (guid != null) {
      String value = guid.getValue();
      if (URIUtils.looksLikeLink(value))
        return value;
    }

    return null;
View Full Code Here

Examples of org.rssowl.core.persist.IGuid

    news1.setLink(new URI("http://www.rssowl.org/new"));

    assertFalse(news1.isEquivalent(news2));
    assertFalse(news2.isEquivalent(news1));

    IGuid guid1 = fFactory.createGuid(news1, "http://www.guid.org/", true);
    news1.setGuid(guid1);

    IGuid guid2 = fFactory.createGuid(news2, "http://www.guid.org/", true);
    news2.setGuid(guid2);

    assertTrue(news1.isEquivalent(news2));
    assertTrue(news2.isEquivalent(news1));
View Full Code Here

Examples of org.rssowl.core.persist.IGuid

  private List<INews> copyWithoutDuplicatesSynced(List<INews> newsList) {
    Set<String> guids= new HashSet<String>(newsList.size());
    List<INews> newsListCopy = new ArrayList<INews>(newsList.size());
    for (INews news : newsList) {
      IGuid guid = news.getGuid();
      if (guid == null)
        continue; //Can not happen for a synchronized feed

      if (!guids.contains(guid.getValue())) {
        guids.add(guid.getValue());
        newsListCopy.add(news);
      }
    }

    return newsListCopy;
View Full Code Here

Examples of org.rssowl.core.persist.IGuid

        processNamespaceAttributes(child, news);
      }

      /* Id */
      else if ("id".equals(name)) { //$NON-NLS-1$
        IGuid guid = Owl.getModelFactory().createGuid(news, child.getText(), null);

        processNamespaceAttributes(child, guid);
      }

      /* Link */
 
View Full Code Here

Examples of org.rssowl.core.persist.IGuid

    /* Test Outgoing Sync */
    SyncService service = new SyncService();
    assertTrue(service.getStatus() == null);

    IGuid marker = feed.getNews().get(0).getGuid();
    SyncItem item = SyncItem.toSyncItem(feed.getNews().get(0));
    item.addLabel(label.getName());

    service.testSync(Collections.singleton(item));

    assertNotNull(service.getStatus());
    SyncStatus status = service.getStatus();
    assertEquals(1, status.getItemCount());
    assertEquals(1, status.getTotalItemCount());

    Controller.getDefault().reload(bm, null, null);

    assertNotNull(feed.getTitle());
    assertNotNull(feed.getPublishDate());
    assertFalse(feed.getNews().isEmpty());

    boolean labelFound = false;
    Outer: for (INews news : feed.getNews()) {
      if (news.getGuid().getValue().equals(marker.getValue())) {
        Set<ILabel> labels = news.getLabels();
        for (ILabel newsLabel : labels) {
          if (newsLabel.getName().equals(label.getName())) {
            assertTrue(newsLabel.equals(label));
            labelFound = true;
View Full Code Here

Examples of org.rssowl.core.persist.IGuid

      label.getColor();
      label.getName();
    }

    else if (type instanceof IGuid) {
      IGuid guid = (IGuid) type;
      guid.getValue();
    }

    else if (type instanceof ICloud) {
      ICloud cloud = (ICloud) type;
      cloud.getDomain();
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.