예제 #1
0
  private static String mapObrPropertyToR5(String namespace, String propName) {
    if (BundleNamespace.BUNDLE_NAMESPACE.equals(namespace)) {
      if ("symbolicname".equals(propName)) return BundleNamespace.BUNDLE_NAMESPACE;
      if ("version".equals(propName)) return BundleNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE;
    }

    if (PackageNamespace.PACKAGE_NAMESPACE.equals(namespace)) {
      if ("package".equals(propName)) return PackageNamespace.PACKAGE_NAMESPACE;
    }

    if (ServiceNamespace.SERVICE_NAMESPACE.equals(namespace)) {
      if ("service".equals(propName)) return ServiceNamespace.SERVICE_NAMESPACE;
    }

    return propName;
  }
예제 #2
0
  private static String translateObrFilter(String namespace, String filter, LogService log) {
    filter = ObrUtil.processFilter(filter, log);

    if (PackageNamespace.PACKAGE_NAMESPACE.equals(namespace))
      return filter.replaceAll("\\(package", "(" + PackageNamespace.PACKAGE_NAMESPACE);

    if (ServiceNamespace.SERVICE_NAMESPACE.equals(namespace))
      return filter.replaceAll("\\(service", "(" + ServiceNamespace.SERVICE_NAMESPACE);

    if (BundleNamespace.BUNDLE_NAMESPACE.equals(namespace)) {
      filter = filter.replaceAll("\\(symbolicname", "(" + BundleNamespace.BUNDLE_NAMESPACE);
      return filter.replaceAll(
          "\\(version", "(" + BundleNamespace.CAPABILITY_BUNDLE_VERSION_ATTRIBUTE);
    }

    if (ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE.equals(namespace))
      return filter.replaceAll(
          "\\(ee", "(" + ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE);

    return filter;
  }
예제 #3
0
파일: CapReqBuilder.java 프로젝트: kwin/bnd
 public boolean isPackage() {
   return PackageNamespace.PACKAGE_NAMESPACE.equals(getNamespace());
 }