Adds the Require-Capability Strings from a SUBSYSTEM.MF to the Map of
Require-Capabilities found

@param esa - the feature file containing the SUBSYSTEM.MF
@param requiresMap - Map of Path to Require-Capability
@throws IOException
173364
private static void addSubsystemManifestRequireCapability(File esa,
                                                              Map<Path, String> requiresMap) throws IOException {
        String esaLocation = esa.getAbsolutePath();
        ZipFile zip = null;
        try {
            zip = new ZipFile(esaLocation);
            Enumeration<? extends ZipEntry> zipEntries = zip.entries();
            ZipEntry subsystemEntry = null;
            while (zipEntries.hasMoreElements()) {
                ZipEntry nextEntry = zipEntries.nextElement();
                if ("OSGI-INF/SUBSYSTEM.MF".equalsIgnoreCase(nextEntry.getName())) {
                    subsystemEntry = nextEntry;
                    break;
                }
            }
            if (subsystemEntry == null) {
                ;
            } else {
                Manifest m = ManifestProcessor.parseManifest(zip.getInputStream(subsystemEntry));
                Attributes manifestAttrs = m.getMainAttributes();
                String requireCapabilityAttr = manifestAttrs.getValue(REQUIRE_CAPABILITY_HEADER_NAME);
                requiresMap.put(esa.toPath(), requireCapabilityAttr);
            }
        } finally {
            if (zip != null) {
                zip.close();
            }
        }
    }
1238143
public void addMimeMapping(final WebAppMimeMapping mimeMapping) {
		NullArgumentException.validateNotNull(mimeMapping, "Mime mapping");
		NullArgumentException.validateNotNull(mimeMapping.getExtension(),
				"Mime mapping extension");
		NullArgumentException.validateNotNull(mimeMapping.getMimeType(),
				"Mime mapping type");
		mimeMappings.add(mimeMapping);
	}
246127
public void assertNotEmpty(Map<?, ?> map, String propertyName) {
        if (map == null || map.size() == 0) {
            problemReporter.report(new Problem(this, String.format("%s requires one or more entries", propertyName)));
        }
    }
1122185
public Stream<Module> requiresTransitive(Module m) {
        // find requires transitive
        return m.descriptor()
                .requires().stream()
                .filter(req -> req.modifiers().contains(TRANSITIVE))
                .map(ModuleDescriptor.Requires::name)
                .map(config::findModule)
                .flatMap(Optional::stream);
    }
960701
function requirementsFileExists(servicePath, options, fileName) {
  if (
    options.usePoetry &&
    fse.existsSync(path.join(servicePath, 'pyproject.toml'))
  ) {
    return true;
  }

  if (options.usePipenv && fse.existsSync(path.join(servicePath, 'Pipfile'))) {
    return true;
  }

  if (fse.existsSync(fileName)) {
    return true;
  }

  return false;
}
57643
public static base_response add(nitro_service client, policymap resource) throws Exception {
		policymap addresource = new policymap();
		addresource.mappolicyname = resource.mappolicyname;
		addresource.sd = resource.sd;
		addresource.su = resource.su;
		addresource.td = resource.td;
		addresource.tu = resource.tu;
		return addresource.add_resource(client);
	}
1287
private static void loadDisabledAlgorithmsMap(
            final String propertyName) {

        String property = AccessController.doPrivileged(
            new PrivilegedAction<String>() {
                public String run() {
                    return Security.getProperty(propertyName);
                }
            });

        String[] algorithmsInProperty = null;

        if (property != null && !property.isEmpty()) {

            // remove double quote marks from beginning/end of the property
            if (property.charAt(0) == '"' &&
                    property.charAt(property.length() - 1) == '"') {
                property = property.substring(1, property.length() - 1);
            }

            algorithmsInProperty = property.split(",");
            for (int i = 0; i < algorithmsInProperty.length; i++) {
                algorithmsInProperty[i] = algorithmsInProperty[i].trim();
            }
        }

        // map the disabled algorithms
        if (algorithmsInProperty == null) {
            algorithmsInProperty = new String[0];
        }
        disabledAlgorithmsMap.put(propertyName, algorithmsInProperty);

        // map the key constraints
        KeySizeConstraints keySizeConstraints =
            new KeySizeConstraints(algorithmsInProperty);
        keySizeConstraintsMap.put(propertyName, keySizeConstraints);
    }
450928
@Override
    public void setConstraintMappings(Configuration<?> config) throws IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "setConstraintMappings", config);
        }
        InputStream inputStream = null;
        ClassLoader ccl = getContextClassLoader();

        for (String fileName : getConstraintMapping()) {
            // get an inputstream to the file
            inputStream = ccl.getResource(fileName).openStream();

            // if debugging then dump out the input stream to make sure it is valid
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                inputStream = dumpInputStream(inputStream);
                if (inputStream == null) {
                    // we ran into trouble while dumping the stream... try again
                    inputStream = ccl.getResource(fileName).openStream();
                }
            }
            config.addMapping(inputStream);
            // add to list so we can close the inputStreams  later.
            mapFileInputStreams.add(inputStream);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "setConstraintMappings");
        }
    }
953006
protected void addRequiredPath(String requiredPath) {
        if(requiredPath == null) {
            throw new IllegalArgumentException("Required path can't be null.");
        }
        DefaultOperationRequestAddress requiredAddress = new DefaultOperationRequestAddress();
        CommandLineParser.CallbackHandler handler = new DefaultCallbackHandler(requiredAddress);
        try {
            ParserUtil.parseOperationRequest(requiredPath, handler);
        } catch (CommandFormatException e) {
            throw new IllegalArgumentException("Failed to parse nodeType: " + e.getMessage());
        }
        addRequiredPath(requiredAddress);
    }
1317241
private void registerRequirement(RuntimeRequirementRegistration requirement) {
        assert writeLock.isHeldByCurrentThread();
        CapabilityId dependentId = requirement.getDependentId();
        if (!capabilities.containsKey(dependentId)) {
            throw ControllerLogger.MGMT_OP_LOGGER.unknownCapabilityInContext(dependentId.getName(),
                    dependentId.getScope().getName());
        }
        Map<CapabilityId, Map<String, RuntimeRequirementRegistration>> requirementMap =
                requirement.isRuntimeOnly() ? runtimeOnlyRequirements : requirements;

        Map<String, RuntimeRequirementRegistration> dependents = requirementMap.get(dependentId);
        if (dependents == null) {
            dependents = new HashMap<>();
            requirementMap.put(dependentId, dependents);
        }
        RuntimeRequirementRegistration existing = dependents.get(requirement.getRequiredName());
        if (existing == null) {
            dependents.put(requirement.getRequiredName(), requirement);
        } else {
            existing.addRegistrationPoint(requirement.getOldestRegistrationPoint());
        }
        modified = true;
    }
731603
function IopaHttp(app) {
  app.properties[SERVER.Capabilities][HTTP.CAPABILITY] = {};
  app.properties[SERVER.Capabilities][HTTP.CAPABILITY][SERVER.Version] = packageVersion;
  app.properties[SERVER.Capabilities][HTTP.CAPABILITY][IOPA.Protocol] = HTTP.PROTOCOLVERSION;

  this.app = app;
}
635631
public void addRdfDescription(XmpSchema s) throws IOException {
		writer.write("<rdf:Description rdf:about=\"");
		writer.write(about);
		writer.write("\" ");
		writer.write(s.getXmlns());
		writer.write(">");
		writer.write(s.toString());
		writer.write("</rdf:Description>\n");
	}
276048
@Override
    public final RESOLVESTAGETYPE addDependencies(final MavenDependency... dependencies)
        throws IllegalArgumentException {
        if (dependencies == null || dependencies.length == 0) {
            throw new IllegalArgumentException("At least one coordinate must be specified");
        }
        for (final MavenDependency dependency : dependencies) {
            if (dependency == null) {
                throw new IllegalArgumentException("null dependency not permitted");
            }
            final MavenDependency resolved = this.resolveDependency(dependency);
            this.session.getDependenciesForResolution().add(resolved);
        }
        return this.covarientReturn();
    }
827618
public void setUsemap(java.lang.String usemap) {
        getStateHelper().put(PropertyKeys.usemap, usemap);
        handleAttribute("usemap", usemap);
    }
884874
public void addRequestProps(Map<String, Object> map) {
        if (map == null || map.isEmpty()) {
            return;
        }
        if (requestProps == null) {
            requestProps = new HashMap<String, Object>(16);
        }
        requestProps.putAll(map);
    }
423573
public void initializeExtensionMap(Hashtable<ProvFormat, String> extensionMap,
                                       Hashtable<String, InteropFramework.ProvFormat> extensionRevMap) {
        for (ProvFormat f : ProvFormat.values()) {
            switch (f) {
            case DOT:
                extensionMap.put(ProvFormat.DOT, EXTENSION_DOT);
                extensionRevMap.put(EXTENSION_DOT, ProvFormat.DOT);
                extensionRevMap.put("gv", ProvFormat.DOT);
                mimeTypeMap.put(ProvFormat.DOT, MEDIA_TEXT_VND_GRAPHVIZ);
                mimeTypeRevMap.put(MEDIA_TEXT_VND_GRAPHVIZ, ProvFormat.DOT);
                provTypeMap.put(ProvFormat.DOT, ProvFormatType.OUTPUT);
                break;
            case JPEG:
                extensionMap.put(ProvFormat.JPEG, EXTENSION_JPG);
                extensionRevMap.put(EXTENSION_JPEG, ProvFormat.JPEG);
                extensionRevMap.put(EXTENSION_JPG, ProvFormat.JPEG);
                mimeTypeMap.put(ProvFormat.JPEG, MEDIA_IMAGE_JPEG);
                mimeTypeRevMap.put(MEDIA_IMAGE_JPEG, ProvFormat.JPEG);
                provTypeMap.put(ProvFormat.JPEG, ProvFormatType.OUTPUT);
                break;
            case PNG:
                extensionMap.put(ProvFormat.PNG, EXTENSION_PNG);
                extensionRevMap.put(EXTENSION_PNG, ProvFormat.PNG);
                mimeTypeMap.put(ProvFormat.PNG, MEDIA_IMAGE_PNG);
                mimeTypeRevMap.put(MEDIA_IMAGE_PNG, ProvFormat.PNG);
                provTypeMap.put(ProvFormat.PNG, ProvFormatType.OUTPUT);
                break;
            case JSON:
                extensionMap.put(ProvFormat.JSON, EXTENSION_JSON);
                extensionRevMap.put(EXTENSION_JSON, ProvFormat.JSON);
                mimeTypeMap.put(ProvFormat.JSON, MediaType.APPLICATION_JSON);
                mimeTypeRevMap.put(MediaType.APPLICATION_JSON, ProvFormat.JSON);
                provTypeMap.put(ProvFormat.JSON, ProvFormatType.INPUTOUTPUT);
                break;
            case PDF:
                extensionMap.put(ProvFormat.PDF, EXTENSION_PDF);
                extensionRevMap.put(EXTENSION_PDF, ProvFormat.PDF);
                mimeTypeMap.put(ProvFormat.PDF, MEDIA_APPLICATION_PDF);
                mimeTypeRevMap.put(MEDIA_APPLICATION_PDF, ProvFormat.PDF);
                provTypeMap.put(ProvFormat.PDF, ProvFormatType.OUTPUT);
                break;
            case PROVN:
                extensionMap.put(ProvFormat.PROVN, EXTENSION_PROVN);
                extensionRevMap.put(EXTENSION_PROVN, ProvFormat.PROVN);
                extensionRevMap.put("pn", ProvFormat.PROVN);
                extensionRevMap.put("asn", ProvFormat.PROVN);
                extensionRevMap.put("prov-asn", ProvFormat.PROVN);
                mimeTypeMap.put(ProvFormat.PROVN,
                                MEDIA_TEXT_PROVENANCE_NOTATION);
                mimeTypeRevMap.put(MEDIA_TEXT_PROVENANCE_NOTATION,
                                   ProvFormat.PROVN);
                provTypeMap.put(ProvFormat.PROVN, ProvFormatType.INPUTOUTPUT);
                break;
            case RDFXML:
                extensionMap.put(ProvFormat.RDFXML, EXTENSION_RDF);
                extensionRevMap.put(EXTENSION_RDF, ProvFormat.RDFXML);
                mimeTypeMap.put(ProvFormat.RDFXML, MEDIA_APPLICATION_RDF_XML);
                mimeTypeRevMap
                        .put(MEDIA_APPLICATION_RDF_XML, ProvFormat.RDFXML);
                provTypeMap.put(ProvFormat.RDFXML, ProvFormatType.INPUTOUTPUT);
                break;
            case SVG:
                extensionMap.put(ProvFormat.SVG, EXTENSION_SVG);
                extensionRevMap.put(EXTENSION_SVG, ProvFormat.SVG);
                mimeTypeMap.put(ProvFormat.SVG, MEDIA_IMAGE_SVG_XML);
                mimeTypeRevMap.put(MEDIA_IMAGE_SVG_XML, ProvFormat.SVG);
                provTypeMap.put(ProvFormat.SVG, ProvFormatType.OUTPUT);
                break;
            case TRIG:
                extensionMap.put(ProvFormat.TRIG, EXTENSION_TRIG);
                extensionRevMap.put(EXTENSION_TRIG, ProvFormat.TRIG);
                mimeTypeMap.put(ProvFormat.TRIG, MEDIA_APPLICATION_TRIG);
                mimeTypeRevMap.put(MEDIA_APPLICATION_TRIG, ProvFormat.TRIG);
                provTypeMap.put(ProvFormat.TRIG, ProvFormatType.INPUTOUTPUT);
                break;
            case TURTLE:
                extensionMap.put(ProvFormat.TURTLE, EXTENSION_TTL);
                extensionRevMap.put(EXTENSION_TTL, ProvFormat.TURTLE);
                mimeTypeMap.put(ProvFormat.TURTLE, MEDIA_TEXT_TURTLE);
                mimeTypeRevMap.put(MEDIA_TEXT_TURTLE, ProvFormat.TURTLE);
                provTypeMap.put(ProvFormat.TURTLE, ProvFormatType.INPUTOUTPUT);
                break;
            case XML:
                extensionMap.put(ProvFormat.XML, EXTENSION_PROVX);
                extensionRevMap.put(EXTENSION_PROVX, ProvFormat.XML);
                extensionRevMap.put(EXTENSION_XML, ProvFormat.XML);
                mimeTypeMap.put(ProvFormat.XML,
                                MEDIA_APPLICATION_PROVENANCE_XML);
                mimeTypeRevMap.put(MEDIA_APPLICATION_PROVENANCE_XML,
                                   ProvFormat.XML);
                provTypeMap.put(ProvFormat.XML, ProvFormatType.INPUTOUTPUT);
                break;
            default:
                break;

            }
        }

    }
1013424
private static boolean requiredByPlatformFeature(ContentBasedLocalBundleRepository br, File baseDir, File b) {
        try {
            Map<String, ProvisioningFeatureDefinition> features = new Product(baseDir).getFeatureDefinitions();
            for (ProvisioningFeatureDefinition fd : features.values()) {
                if (fd.isKernel()) {
                    if (requiredByJar(br, fd, b))
                        return true;
                }
            }
        } catch (Exception e) {
        }
        return false;
    }