Package org.rssowl.core.persist.reference

Examples of org.rssowl.core.persist.reference.FeedLinkReference


    for (int i = 0; i < 5; i++)
      OwlUI.deleteImage(i);

    IFeed feed = new Feed(new URI("http://www.rssowl.org/node/feed"));
    IFolder root = new Folder(null, null, "Root");
    IBookMark bookmark = new BookMark(null, root, new FeedLinkReference(feed.getLink()), "Bookmark");
    root.addMark(bookmark, null, false);

    feed = DynamicDAO.save(feed);
    DynamicDAO.save(root);
View Full Code Here


  }

  private void onNewsAdded(Set<NewsEvent> events) {
    for (NewsEvent event : events) {
      INews news = event.getEntity();
      FeedLinkReference feedRef = news.getFeedReference();

      synchronized (this) {
        NewsCounterItem counter = getFromCounter(feedRef);

        /* Create Counter if not yet done */
 
View Full Code Here

  private void onNewsUpdated(Set<NewsEvent> events) {
    for (NewsEvent event : events) {
      INews currentNews = event.getEntity();
      INews oldNews = event.getOldNews();
      Assert.isNotNull(oldNews, "oldNews cannot be null on newsUpdated");
      FeedLinkReference feedRef = currentNews.getFeedReference();

      boolean oldStateUnread = ModelUtils.isUnread(oldNews.getState());
      boolean currentStateUnread = ModelUtils.isUnread(currentNews.getState());

      boolean oldStateNew = INews.State.NEW.equals(oldNews.getState());
View Full Code Here

   * @see org.rssowl.core.model.types.IBookMark#getFeedLinkReference()
   */
  public FeedLinkReference getFeedLinkReference() {
    if (fFeedLinkReference == null) {
      try {
        fFeedLinkReference = new FeedLinkReference(new URI(fFeedLink));
      } catch (URISyntaxException e) {
        throw new IllegalStateException("Malformed URI was stored somehow: " + fFeedLink); //$NON-NLS-1$
      }
    }
    return fFeedLinkReference;
View Full Code Here

    assertEquals(null, t.nextNode());
  }

  private ITreeNode getStartingNode(boolean beginFromRoot) throws URISyntaxException {
    IFolder root = new Folder(null, null, "Root");
    FeedLinkReference feed = new FeedLinkReference(new URI("http://www.link.com"));

    /* Sub Root 1 */
    IFolder subRootFolder1 = new Folder(null, root, "SubRootFolder1");
    root.addFolder(subRootFolder1, null, false);

View Full Code Here

   * @see org.rssowl.core.model.types.INews#getFeed()
   */
  public synchronized FeedLinkReference getFeedReference() {
    if (fFeedLinkReference == null) {
      try {
        fFeedLinkReference = new FeedLinkReference(new URI(fFeedLink));
      } catch (URISyntaxException e) {
        throw new IllegalStateException("A Malformed URI was stored somehow", e); //$NON-NLS-1$
      }
    }
    return fFeedLinkReference;
View Full Code Here

      IFeed feed = factory.createFeed(null, uriObj);
      feed = DynamicDAO.getDAO(IFeedDAO.class).save(feed);
    }

    /* Create the BookMark */
    FeedLinkReference feedLinkRef = new FeedLinkReference(uriObj);
    IBookMark bookmark = factory.createBookMark(null, parent, feedLinkRef, name);

    /* Copy all Properties from Parent into this Mark */
    Map<String, ?> properties = parent.getProperties();

View Full Code Here

   * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.Object)
   */
  @Override
  public String getToolTipText(Object element) {
    INews news = (INews) element;
    FeedLinkReference feedRef = news.getFeedReference();
    IBookMark bookMark = Controller.getDefault().getCacheService().getBookMark(feedRef);
    if (bookMark != null)
      return bookMark.getName();

    return null;
View Full Code Here

          return fNewsReadIcon;
      }

      /* Feed Column */
      else if (columnIndex == NewsTableControl.COL_FEED && !(fViewer.getInput() instanceof FeedLinkReference)) {
        FeedLinkReference feedRef = news.getFeedReference();
        IBookMark bookMark = Controller.getDefault().getCacheService().getBookMark(feedRef);
        if (bookMark != null) {
          ImageDescriptor favicon = OwlUI.getFavicon(bookMark);
          return OwlUI.getImage(fResources, favicon != null ? favicon : OwlUI.BOOKMARK);
        }
View Full Code Here

          feed.setDescription(description);
          feed = DynamicDAO.save(feed);
        }

        /* Create the BookMark */
        type = Owl.getModelFactory().createBookMark(null, (IFolder) parent, new FeedLinkReference(uri), title != null ? title : link);
      }
    }

    /* In case this Outline Element did not represent a Category */
    if (type == null || type instanceof IBookMark)
View Full Code Here

TOP

Related Classes of org.rssowl.core.persist.reference.FeedLinkReference

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.