Package org.osgi.service.indexer

Examples of org.osgi.service.indexer.Requirement


        }
        builder.append(')');
        filter = builder.toString();
      }

      Requirement requirement = new Builder().setNamespace(Namespaces.NS_EE).addDirective(Namespaces.DIRECTIVE_FILTER, filter).buildRequirement();
      reqs.add(requirement);
    }
  }
View Full Code Here


        }
        builder.append(')');
        filter = builder.toString();
      }
     
      Requirement requirement = new Builder()
      .setNamespace(Namespaces.NS_EE)
      .addDirective(Namespaces.DIRECTIVE_FILTER, filter)
      .buildRequirement();
      reqs.add(requirement);
    }
View Full Code Here

          highest = version;
      }
    }

    if (highest!= null) {
      Requirement requirement = createRequirement(new VersionRange("[" + highest + ",2.0)"));
      reqs.add(requirement);
    }
  }
View Full Code Here

    filter.insert(0"(&");
    Util.addVersionFilter(filter, range, VersionKey.PackageVersion);
    filter.append(')');
   
    builder.addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString());
    Requirement requirement = builder.buildRequirement();
    return requirement;
  }
View Full Code Here

        }
        builder.append(')');
        filter = builder.toString();
      }
     
      Requirement requirement = new Builder()
      .setNamespace(Namespaces.NS_EE)
      .addDirective(Namespaces.DIRECTIVE_FILTER, filter)
      .buildRequirement();
      reqs.add(requirement);
    }
View Full Code Here

          highest = version;
      }
    }

    if (highest!= null) {
      Requirement requirement = createRequirement(new VersionRange("[" + highest + ",2.0)"));
      reqs.add(requirement);
    }
  }
View Full Code Here

    Util.addVersionFilter(filter, range, VersionKey.PackageVersion);
    filter.append(')');
   
    builder.addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString())
      .addDirective(Namespaces.DIRECTIVE_EFFECTIVE, Namespaces.EFFECTIVE_ACTIVE);
    Requirement requirement = builder.buildRequirement();
    return requirement;
  }
View Full Code Here

    }

    if (highest != null) {
      Version lower = new Version(highest.getMajor(), highest.getMinor(), 0);
      Version upper = new Version(highest.getMajor() + 1, 0, 0);
      Requirement requirement = createRequirement(new VersionRange(true, lower, upper, false));
      reqs.add(requirement);
    }
  }
View Full Code Here

    filter.insert(0, "(&");
    Util.addVersionFilter(filter, range, VersionKey.PackageVersion);
    filter.append(')');

    builder.addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString()).addDirective(Namespaces.DIRECTIVE_EFFECTIVE, Namespaces.EFFECTIVE_ACTIVE);
    Requirement requirement = builder.buildRequirement();
    return requirement;
  }
View Full Code Here

    LinkedList<Capability> caps = new LinkedList<Capability>();
    LinkedList<Requirement> reqs = new LinkedList<Requirement>();

    a.analyzeResource(new JarResource(new File("testdata/05-import.jar")), caps, reqs);

    Requirement pkgImport = findReqs("osgi.wiring.package", reqs).get(0);
    assertEquals("(&(osgi.wiring.package=org.example.a)(version>=1.0.0)(!(version>=2.0.0)))", pkgImport.getDirectives().get("filter"));
  }
View Full Code Here

TOP

Related Classes of org.osgi.service.indexer.Requirement

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.