Package aQute.lib.filter

Examples of aQute.lib.filter.Filter


        continue;
      else if (modeRequire.getFilter() == null)
        iter.remove();
      else {
        try {
          Filter filter = new Filter(modeRequire.getFilter());
          if (!filter.match(modeCapability))
            iter.remove();
        } catch (IllegalArgumentException e) {
          synchronized (this) {
            if (reporter != null)
              reporter.error("Error parsing mode filter requirement on resource %s: %s", resource.getUrl(), modeRequire.getFilter());
View Full Code Here


    SortedMap<Version, Resource> versionMap = pkgResourceMap.get(pkgName);
    if (versionMap == null)
      return null;
   
    // Was a filter expression supplied?
    Filter filter = null;
    String filterStr = props.get("filter");
    if (filterStr != null) {
      filter = new Filter(filterStr);
    }
   
    // Narrow the resources by version range string or filter.
    List<Resource> resources;
    if (filter != null)
View Full Code Here

    nextReq: for (Requirement req : requirements) {
      String f = req.getDirectives().get("filter");
      if (f == null)
        continue nextReq;

      Filter filter = new Filter(f);

      for (PersistentResource presource : persistent.values()) {
        Resource resource = presource.getResource();
        List<Capability> provided = resource.getCapabilities(req.getNamespace());
        if (provided != null)
          for (Capability cap : provided) {
            if (filter.matchMap(cap.getAttributes())) {
              List<Capability> l = result.get(req);
              if (l == null)
                result.put(req, l = new ArrayList<Capability>());
              l.add(cap);
            }
View Full Code Here

TOP

Related Classes of aQute.lib.filter.Filter

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.