Package aQute.library.capreq.FilterParser

Examples of aQute.library.capreq.FilterParser.Expression.eval()


    if (f == null)
      return false;

    Expression parse = parser.parse(f);

    return parse.eval(attributes);
  }

  public RequirementImpl createRequirement(String namespace, String filter) {
    RequirementImpl req = new RequirementImpl(local, namespace);
    req.setFilter(filter);
View Full Code Here


      exp = parser.parse(rq.getDirectives().get("filter"));
    } else
      exp = ((RequirementImpl) rq).getFilter();
    for (ResourceImpl rs : getResources()) {
      for (Capability cap : rs.getCapabilities(rq.getNamespace())) {
        if (exp.eval(cap.getAttributes()))
          providers.add(cap);
      }
    }
    return providers;
  }
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.