Package java.util.jar

Examples of java.util.jar.Attributes.entrySet()


            }
        }

        final OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
        Attributes attributes = manifest.getMainAttributes();
        for (Entry<Object, Object> entry : attributes.entrySet()) {
            String key = entry.getKey().toString();
            String value = (String) entry.getValue();
            if (key.equals("Manifest-Version"))
                continue;
View Full Code Here


        final OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
        Manifest manifest = getBundleManifest(appArchive);
        if (manifest != null)
        {
            Attributes attributes = manifest.getMainAttributes();
            for (Entry<Object, Object> entry : attributes.entrySet())
            {
                String key = entry.getKey().toString();
                String value = (String)entry.getValue();
                if (key.equals("Manifest-Version"))
                    continue;
View Full Code Here

            resource = URI.create(resource).getPath();
        }
        JarFile jar = new JarFile(resource);
        Attributes attributes = jar.getManifest().getMainAttributes();
        Map<String, String> headers = new HashMap<String, String>();
        for (Map.Entry key : attributes.entrySet()) {
            headers.put(key.getKey().toString(), key.getValue().toString());
        }

        Resource res = ResourceBuilder.build(url.toString(), headers);
        System.out.println("Capabilities");
View Full Code Here

        attributes.putValue(Constants.PROVIDE_CAPABILITY, systemCaps);

        attributes = DeploymentBuilder.overrideAttributes(attributes, metadata);

        Map<String, String> headers = new HashMap<String, String>();
        for (Map.Entry attr : attributes.entrySet()) {
            headers.put(attr.getKey().toString(), attr.getValue().toString());
        }
        Resource resource = ResourceBuilder.build("system-bundle", headers);

        return resource;
View Full Code Here

        final OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
        Manifest manifest = getBundleManifest(appArchive);
        if (manifest != null)
        {
            Attributes attributes = manifest.getMainAttributes();
            for (Entry<Object, Object> entry : attributes.entrySet())
            {
                String key = entry.getKey().toString();
                String value = (String)entry.getValue();
                if (key.equals("Manifest-Version"))
                    continue;
View Full Code Here

            final EvidenceCollection productEvidence = dependency.getProductEvidence();
            final EvidenceCollection versionEvidence = dependency.getVersionEvidence();

            final String source = "Manifest";

            for (Entry<Object, Object> entry : atts.entrySet()) {
                String key = entry.getKey().toString();
                String value = atts.getValue(key);
                if (HTML_DETECTION_PATTERN.matcher(value).find()) {
                    value = Jsoup.parse(value).text();
                }
View Full Code Here

    Map<String,String> map = new TreeMap<String,String>();

    Attributes attr = _manifest.getMainAttributes();

    if (attr != null) {
      for (Map.Entry entry : attr.entrySet()) {
  map.put(String.valueOf(entry.getKey()),
    String.valueOf(entry.getValue()));
      }
    }
View Full Code Here

                ZipEntry entry;
                while ((entry = zis.getNextEntry()) != null) {
                    if (MANIFEST_NAME.equals(entry.getName())) {
                        Attributes attributes = new Manifest(zis).getMainAttributes();
                        Map<String, String> headers = new HashMap<String, String>();
                        for (Map.Entry attr : attributes.entrySet()) {
                            headers.put(attr.getKey().toString(), attr.getValue().toString());
                        }
                        return headers;
                    }
                }
View Full Code Here

            // extract icon from the plugin jar file
            icon = new ImageProvider(iconPath).setArchive(file).setMaxWidth(24).setMaxHeight(24).setOptional(true).get();
        }
        if (oldcheck && mainversion > Version.getInstance().getVersion()) {
            int myv = Version.getInstance().getVersion();
            for (Map.Entry<Object, Object> entry : attr.entrySet()) {
                try {
                    String key = ((Attributes.Name)entry.getKey()).toString();
                    if (key.endsWith("_Plugin-Url")) {
                        int mv = Integer.parseInt(key.substring(0,key.length()-11));
                        if (mv <= myv && (mv > mainversion || mainversion > myv)) {
View Full Code Here

            String rootPath) {
        List<URL> urlList = new ArrayList<URL>();
        if (manifest != null) {
            Attributes mainAttributes  = manifest.getMainAttributes();

            for (Map.Entry entry : mainAttributes.entrySet()) {

                Attributes.Name next = (Attributes.Name) entry.getKey();

                if (next.equals(Attributes.Name.CLASS_PATH)) {
                    String classpathString = (String) entry.getValue();
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.