Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.ISearchMark.matchAllConditions()


      ISearchMark searchMark = (ISearchMark) mark;
      List<ISearchCondition> conditions = searchMark.getSearchConditions();

      element = new Element(Tag.SAVED_SEARCH.get(), RSSOWL_NS);
      element.setAttribute(Attributes.NAME.get(), name);
      element.setAttribute(Attributes.MATCH_ALL_CONDITIONS.get(), String.valueOf(searchMark.matchAllConditions()));
      element.setAttribute(Attributes.ID.get(), String.valueOf(mark.getId()), RSSOWL_NS);
      mapFolderToElement.get(mark.getParent()).addContent(element);

      for (ISearchCondition condition : conditions) {
        Element conditionElement = new Element(Tag.SEARCH_CONDITION.get(), RSSOWL_NS);
View Full Code Here


        List<SearchHit<NewsReference>> result = null;

        /* Inject into Saved Search */
        if (input instanceof ISearchMark) {
          ISearchMark searchMark = (ISearchMark) input;
          result = fSearch.searchNews(searchMark.getSearchConditions(), filterCondition, searchMark.matchAllConditions());
        }

        /* Location search for News Bin */
        else {
          INewsBin newsBin = (INewsBin) input;
View Full Code Here

    /* Perform Search */
    List<SearchHit<NewsReference>> result;
    if (fNewsMark != null && fNewsMark instanceof ISearchMark) { //Inject conditions into search conditions
      ISearchMark searchMark = (ISearchMark) fNewsMark;
      result = Owl.getPersistenceService().getModelSearch().searchNews(searchMark.getSearchConditions(), textCondition, searchMark.matchAllConditions());
    } else { //Use the provided conditions as is
      result = Owl.getPersistenceService().getModelSearch().searchNews(conditions, true);
    }

    Set<Long> resultSet = new HashSet<Long>(result.size());
View Full Code Here

    topControlsContainer.setLayout(LayoutUtils.createGridLayout(4, 5, 0));
    ((GridLayout) topControlsContainer.getLayout()).marginTop = 10;

    fMatchAllRadio = new Button(topControlsContainer, SWT.RADIO);
    fMatchAllRadio.setText(Messages.SearchMarkPropertyPage_MATCH_ALL);
    fMatchAllRadio.setSelection(mark.matchAllConditions());

    fMatchAnyRadio = new Button(topControlsContainer, SWT.RADIO);
    fMatchAnyRadio.setText(Messages.SearchMarkPropertyPage_MATCH_ANY);
    fMatchAnyRadio.setSelection(!mark.matchAllConditions());
View Full Code Here

    fMatchAllRadio.setText(Messages.SearchMarkPropertyPage_MATCH_ALL);
    fMatchAllRadio.setSelection(mark.matchAllConditions());

    fMatchAnyRadio = new Button(topControlsContainer, SWT.RADIO);
    fMatchAnyRadio.setText(Messages.SearchMarkPropertyPage_MATCH_ANY);
    fMatchAnyRadio.setSelection(!mark.matchAllConditions());

    /* Separator */
    Label sep = new Label(topControlsContainer, SWT.SEPARATOR | SWT.VERTICAL);
    sep.setLayoutData(new GridData(SWT.DEFAULT, 16));

View Full Code Here

      mark.setName(fNameInput.getText());
      entitiesToSave.add(mark);
    }

    /* Update match-all-condition */
    if (mark.matchAllConditions() != fMatchAllRadio.getSelection()) {
      mark.setMatchAllConditions(fMatchAllRadio.getSelection());
      entitiesToSave.add(mark);
      fSearchChanged = true;
    }

View Full Code Here

      ISearchMark searchMark = (ISearchMark) mark;
      List<ISearchCondition> conditions = searchMark.getSearchConditions();

      element = new Element(Tag.SAVED_SEARCH.get(), RSSOWL_NS);
      element.setAttribute(Attributes.NAME.get(), name);
      element.setAttribute(Attributes.MATCH_ALL_CONDITIONS.get(), String.valueOf(searchMark.matchAllConditions()));
      element.setAttribute(Attributes.ID.get(), String.valueOf(mark.getId()), RSSOWL_NS);
      mapFolderToElement.get(mark.getParent()).addContent(element);

      for (ISearchCondition condition : conditions) {
        Element conditionElement = new Element(Tag.SEARCH_CONDITION.get(), RSSOWL_NS);
View Full Code Here

     * TRUE
     */
    searchmark = searchmarks.get(7);
    conditions = searchmark.getSearchConditions();
    assertEquals(3, conditions.size());
    assertEquals(true, searchmark.matchAllConditions());

    for (ISearchCondition condition : conditions) {
      switch (condition.getField().getId()) {
        case IEntity.ALL_FIELDS:
          assertEquals(SearchSpecifier.CONTAINS, condition.getSpecifier());
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.