Package aQute.bnd.osgi

Examples of aQute.bnd.osgi.Domain


        out.println();
      }
      if ((options & IMPEXP) != 0) {
        out.println("[IMPEXP]");
        Manifest m = jar.getManifest();
        Domain domain = Domain.domain(m);

        if (m != null) {
          Parameters imports = domain.getImportPackage();
          Parameters exports = domain.getExportPackage();
          for (String p : exports.keySet()) {
            if (imports.containsKey(p)) {
              Attrs attrs = imports.get(p);
              if (attrs.containsKey(VERSION_ATTRIBUTE)) {
                exports.get(p).put("imported-as", attrs.get(VERSION_ATTRIBUTE));
View Full Code Here


      if (jar == null) {
        err.println("no file " + s);
        continue;
      }

      Domain domain = Domain.domain(jar.getManifest());
      Hashtable<String,Object> ht = new Hashtable<String,Object>();
      Iterator<String> i = domain.iterator();
      Set<String> realNames = new HashSet<String>();

      while (i.hasNext()) {
        String key = i.next();
        String value = domain.get(key).trim();
        ht.put(key.trim().toLowerCase(), value);
        realNames.add(key);
      }
      ht.put("resources", jar.getResources().keySet());
      realNames.add("resources");
View Full Code Here

      trace("find %s", f);
      Jar jar = new Jar(f);
      try {
        Manifest m = jar.getManifest();
        if (m != null) {
          Domain domain = Domain.domain(m);

          if (options.exports() != null) {
            Parameters ep = domain.getExportPackage();
            for (Glob g : options.exports()) {
              for (Entry<String,Attrs> exp : ep.entrySet()) {
                if (g.matcher(exp.getKey()).matches()) {
                  String v = exp.getValue().get(VERSION_ATTRIBUTE);
                  if (v == null)
                    v = "0";
                  out.printf(">%s: %s-%s%n", f.getPath(), exp.getKey(), v);
                }
              }
            }
          }
          if (options.imports() != null) {
            Parameters ip = domain.getImportPackage();
            for (Glob g : options.imports()) {
              for (Entry<String,Attrs> imp : ip.entrySet()) {
                if (g.matcher(imp.getKey()).matches()) {
                  String v = imp.getValue().get(VERSION_ATTRIBUTE);
                  if (v == null)
View Full Code Here

        out.println();
      }
      if ((options & IMPEXP) != 0) {
        out.println("[IMPEXP]");
        Manifest m = jar.getManifest();
        Domain domain = Domain.domain(m);

        if (m != null) {
          Parameters imports = domain.getImportPackage();
          Parameters exports = domain.getExportPackage();
          for (String p : exports.keySet()) {
            if (imports.containsKey(p)) {
              Attrs attrs = imports.get(p);
              if (attrs.containsKey(VERSION_ATTRIBUTE)) {
                exports.get(p).put("imported-as", attrs.get(VERSION_ATTRIBUTE));
View Full Code Here

      if (jar == null) {
        err.println("no file " + s);
        continue;
      }

      Domain domain = Domain.domain(jar.getManifest());
      Hashtable<String,Object> ht = new Hashtable<String,Object>();
      Iterator<String> i = domain.iterator();
      Set<String> realNames = new HashSet<String>();

      while (i.hasNext()) {
        String key = i.next();
        String value = domain.get(key).trim();
        ht.put(key.trim().toLowerCase(), value);
        realNames.add(key);
      }
      ht.put("resources", jar.getResources().keySet());
      realNames.add("resources");
View Full Code Here

      trace("find %s", f);
      Jar jar = new Jar(f);
      try {
        Manifest m = jar.getManifest();
        if (m != null) {
          Domain domain = Domain.domain(m);

          if (options.exports() != null) {
            Parameters ep = domain.getExportPackage();
            for (Glob g : options.exports()) {
              for (Entry<String,Attrs> exp : ep.entrySet()) {
                if (g.matcher(exp.getKey()).matches()) {
                  String v = exp.getValue().get(VERSION_ATTRIBUTE);
                  if (v == null)
                    v = "0";
                  out.printf(">%s: %s-%s%n", f.getPath(), exp.getKey(), v);
                }
              }
            }
          }
          if (options.imports() != null) {
            Parameters ip = domain.getImportPackage();
            for (Glob g : options.imports()) {
              for (Entry<String,Attrs> imp : ip.entrySet()) {
                if (g.matcher(imp.getKey()).matches()) {
                  String v = imp.getValue().get(VERSION_ATTRIBUTE);
                  if (v == null)
View Full Code Here

        out.println();
      }
      if ((options & IMPEXP) != 0) {
        out.println("[IMPEXP]");
        Manifest m = jar.getManifest();
        Domain domain = Domain.domain(m);

        if (m != null) {
          Parameters imports = domain.getImportPackage();
          Parameters exports = domain.getExportPackage();
          for (String p : exports.keySet()) {
            if (imports.containsKey(p)) {
              Attrs attrs = imports.get(p);
              if (attrs.containsKey(VERSION_ATTRIBUTE)) {
                exports.get(p).put("imported-as", attrs.get(VERSION_ATTRIBUTE));
View Full Code Here

      if (jar == null) {
        err.println("no file " + s);
        continue;
      }

      Domain domain = Domain.domain(jar.getManifest());
      Hashtable<String,Object> ht = new Hashtable<String,Object>();
      Iterator<String> i = domain.iterator();
      Set<String> realNames = new HashSet<String>();

      while (i.hasNext()) {
        String key = i.next();
        String value = domain.get(key).trim();
        ht.put(key.trim().toLowerCase(), value);
        realNames.add(key);
      }
      ht.put("resources", jar.getResources().keySet());
      realNames.add("resources");
View Full Code Here

        out.println();
      }
      if ((options & IMPEXP) != 0) {
        out.println("[IMPEXP]");
        Manifest m = jar.getManifest();
        Domain domain = Domain.domain(m);

        if (m != null) {
          Parameters imports = domain.getImportPackage();
          Parameters exports = domain.getExportPackage();
          for (String p : exports.keySet()) {
            if (imports.containsKey(p)) {
              Attrs attrs = imports.get(p);
              if (attrs.containsKey(VERSION_ATTRIBUTE)) {
                exports.get(p).put("imported-as", attrs.get(VERSION_ATTRIBUTE));
View Full Code Here

      if (jar == null) {
        err.println("no file " + s);
        continue;
      }

      Domain domain = Domain.domain(jar.getManifest());
      Hashtable<String,Object> ht = new Hashtable<String,Object>();
      Iterator<String> i = domain.iterator();
      Set<String> realNames = new HashSet<String>();

      while (i.hasNext()) {
        String key = i.next();
        String value = domain.get(key).trim();
        ht.put(key.trim().toLowerCase(), value);
        realNames.add(key);
      }
      ht.put("resources", jar.getResources().keySet());
      realNames.add("resources");
View Full Code Here

TOP

Related Classes of aQute.bnd.osgi.Domain

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.