Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.IBookMark


    ITreeNode startingNode = getStartingNode(true);

    IFolder rootFolder = (IFolder) startingNode.getData();

    IFolder subRootFolder1 = rootFolder.getFolders().get(0);
    IBookMark subRoot1Mark1 = (IBookMark) subRootFolder1.getMarks().get(0);
    IBookMark subRoot1Mark2 = (IBookMark) subRootFolder1.getMarks().get(1);
    IFolder subRoot1Folder1 = subRootFolder1.getFolders().get(0);
    IBookMark subRoot11Mark1 = (IBookMark) subRoot1Folder1.getMarks().get(0);
    IFolder subRoot11Folder1 = subRoot1Folder1.getFolders().get(0);

    IFolder subRootFolder2 = rootFolder.getFolders().get(1);
    IBookMark subRoot2Mark1 = (IBookMark) subRootFolder2.getMarks().get(0);
    IFolder subRoot2Folder1 = subRootFolder2.getFolders().get(0);
    IFolder subRoot21Folder1 = subRoot2Folder1.getFolders().get(0);
    IBookMark subRoot211Mark1 = (IBookMark) subRoot21Folder1.getMarks().get(0);

    IFolder subRootFolder3 = rootFolder.getFolders().get(2);
    IFolder subRoot3Folder1 = subRootFolder3.getFolders().get(0);
    IBookMark subRoot31Mark1 = (IBookMark) subRoot3Folder1.getMarks().get(0);

    TreeTraversal t = new TreeTraversal(startingNode) {
      @Override
      public boolean select(ITreeNode node) {
        return true;
View Full Code Here


    ITreeNode startingNode = getStartingNode(true);

    IFolder rootFolder = (IFolder) startingNode.getData();

    IFolder subRootFolder1 = rootFolder.getFolders().get(0);
    IBookMark subRoot1Mark1 = (IBookMark) subRootFolder1.getMarks().get(0);
    IBookMark subRoot1Mark2 = (IBookMark) subRootFolder1.getMarks().get(1);
    IFolder subRoot1Folder1 = subRootFolder1.getFolders().get(0);
    IBookMark subRoot11Mark1 = (IBookMark) subRoot1Folder1.getMarks().get(0);

    IFolder subRootFolder2 = rootFolder.getFolders().get(1);
    IBookMark subRoot2Mark1 = (IBookMark) subRootFolder2.getMarks().get(0);
    IFolder subRoot2Folder1 = subRootFolder2.getFolders().get(0);
    IFolder subRoot21Folder1 = subRoot2Folder1.getFolders().get(0);
    IBookMark subRoot211Mark1 = (IBookMark) subRoot21Folder1.getMarks().get(0);

    IFolder subRootFolder3 = rootFolder.getFolders().get(2);
    IFolder subRoot3Folder1 = subRootFolder3.getFolders().get(0);
    IBookMark subRoot31Mark1 = (IBookMark) subRoot3Folder1.getMarks().get(0);

    TreeTraversal t = new TreeTraversal(startingNode) {
      @Override
      public boolean select(ITreeNode node) {
        return node.getData() instanceof IBookMark;
View Full Code Here

    ITreeNode startingNode = getStartingNode(false);

    IFolder rootFolder = ((IBookMark) startingNode.getData()).getParent().getParent().getParent().getParent();

    IFolder subRootFolder2 = rootFolder.getFolders().get(1);
    IBookMark subRoot2Mark1 = (IBookMark) subRootFolder2.getMarks().get(0);

    IFolder subRootFolder3 = rootFolder.getFolders().get(2);
    IFolder subRoot3Folder1 = subRootFolder3.getFolders().get(0);
    IBookMark subRoot31Mark1 = (IBookMark) subRoot3Folder1.getMarks().get(0);

    TreeTraversal t = new TreeTraversal(startingNode) {
      @Override
      public boolean select(ITreeNode node) {
        return true;
View Full Code Here

    ITreeNode startingNode = getStartingNode(false);

    IFolder rootFolder = ((IBookMark) startingNode.getData()).getParent().getParent().getParent().getParent();

    IFolder subRootFolder2 = rootFolder.getFolders().get(1);
    IBookMark subRoot2Mark1 = (IBookMark) subRootFolder2.getMarks().get(0);

    IFolder subRootFolder3 = rootFolder.getFolders().get(2);
    IFolder subRoot3Folder1 = subRootFolder3.getFolders().get(0);
    IBookMark subRoot31Mark1 = (IBookMark) subRoot3Folder1.getMarks().get(0);

    TreeTraversal t = new TreeTraversal(startingNode) {
      @Override
      public boolean select(ITreeNode node) {
        return node.getData() instanceof IBookMark;
View Full Code Here

    subRootFolder2.addFolder(subRoot2Folder1, null, false);

    IFolder subRoot21Folder1 = new Folder(null, subRoot2Folder1, "SubRoot21Folder1");
    subRoot2Folder1.addFolder(subRoot21Folder1, null, false);

    IBookMark subRoot211Mark1 = new BookMark(null, subRoot21Folder1, feed, "SubRoot211Mark1");
    subRoot21Folder1.addMark(subRoot211Mark1, null, false);

    /* Sub Root 3 */
    IFolder subRootFolder3 = new Folder(null, root, "SubRootFolder1");
    root.addFolder(subRootFolder3, null, false);
View Full Code Here

    else if (entity instanceof IPerson) {
      IPerson person = (IPerson) entity;
      modelEvent = new PersonEvent(person, root);
    }
    else if (entity instanceof IBookMark) {
      IBookMark mark = (IBookMark) entity;
      BookMarkEvent eventTemplate = (BookMarkEvent) template;
      IFolder oldParent = eventTemplate == null ? null : eventTemplate.getOldParent();
      modelEvent = new BookMarkEvent(mark, oldParent, root);
    }
    else if (entity instanceof ISearchMark) {
View Full Code Here

      DynamicDAO.addEntityListener(IFeed.class, feedListener);

      /* Save Feed since a IBookMark now doesn't contain a feed */
      DynamicDAO.save(feed);

      final IBookMark bookMark1 = fFactory.createBookMark(null, root, new FeedLinkReference(feed.getLink()), "Root BookMark");
      final IBookMark bookMark2 = fFactory.createBookMark(null, rootChild, new FeedLinkReference(feed.getLink()), "Root Child BookMark");
      final IBookMark bookMark3 = fFactory.createBookMark(null, rootChildChild1Child, new FeedLinkReference(feed.getLink()), "Root Child Child #1 BookMark");

      final boolean bookMarkEventsIssued[] = new boolean[3];

      bookMarkListener = new BookMarkAdapter() {
        @Override
        public void entitiesAdded(Set<BookMarkEvent> events) {
          for (BookMarkEvent event : events) {
            assertFalse("Expected this Event to be no Root Event", event.isRoot());

            IBookMark bookMark = event.getEntity();

            if ("Root BookMark".equals(bookMark.getName()))
              assertEquals("Root", bookMark.getParent().getName());
            else if ("Root Child BookMark".equals(bookMark.getName()))
              assertEquals("Root Child", bookMark.getParent().getName());
            else if ("Root Child Child #1 BookMark".equals(bookMark.getName()))
              assertEquals("Root Child Child #1 Child", bookMark.getParent().getName());

            if (bookMark.getName().equals(bookMark1.getName()))
              bookMarkEventsIssued[0] = true;

            else if (bookMark.getName().equals(bookMark2.getName()))
              bookMarkEventsIssued[1] = true;

            else if (bookMark.getName().equals(bookMark3.getName()))
              bookMarkEventsIssued[2] = true;
          }
        }
      };
      DynamicDAO.addEntityListener(IBookMark.class, bookMarkListener);
View Full Code Here

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

    for (Map.Entry<String, ?> property : properties.entrySet())
      bookmark.setProperty(property.getKey(), property.getValue());

    parent = DynamicDAO.getDAO(IFolderDAO.class).save(parent);

    /* Auto-Reload added BookMark */
    for (IMark mark : parent.getMarks()) {
View Full Code Here

   */
  @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

      }

      /* 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

TOP

Related Classes of org.rssowl.core.persist.IBookMark

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.