Initialization function
@param extensionMap mapping of {@link ProvFormat} to extensions
@param extensionRevMap reverse mapping of extensions to {@link ProvFormat}
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;

            }
        }

    }
944651
private static HashMap<String, Module> getFileExtensionMap()
	{
		if (fileExtensionMap==null)
			fileExtensionMap= new HashMap<String, Module>();
		
		return fileExtensionMap;
	}
393848
protected ExtensionProcessor getDefaultExtensionProcessor(com.ibm.ws.webcontainer.webapp.WebApp app, HashMap map)
  {
    return new com.ibm.ws.webcontainer.osgi.extension.DefaultExtensionProcessor(this, map);
  }
1160241
public void startExtension(Map<String, String> attributes) throws IOException {
        startChangesIfNecessary();
        ResponseWriter writer = getWrapped();
        writer.startElement("extension", null);
        if (attributes != null && !attributes.isEmpty()) {
            for (Map.Entry<String, String> entry : attributes.entrySet()) {
                writer.writeAttribute(entry.getKey(), entry.getValue(), null);
            }
        }
    }
43503
public PluginLoader withExtensionPoints(Class... extensionPoints) {
        this.extensionPoints.addAll(
                Stream.of(extensionPoints)
                        .distinct()
                        .collect(Collectors.<Class>toList())
        );
        return this;
    }
24510
public void registerExtensions(final Class<?>... extensions) {
        for (Class<?> extension : extensions) {
            register(ConfigItem.Extension, extension);
        }
    }
275816
protected Map<String, String> initMapping() {
		final Map<String, String> map = new TreeMap<>();
		if (!this.converterReader.initializeConversions(map, this.context) && this.initializer != null) {
			this.initializer.initializeConversions((simpleName, source, target) -> {
				map.put(source,  target);
			});
		}
		return map;
	}
331851
@Override
	public void initialize(IAggregator aggregator, IAggregatorExtension extension,
			IExtensionRegistrar registrar) {

		final String sourceMethod = "initialize"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(BundleVersionsHash.class.getName(), sourceMethod, new Object[]{aggregator, extension, registrar});
		}
		// get the name of the function from the extension attributes
		propName = extension.getInitParams().getValue("propName"); //$NON-NLS-1$
		if (propName == null) {
			propName = DEFAULT_PROPNAME;
		}
		if (isTraceLogging) {
			log.finer("propName = " + propName); //$NON-NLS-1$
		}
		if (aggregator instanceof AggregatorImpl) {		// can be an IAggregator mock when unit testing
			setContributingBundle(((AggregatorImpl)aggregator).getContributingBundle());
		}

		if (isTraceLogging) {
			log.exiting(BundleVersionsHash.class.getName(), sourceMethod);
		}
	}
335638
@VisibleForTesting
  @GwtIncompatible("Unnecessary")
  String expandSourceMapPath(B options, JSModule forModule) {
    if (Strings.isNullOrEmpty(options.sourceMapOutputPath)) {
      return null;
    }
    return expandCommandLinePath(options.sourceMapOutputPath, forModule);
  }
812370
protected Map<String,String> initializeAdditionalParameters()
    {
        //get configuration
        Map<String,String> configuration=this.getConfiguration();

        //get property part
        String propertyPart=this.getPropertyPart();
        
        //get prefix
        String prefix=FaxJob2HTTPRequestConverterConfigurationConstants.ADDITIONAL_PARAMETER_PROPERTY_KEY_PREFIX.toString();
        prefix=MessageFormat.format(prefix,propertyPart);

        //init output
        Map<String,String> additionalParametersMap=new HashMap<String,String>();
        
        Iterator<Entry<String,String>> iterator=configuration.entrySet().iterator();
        Entry<String,String> entry=null;
        String key=null;
        String value=null;
        while(iterator.hasNext())
        {
            //get next entry
            entry=iterator.next();
            
            //get next key
            key=entry.getKey();
            
            if(key!=null)
            {
                //format key
                key=MessageFormat.format(key,propertyPart);
                key=key.trim();
                
                if(key.length()>0)
                {
                    //check if additional parameter key
                    if(key.startsWith(prefix))
                    {
                        //get value
                        value=entry.getValue();
                        
                        if(value!=null)
                        {
                            value=value.trim();
                            if(value.length()>0)
                            {
                                //get updated key without prefix
                                key=key.substring(prefix.length());
                                
                                //put in map
                                additionalParametersMap.put(key,value);
                            }
                        }
                    }
                }
            }
        }
        
        return additionalParametersMap;
    }
708677
public static void registerArchiveFileProvider(Class<? extends IArchiveFile> provider, String fileExtension){
		extensionMap.put(fileExtension, provider);
	}
386697
public final Map<String, Set<String>> getExtensionMimeMap() throws OSException {
        initializeMimeExtensionArrays();
        return Collections.unmodifiableMap(extensionMime);
    }
1072297
@FFDCIgnore(Exception.class)
    protected void addStaticFilePatternMappings(RequestProcessor proxyReqProcessor) {
        String nextPattern;
        ExtensionProcessor fileExtensionProcessor = getDefaultExtensionProcessor(this, getConfiguration().getFileServingAttributes());

        List patternList = fileExtensionProcessor.getPatternList();
        Iterator patternIter = patternList.iterator();
        int globalPatternsCount = 0;
        while (patternIter.hasNext()) {
            nextPattern = (String) patternIter.next(); // PK18713
            try {
                if (proxyReqProcessor == null)
                    requestMapper.addMapping(nextPattern, fileExtensionProcessor); // PK18713
                else
                    requestMapper.addMapping(nextPattern, proxyReqProcessor);
            } catch (Exception e) {
                // Mapping clash. Log error
                // pk435011
                // LIBERTY: Fix for RTC defect 49695 -- The logging level should match the severity of the message.
                if (!!!"/*".equals(nextPattern)) {
                    logger.logp(Level.SEVERE, CLASS_NAME, "initializeStaticFileHandler", "error.adding.servlet.mapping.file.handler", nextPattern);
                } else {
                    globalPatternsCount++;
                }
            }
        }
        
        if (globalPatternsCount > 1) {
            logger.logp(Level.SEVERE, CLASS_NAME, "initializeStaticFileHandler", "error.adding.servlet.mapping.file.handler", "/*");
        }
    }
64929
public static <T extends Extension> T getExtension(Properties properties, Parameter<String> parameter, Driver d) {
        T result;
        String className = parameter.getValue(properties);
        if (className == null) {
            return null;
        }
        try {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Creating  extension " + className);
            }
            result = (T) Class.forName(className).newInstance();
            result.init(d, properties);
        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
            throw new ConfigurationException(e);
        }
        return result;
    }
375725
@Configurable
  public void setSourceExtension(String ext)
    throws ConfigException
  {
    if (! ext.startsWith("."))
      throw new ConfigException(L.l("source-extension '{0}' must begin with '.'",
                                    ext));
    
    _sourceExt = ext;
  }
799618
public final Map<String, Set<String>> getMimeExtensionMap() throws OSException {
        initializeMimeExtensionArrays();
        return Collections.unmodifiableMap(mimeExtension);
    }
799807
protected void initializeExtensionProcessors(List extensionFactories) {
        // TODO: nameSpace preinvoke/postinvoke

        if (extensionFactories == null) {
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
                    logger.logp(Level.FINE, CLASS_NAME, "initializeExtensionProcessors", "No extension processors");
            }
            return;
        } 

        // process the ExtensionFactories
        for (int i = 0; i < extensionFactories.size(); i++) {
            ExtensionFactory fac = (ExtensionFactory) extensionFactories.get(i);
            ExtensionProcessor processor = null;
            
            // Get the global patterns that this factory creates processors for
            List patterns = fac.getPatternList();
           
            // If extension processing is disabled ignore the factories which return a pattern list
            // Do this before calling createExensionPorcessor so we do not incure the overhead of the creation
            // unless needed.
            if (getExtensionProcessingDisabled() && !patterns.isEmpty()) {
                 if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {  
                     logger.logp(Level.FINE, CLASS_NAME, "initializeExtensionProcessors", "Extension factory with patterns ignored : " + fac.getClass());                   
                 }   
                 continue;
            }

            try {
                processor = fac.createExtensionProcessor(this);
                if (processor == null) {
                    if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
                        logger.logp(Level.FINE, CLASS_NAME, "initializeExtensionProcessors", "Extension factory has no processor:" + fac.getClass());
                   }

                    // if the factory returns a null processor, it means
                    // that this factory doesn't want to be associated with
                    // this particular webapp.
                    continue;
                }

            } catch (Throwable e) {
                // Extension processor failed to initialize
                com.ibm.wsspi.webcontainer.util.FFDCWrapper.processException(e, CLASS_NAME + ".initializeExtensionFactories", "883", this);
                // e.printStackTrace(System.err); @283348D
                // 435011
                logger.logp(Level.SEVERE, CLASS_NAME, "initializeExtensionProcessors", "extension.processor.failed.to.initialize.in.factory",
                            new Object[] { fac, e }); /* 283348.1 */
                continue;
            }
            
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
                logger.logp(Level.FINE, CLASS_NAME, "initializeExtensionProcessors", "Extension processor class =" + fac.getClass());
            }

            // Get the global patterns that this factory creates processors for
            Iterator it = patterns.iterator();

            StringBuffer mapStr = new StringBuffer(' ');

            while (it.hasNext()) {
                String mapping = (String) it.next();
                if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
                    logger.logp(Level.FINE, CLASS_NAME, "initializeExtensionProcessors", "Add factory mappings =" + mapping);
                }
                try {
                    requestMapper.addMapping(mapping, processor);
                    mapStr.append(mapping);
                    mapStr.append(' ');
                } catch (Exception exc) {
                    // TODO:
                    // processor already exists for specified pattern
                    // pk435011
                    logger.logp(Level.SEVERE, CLASS_NAME, "initializeExtensionProcessors", "request.processor.already.present.for.mapping", mapping);
                }
            }
            
            // Get the additional patterns that the specific extension processor
            // might want to be associated with
        
            patterns = processor.getPatternList();
            
            if (getExtensionProcessingDisabled() &&!patterns.isEmpty()) {
                if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {  
                    logger.logp(Level.FINE, CLASS_NAME, "initializeExtensionProcessors", "Extension processor with patterns ignored : " + processor.getClass());                   
                }   
            } else {    
                it = patterns.iterator();

                while (it.hasNext()) {
                    String mapping = (String) it.next();
                    if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
                        logger.logp(Level.FINE, CLASS_NAME, "initializeExtensionProcessors", "Add processor mapping =" + mapping);
                    }

                    try {
                        requestMapper.addMapping(mapping, processor);
                    } catch (Exception exc) {
                    // TODO:
                    // processor already exists for specified pattern
                    // pk435011
                    // Alex TODO: This does not seem to me to be a problem, perhaps a timing artifact at
                    // worst.  Will revisit.
            //        logger.logp(Level.SEVERE, CLASS_NAME, "initializeExtensionProcessors", "error.adding.servlet.mapping.for.servlet", new Object[] {
            //                mapping, getApplicationName(), exc });
                    }
                }
            }    
        }

    }