Package org.rssowl.core.persist

Examples of org.rssowl.core.persist.SearchSpecifier


    List<ISearchField> fields = new ArrayList<ISearchField>();
    fields.add(categoryField);
    fields.add(authorField);

    for (ISearchField field : fields) {
      SearchSpecifier specifier = (field == authorField) ? SearchSpecifier.CONTAINS_ALL : SearchSpecifier.IS;

      ISearchCondition condition = fFactory.createSearchCondition(field, specifier, "bpasero@bpasero.de");
      List<SearchHit<NewsReference>> result = fModelSearch.searchNews(list(condition), false);
      assertSame("Field: " + field.getName() + ", Specifier: " + specifier, result, news1);
View Full Code Here


    List<ISearchField> fields = new ArrayList<ISearchField>();
    fields.add(categoryField);
    fields.add(authorField);

    for (ISearchField field : fields) {
      SearchSpecifier specifier = (field == authorField) ? SearchSpecifier.CONTAINS_ALL : SearchSpecifier.IS;

      ISearchCondition condition = fFactory.createSearchCondition(field, specifier, "[Foobar]");
      List<SearchHit<NewsReference>> result = fModelSearch.searchNews(list(condition), false);
      assertSame("Field: " + field.getName() + ", Specifier: " + specifier, result, news1);
View Full Code Here

    List<ISearchField> fields = new ArrayList<ISearchField>();
    fields.add(categoryField);

    for (ISearchField field : fields) {
      SearchSpecifier specifier = (field == categoryField ? SearchSpecifier.IS : SearchSpecifier.CONTAINS_ALL);

      ISearchCondition condition = fFactory.createSearchCondition(field, specifier, "Benjamin Wilhelm-Tello");
      List<SearchHit<NewsReference>> result = fModelSearch.searchNews(list(condition), false);
      assertSame(result, news);
View Full Code Here

    /* Filter Bogus Conditions if requiered */
    if (filterEmpty && (fInputValue == null || "".equals(fInputValue))) //$NON-NLS-1$
      return null;

    ISearchField field = (ISearchField) ((IStructuredSelection) fFieldViewer.getSelection()).getFirstElement();
    SearchSpecifier specifier = (SearchSpecifier) ((IStructuredSelection) fSpecifierViewer.getSelection()).getFirstElement();

    if (searchmark != null)
      return fFactory.createSearchCondition(null, searchmark, field, specifier, fInputValue != null ? fInputValue : ""); //$NON-NLS-1$

    return fFactory.createSearchCondition(field, specifier, fInputValue != null ? fInputValue : ""); //$NON-NLS-1$
View Full Code Here

  }

  private String getSpecifierTooltip(IStructuredSelection selection) {
    Object element = selection.getFirstElement();
    if (element instanceof SearchSpecifier) {
      SearchSpecifier specifier = (SearchSpecifier) element;
      if (specifier == SearchSpecifier.CONTAINS)
        return Messages.SearchConditionItem_CONTAINS_ANY;
    }

    return null;
View Full Code Here

TOP

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

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.