Package com.cognifide.sling.query.selector

Examples of com.cognifide.sling.query.selector.Selector


  private Predicate<Resource> predicate;

  public HasFunction(String selectorString, SearchStrategy searchStrategy) {
    this.findFunction = new FindFunction(selectorString, searchStrategy);
    this.predicate = new Selector(selectorString, searchStrategy).asPredicate();
  }
View Full Code Here


   *
   * @param selector Ancestor filter
   * @return a {@link SlingQuery} object transformed by this operation
   */
  public SlingQuery closest(String selector) {
    return functionWithSelector(new ClosestFunction(new Selector(selector, searchStrategy)), "");
  }
View Full Code Here

   * @param until Selector marking when the operation should stop
   * @param selector Following siblings filter
   * @return a {@link SlingQuery} object transformed by this operation
   */
  public SlingQuery nextUntil(String until, String selector) {
    return functionWithSelector(new NextFunction(new Selector(until, searchStrategy).asPredicate()),
        selector);
  }
View Full Code Here

   *
   * @param selector Selector used to remove resources
   * @return a {@link SlingQuery} object transformed by this operation
   */
  public SlingQuery not(String selector) {
    return functionWithSelector(new NotFunction(new Selector(selector, searchStrategy)), "");
  }
View Full Code Here

   *
   * @param until Selector marking when the operation should stop
   * @return a {@link SlingQuery} object transformed by this operation
   */
  public SlingQuery parentsUntil(String until) {
    return functionWithSelector(new ParentsFunction(new Selector(until, searchStrategy).asPredicate()),
        "");
  }
View Full Code Here

   * @param until Selector marking when the operation should stop
   * @param selector Parents filter
   * @return a {@link SlingQuery} object transformed by this operation
   */
  public SlingQuery parentsUntil(String until, String selector) {
    return functionWithSelector(new ParentsFunction(new Selector(until, searchStrategy).asPredicate()),
        selector);
  }
View Full Code Here

   * @param until Selector marking when the operation should stop
   * @param selector Previous siblings filter
   * @return a {@link SlingQuery} object transformed by this operation
   */
  public SlingQuery prevUntil(String until, String selector) {
    return functionWithSelector(new PrevFunction(new Selector(until, searchStrategy).asPredicate()),
        selector);
  }
View Full Code Here

  private ResourcePredicate predicate;

  public HasFunction(String selectorString, SearchStrategy searchStrategy) {
    this.findFunction = new FindFunction(selectorString, searchStrategy);
    this.predicate = new Selector(selectorString, searchStrategy).asPredicate();
  }
View Full Code Here

  public FunctionWithSelector(Function<?, ?> function, String selector, SearchStrategy strategy) {
    this.function = function;
    if (StringUtils.isBlank(selector)) {
      this.selector = null;
    } else {
      this.selector = new Selector(selector, strategy);
    }
  }
View Full Code Here

   *
   * @param selector Ancestor filter
   * @return a {@link SlingQuery} object transformed by this operation
   */
  public SlingQuery closest(String selector) {
    return functionWithSelector(new ClosestFunction(new Selector(selector, searchStrategy)), "");
  }
View Full Code Here

TOP

Related Classes of com.cognifide.sling.query.selector.Selector

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.