Package org.osgi.resource

Examples of org.osgi.resource.Resource


    }

    private void verify(BaseRepository repo) {
        assertNotNull(repo.getResources());
        assertEquals(1, repo.getResources().size());
        Resource resource = repo.getResources().get(0);
        assertNotNull(resource);
        assertEquals(1, resource.getCapabilities(IDENTITY_NAMESPACE).size());
        assertEquals(1, resource.getCapabilities(BUNDLE_NAMESPACE).size());
        assertEquals(1, resource.getCapabilities(PACKAGE_NAMESPACE).size());
        assertEquals(1, resource.getRequirements(PACKAGE_NAMESPACE).size());
    }
View Full Code Here


    return builder.toString();
  }

  ResourceHandle findExactMatch(String identity, String version, Map<String,SortedMap<Version,Resource>> resourceMap) throws Exception {
    Resource resource;
    VersionRange range = new VersionRange(version);
    if (range.isRange())
      return null;

    SortedMap<Version,Resource> versions = resourceMap.get(identity);
View Full Code Here

  static Resource findVersion(Version version, SortedMap<Version,Resource> versions) {
    if (version.getQualifier() != null && version.getQualifier().length() > 0) {
      return versions.get(version);
    }

    Resource latest = null;
    for (Map.Entry<Version,Resource> entry : versions.entrySet()) {
      if (version.getMicro() == entry.getKey().getMicro() && version.getMinor() == entry.getKey().getMinor()
          && version.getMajor() == entry.getKey().getMajor()) {
        latest = entry.getValue();
        continue;
View Full Code Here

    return builder.toString();
  }

  ResourceHandle findExactMatch(String identity, String version, Map<String,SortedMap<Version,Resource>> resourceMap) throws Exception {
    Resource resource;
    VersionRange range = new VersionRange(version);
    if (range.isRange())
      return null;

    SortedMap<Version,Resource> versions = resourceMap.get(identity);
View Full Code Here

  static Resource findVersion(Version version, SortedMap<Version,Resource> versions) {
    if (version.getQualifier() != null && version.getQualifier().length() > 0) {
      return versions.get(version);
    }

    Resource latest = null;
    for (Map.Entry<Version,Resource> entry : versions.entrySet()) {
      if (version.getMicro() == entry.getKey().getMicro() && version.getMinor() == entry.getKey().getMinor()
          && version.getMajor() == entry.getKey().getMajor()) {
        latest = entry.getValue();
        continue;
View Full Code Here

TOP

Related Classes of org.osgi.resource.Resource

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.