Examples of withSubjects()


Examples of ch.entwine.weblounge.common.content.SearchQuery.withSubjects()

      uri = new ImageResourceURIImpl(site, imagePath, null);
    if (uri == null && imageSubjects != null && imageSubjects.size() > 0) {
      SearchQuery query = new SearchQueryImpl(site);
      query.withVersion(Resource.LIVE);
      query.withTypes(ImageResource.TYPE);
      query.withSubjects(SearchQuery.Quantifier.All, imageSubjects.toArray(new String[imageSubjects.size()]));
      SearchResult result;
      try {
        result = repository.find(query);
      } catch (ContentRepositoryException e) {
        logger.warn("Error searching for image with given subjects ({}): {}", StringUtils.join(imageSubjects, ", "), e.getMessage());
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withSubjects()

   */
  @Test
  public void testGetWithAllSubjects() throws Exception {
    populateIndex();
    SearchQuery q = new SearchQueryImpl(site).withTypes(Page.TYPE);
    q.withSubjects(Quantifier.All, "Topic a", "This subject");
    assertEquals(1, idx.getByQuery(q).getDocumentCount());
  }

  /**
   * Test method for
View Full Code Here

Examples of ch.entwine.weblounge.common.impl.content.SearchQueryImpl.withSubjects()

      uri = new ImageResourceURIImpl(site, imagePath, null);
    if (uri == null && imageSubjects != null && imageSubjects.size() > 0) {
      SearchQuery query = new SearchQueryImpl(site);
      query.withVersion(Resource.LIVE);
      query.withTypes(ImageResource.TYPE);
      query.withSubjects(SearchQuery.Quantifier.All, imageSubjects.toArray(new String[imageSubjects.size()]));
      SearchResult result;
      try {
        result = repository.find(query);
      } catch (ContentRepositoryException e) {
        logger.warn("Error searching for image with given subjects ({}): {}", StringUtils.join(imageSubjects, ", "), e.getMessage());
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.