Examples of withSubject()


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

      SearchQuery query = new SearchQueryImpl(site);
      query.withVersion(Resource.LIVE);

      // Add the keywords (or)
      for (String subject : subjects) {
        query.withSubject(subject);
      }

      // Add the pagelets required on stage (and)
      if (requiredPagelets.size() > 0) {
        List<Pagelet> pagelets = new ArrayList<Pagelet>();
View Full Code Here

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

    SearchQuery query = new SearchQueryImpl(site);
    query.withVersion(Resource.LIVE);
    query.withTypes(ImageResource.TYPE);
    for (int i = 0; i < imageSubjects.size(); i++)
      query.withSubject(imageSubjects.get(i));
    SearchResult result;
    try {
      result = repository.find(query);
    } catch (ContentRepositoryException e) {
      logger.warn("Error searching for image with given subjects.");
View Full Code Here

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

    query.withVersion(Resource.LIVE);
    query.withTypes(Page.TYPE);
    query.withLimit(limit);
    query.sortByPublishingDate(Order.Descending);
    for (String subject : subjects) {
      query.withSubject(subject);
    }

    // Load the result and add feed entries
    SearchResult result = contentRepository.find(query);
    List<SyndEntry> entries = new ArrayList<SyndEntry>();
View Full Code Here

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

        for (String id : resourceId)
          q.withIdentifier(id);
      } else {
        if (resourceSubjects != null) {
          for (String subject : resourceSubjects) {
            q.withSubject(subject);
          }
        }
        if (resourceSeries != null) {
          for (String series : resourceSeries) {
            q.withSeries(series);
View Full Code Here

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

  public void testGetWithSubjects() throws Exception {
    populateIndex();
    SearchQuery q = new SearchQueryImpl(site).withTypes(Page.TYPE);
    String[] subjects = new String[] { "Other topic", "Topic a" };
    for (String subject : subjects)
      q.withSubject(subject);
    assertEquals(2, idx.getByQuery(q).getDocumentCount());
  }

  /**
   * Test method for
View Full Code Here

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

    // Subjects
    if (StringUtils.isNotBlank(subjectstring)) {
      StringTokenizer subjects = new StringTokenizer(subjectstring, ",");
      while (subjects.hasMoreTokens())
        q.withSubject(subjects.nextToken());
    }

    // Search terms
    if (StringUtils.isNotBlank(searchterms))
      q.withText(true, searchterms);
View Full Code Here

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

    // Subjects
    if (StringUtils.isNotBlank(subjectstring)) {
      StringTokenizer subjects = new StringTokenizer(subjectstring, ",");
      while (subjects.hasMoreTokens())
        q.withSubject(subjects.nextToken());
    }

    // Search terms
    if (StringUtils.isNotBlank(searchterms))
      q.withText(true, searchterms);
View Full Code Here

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

      SearchQuery query = new SearchQueryImpl(site);
      query.withVersion(Resource.LIVE);

      // Add the keywords (or)
      for (String subject : subjects) {
        query.withSubject(subject);
      }

      // Add the pagelets required on stage (and)
      if (requiredPagelets.size() > 0) {
        List<Pagelet> pagelets = new ArrayList<Pagelet>();
View Full Code Here

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

    query.withVersion(Resource.LIVE);
    query.withTypes(Page.TYPE);
    query.withLimit(limit);
    query.sortByPublishingDate(Order.Descending);
    for (String subject : subjects) {
      query.withSubject(subject);
    }

    // Load the result and add feed entries
    SearchResult result = contentRepository.find(query);
    List<SyndEntry> entries = new ArrayList<SyndEntry>();
View Full Code Here

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

    SearchQuery query = new SearchQueryImpl(site);
    query.withVersion(Resource.LIVE);
    query.withTypes(ImageResource.TYPE);
    for (int i = 0; i < imageSubjects.size(); i++)
      query.withSubject(imageSubjects.get(i));
    SearchResult result;
    try {
      result = repository.find(query);
    } catch (ContentRepositoryException e) {
      logger.warn("Error searching for image with given subjects.");
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.