Examples of IModelFactory


Examples of org.rssowl.core.persist.IModelFactory

      }
    });
  }

  private ISearchCondition createCondition(ISearchCondition current) {
    IModelFactory factory = Owl.getModelFactory();
    ISearchField field = factory.createSearchField(current.getField().getId(), current.getField().getEntityName());
    return factory.createSearchCondition(field, current.getSpecifier(), "");
  }
View Full Code Here

Examples of org.rssowl.core.persist.IModelFactory

    }
  }

  private List<ISearchCondition> getDefaultConditions() {
    List<ISearchCondition> conditions = new ArrayList<ISearchCondition>(1);
    IModelFactory factory = Owl.getModelFactory();

    ISearchField field = factory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
    ISearchCondition condition = factory.createSearchCondition(field, SearchSpecifier.CONTAINS, "");
    conditions.add(condition);

    return conditions;
  }
View Full Code Here

Examples of org.rssowl.core.persist.IModelFactory

    return DATE_COL_WIDTH;
  }

  private List<ISearchCondition> getDefaultConditions() {
    List<ISearchCondition> conditions = new ArrayList<ISearchCondition>(1);
    IModelFactory factory = Owl.getModelFactory();

    ISearchField field = factory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
    ISearchCondition condition = factory.createSearchCondition(field, SearchSpecifier.CONTAINS, "");

    conditions.add(condition);

    return conditions;
  }
View Full Code Here

Examples of org.rssowl.core.persist.IModelFactory

    /* Update Size */
    updateSize();
  }

  private ISearchCondition getDefaultCondition() {
    IModelFactory factory = Owl.getModelFactory();

    ISearchField field = factory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
    ISearchCondition condition = factory.createSearchCondition(field, SearchSpecifier.CONTAINS, "");

    return condition;
  }
View Full Code Here

Examples of org.rssowl.core.persist.IModelFactory

    return item;
  }

  private void createConditionMenu(Menu menu, SearchConditionItem item) {
    IModelFactory factory = Owl.getModelFactory();
    String news = INews.class.getName();

    MenuItem mItem = new MenuItem(menu, SWT.PUSH);
    mItem.setText("Entire News");
    hookSelectionListener(mItem, item, factory.createSearchField(IEntity.ALL_FIELDS, news));

    mItem = new MenuItem(menu, SWT.SEPARATOR);

    mItem = new MenuItem(menu, SWT.PUSH);
    mItem.setText("State");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.STATE, news));

    mItem = new MenuItem(menu, SWT.PUSH);
    mItem.setText("Location");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.LOCATION, news));

    new MenuItem(menu, SWT.SEPARATOR);

    mItem = new MenuItem(menu, SWT.PUSH);
    mItem.setText("Title");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.TITLE, news));

    mItem = new MenuItem(menu, SWT.PUSH);
    mItem.setText("Description");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.DESCRIPTION, news));

    mItem = new MenuItem(menu, SWT.PUSH);
    mItem.setText("Author");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.AUTHOR, news));

    mItem = new MenuItem(menu, SWT.PUSH);
    mItem.setText("Category");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.CATEGORIES, news));

    mItem = new MenuItem(menu, SWT.CASCADE);
    mItem.setText("Date");

    Menu dateMenu = new Menu(mItem);
    mItem.setMenu(dateMenu);

    mItem = new MenuItem(dateMenu, SWT.PUSH);
    mItem.setText("Date Modified");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.MODIFIED_DATE, news));

    mItem = new MenuItem(dateMenu, SWT.PUSH);
    mItem.setText("Date Published");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.PUBLISH_DATE, news));

    mItem = new MenuItem(dateMenu, SWT.PUSH);
    mItem.setText("Date Received");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.RECEIVE_DATE, news));

    new MenuItem(dateMenu, SWT.SEPARATOR);

    mItem = new MenuItem(dateMenu, SWT.PUSH);
    mItem.setText("Age in Days");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.AGE_IN_DAYS, news));

    mItem = new MenuItem(menu, SWT.SEPARATOR);

    mItem = new MenuItem(menu, SWT.CASCADE);
    mItem.setText("Other");

    Menu otherMenu = new Menu(mItem);
    mItem.setMenu(otherMenu);

    mItem = new MenuItem(otherMenu, SWT.PUSH);
    mItem.setText("Has Attachments");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.HAS_ATTACHMENTS, news));

    mItem = new MenuItem(otherMenu, SWT.PUSH);
    mItem.setText("Attachment");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.ATTACHMENTS_CONTENT, news));

    new MenuItem(otherMenu, SWT.SEPARATOR);

    mItem = new MenuItem(otherMenu, SWT.PUSH);
    mItem.setText("Source");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.SOURCE, news));

    mItem = new MenuItem(otherMenu, SWT.PUSH);
    mItem.setText("Link");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.LINK, news));

    mItem = new MenuItem(otherMenu, SWT.PUSH);
    mItem.setText("Is Sticky");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.IS_FLAGGED, news));

    mItem = new MenuItem(otherMenu, SWT.PUSH);
    mItem.setText("Feed");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.FEED, news));

    mItem = new MenuItem(otherMenu, SWT.PUSH);
    mItem.setText("Label");
    hookSelectionListener(mItem, item, factory.createSearchField(INews.LABEL, news));
  }
View Full Code Here

Examples of org.rssowl.core.persist.IModelFactory

      }
    });
  }

  private ISearchCondition createCondition(ISearchCondition current) {
    IModelFactory factory = Owl.getModelFactory();
    ISearchField field = factory.createSearchField(current.getField().getId(), current.getField().getEntityName());
    return factory.createSearchCondition(field, current.getSpecifier(), "");
  }
View Full Code Here

Examples of org.rssowl.core.persist.IModelFactory

          else {
            searchConds.add(searchCond);
          }
        }
        if (!states.isEmpty()) {
          IModelFactory factory = InternalOwl.getDefault().getModelFactory();
          org.rssowl.core.persist.ISearchField field = factory.createSearchField(INews.STATE, org.rssowl.core.persist.INews.class.getName());
          searchConds.add(factory.createSearchCondition(field, org.rssowl.core.persist.SearchSpecifier.IS, states));
          MigrationHelper.setField(mark, "fSearchConditions", searchConds);
        }
      }

      marks.add(mark);
View Full Code Here

Examples of org.rssowl.core.persist.IModelFactory

    return container;
  }

  private List<ISearchCondition> getDefaultConditions() {
    List<ISearchCondition> conditions = new ArrayList<ISearchCondition>(1);
    IModelFactory factory = Owl.getModelFactory();

    ISearchField field = factory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
    ISearchCondition condition = factory.createSearchCondition(field, SearchSpecifier.CONTAINS, "");
    conditions.add(condition);

    return conditions;
  }
View Full Code Here

Examples of org.rssowl.core.persist.IModelFactory

   * @see org.eclipse.jface.wizard.Wizard#performFinish()
   */
  @Override
  public boolean performFinish() {
    String name = fPage.getFolderName();
    IModelFactory factory = Owl.getModelFactory();

    /* Require Name */
    if (!StringUtils.isSet(name)) {
      fPage.setErrorMessage("Please enter a name for the folder");
      fPage.focusInput();
      return false;
    }

    /* Get the parent Folder */
    IFolder parent = fPage.getFolder();

    /* Create the Folder */
    IFolder folder = factory.createFolder(null, parent, name);

    /* Copy all Properties from Parent into this Mark */
    if (parent != null) {
      Map<String, ?> properties = parent.getProperties();
      for (Map.Entry<String, ?> property : properties.entrySet())
View Full Code Here

Examples of org.rssowl.core.persist.IModelFactory

    /* Copy Feeds of corpus_10-03-07 to temp location */
    copyFeedFilesToTempLocation(corpus1Folder, feedFolder);

    /* Create Filter */
    {
      IModelFactory factory = Owl.getModelFactory();
      ISearch search = factory.createSearch(null);
      search.setMatchAllConditions(false);
      ISearchField field = factory.createSearchField(IEntity.ALL_FIELDS, INews.class.getName());
      search.addSearchCondition(factory.createSearchCondition(field, SearchSpecifier.CONTAINS_ALL, "foo bar president"));

      field = factory.createSearchField(INews.AUTHOR, INews.class.getName());
      search.addSearchCondition(factory.createSearchCondition(field, SearchSpecifier.IS, "foobar"));

      field = factory.createSearchField(INews.TITLE, INews.class.getName());
      search.addSearchCondition(factory.createSearchCondition(field, SearchSpecifier.IS, "anything"));

      ISearchFilter filter = factory.createSearchFilter(null, search, "Filter 1");
      filter.setEnabled(true);
      filter.setOrder(0);

      filter.addAction(factory.createFilterAction("org.rssowl.core.StopFilterAction"));

      DynamicDAO.save(filter);
    }

    List<ITask> tasks = getRealWorldReloadTasks(feedFolder.getAbsolutePath());
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.