Package org.rssowl.core.model.search

Examples of org.rssowl.core.model.search.ISearchField


      // TODO Replace this by a event-based solution if that becomes available
      Thread.sleep(500);

      /* 1. SearchCondition: Title contains "News" */
      ISearchField field1 = fTypesFactory.createSearchField(INews.TITLE, INews.class);
      ISearchCondition cond1 = fTypesFactory.createSearchCondition(field1, SearchSpecifier.CONTAINS, "News", false);
      conditions.add(cond1);

      /* 2. SearchCondition: News is not marked read */
      ISearchField field2 = fTypesFactory.createSearchField(INews.STATE, INews.class);
      ISearchCondition cond2 = fTypesFactory.createSearchCondition(field2, SearchSpecifier.IS_NOT, State.READ.name(), false);
      conditions.add(cond2);

      List<ISearchHit<NewsReference>> results = fModelSearch.searchNews(conditions);
      assertEquals(3, results.size());
View Full Code Here


      // TODO Replace this by a event-based solution if that becomes available
      Thread.sleep(500);

      /* 1. SearchCondition: News coming from Feed that contains "feed2.xml" */
      ISearchField field1 = fTypesFactory.createSearchField(IFeed.LINK, IFeed.class);
      ISearchCondition cond1 = fTypesFactory.createSearchCondition(field1, SearchSpecifier.CONTAINS, "feed2.xml", true);
      conditions.add(cond1);

      /* 2. SearchCondition: News Description does not contain "Foo" */
      ISearchField field2 = fTypesFactory.createSearchField(INews.DESCRIPTION, INews.class);
      ISearchCondition cond2 = fTypesFactory.createSearchCondition(field2, SearchSpecifier.CONTAINS_NOT, "Foo", true);
      conditions.add(cond2);

      /* 3. SearchCondition: News State is NEW */
      ISearchField field3 = fTypesFactory.createSearchField(INews.STATE, INews.class);
      ISearchCondition cond3 = fTypesFactory.createSearchCondition(field3, SearchSpecifier.IS, State.NEW.name(), true);
      conditions.add(cond3);

      List<ISearchHit<NewsReference>> results = fModelSearch.searchNews(conditions);
      assertEquals(2, results.size());
View Full Code Here

      // TODO Replace this by a event-based solution if that becomes available
      Thread.sleep(500);

      /* 1. SearchCondition: News has Attachment with Type "audio/mp3" */
      ISearchField field1 = fTypesFactory.createSearchField(IAttachment.TYPE, IAttachment.class);
      ISearchCondition cond1 = fTypesFactory.createSearchCondition(field1, SearchSpecifier.IS, "audio/mp3", false);
      conditions.add(cond1);

      List<ISearchHit<NewsReference>> results = fModelSearch.searchNews(conditions);
      assertEquals(1, results.size());
View Full Code Here

TOP

Related Classes of org.rssowl.core.model.search.ISearchField

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.