Examples of buildRequirement()


Examples of org.osgi.service.indexer.Builder.buildRequirement()

      Builder builder = new Builder().setNamespace(Namespaces.NS_WIRING_PACKAGE).addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString());

      copyAttribsAndDirectives(entry.getValue(), builder, Constants.VERSION_ATTRIBUTE, "specification-version");

      reqs.add(builder.buildRequirement());
    }
  }

  private void copyAttribsAndDirectives(Map<String, String> input, Builder output, String... ignores) {
    Set<String> ignoreSet = new HashSet<String>(Arrays.asList(ignores));
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

      Builder builder = new Builder().setNamespace(Namespaces.NS_WIRING_BUNDLE).addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString());

      copyAttribsAndDirectives(entry.getValue(), builder, Constants.BUNDLE_VERSION_ATTRIBUTE);

      reqs.add(builder.buildRequirement());
    }
  }

  private void doFragment(Resource resource, List<? super Requirement> reqs) throws Exception {
    Manifest manifest = resource.getManifest();
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

      Util.addVersionFilter(filter, version, VersionKey.BundleVersion);
      filter.append(")");

      Builder builder = new Builder().setNamespace(Namespaces.NS_WIRING_HOST).addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString());

      reqs.add(builder.buildRequirement());
    }
  }

  private void doExportService(Resource resource, List<? super Capability> caps) throws Exception {
    @SuppressWarnings("deprecation")
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

      Builder builder = new Builder().setNamespace(Namespaces.NS_SERVICE).addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString())
          .addDirective(Namespaces.DIRECTIVE_EFFECTIVE, Namespaces.EFFECTIVE_ACTIVE);
      if (optional)
        builder.addDirective(Namespaces.DIRECTIVE_RESOLUTION, Constants.RESOLUTION_OPTIONAL);
      reqs.add(builder.buildRequirement());
    }
  }

  private void doBREE(Resource resource, List<? super Requirement> reqs) throws Exception {
    @SuppressWarnings("deprecation")
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

    }

    Builder builder = new Builder().setNamespace(Namespaces.NS_NATIVE).addDirective(Namespaces.DIRECTIVE_FILTER, filter);
    if (optional)
      builder.addDirective(Namespaces.DIRECTIVE_RESOLUTION, Namespaces.RESOLUTION_OPTIONAL);
    reqs.add(builder.buildRequirement());
  }

  /*
   * Assemble a compound filter by searching a map of attributes. E.g. the
   * following values:
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

    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;
  }

  private static class SCRContentHandler extends DefaultHandler {
    private List<Capability> caps;
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

            builder.addDirective(Namespaces.DIRECTIVE_CARDINALITY, Namespaces.CARDINALITY_MULTIPLE);
        }
      }

      builder.addDirective(Namespaces.DIRECTIVE_EFFECTIVE, Namespaces.EFFECTIVE_ACTIVE);
      return builder.buildRequirement();
    }

    private static Object readTyped(String type, String string) {
      if (Long.class.getSimpleName().equals(type) || Integer.class.getSimpleName().equals(type) || Short.class.getSimpleName().equals(type)
          || Byte.class.getSimpleName().equals(type))
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

      Builder builder = new Builder().setNamespace(Namespaces.NS_WIRING_PACKAGE).addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString());

      copyAttribsAndDirectives(entry.getValue(), builder, Constants.VERSION_ATTRIBUTE, "specification-version");

      reqs.add(builder.buildRequirement());
    }
  }

  private void copyAttribsAndDirectives(Map<String, String> input, Builder output, String... ignores) {
    Set<String> ignoreSet = new HashSet<String>(Arrays.asList(ignores));
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

      Builder builder = new Builder().setNamespace(Namespaces.NS_WIRING_BUNDLE).addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString());

      copyAttribsAndDirectives(entry.getValue(), builder, Constants.BUNDLE_VERSION_ATTRIBUTE);

      reqs.add(builder.buildRequirement());
    }
  }

  private void doFragment(Resource resource, List<? super Requirement> reqs) throws Exception {
    Manifest manifest = resource.getManifest();
View Full Code Here

Examples of org.osgi.service.indexer.Builder.buildRequirement()

      Util.addVersionFilter(filter, version, VersionKey.BundleVersion);
      filter.append(")");

      Builder builder = new Builder().setNamespace(Namespaces.NS_WIRING_HOST).addDirective(Namespaces.DIRECTIVE_FILTER, filter.toString());

      reqs.add(builder.buildRequirement());
    }
  }

  private void doExportService(Resource resource, List<? super Capability> caps) throws Exception {
    @SuppressWarnings("deprecation")
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.