private void addHtmlMetadata(String name, String value) {
        //note that "name" derives from attributes and is not uppercased
        //like the elements by the XHTMLDowngradeHandler

        if (StringUtils.isBlank(name) || StringUtils.isBlank(value)) {
            return;
        }

        if (name.equalsIgnoreCase("ICBM")) {
            Matcher m = ICBM.matcher(value);
            if (m.matches()) {
                metadata.set("ICBM", m.group(1) + ", " + m.group(2));
                metadata.set(Metadata.LATITUDE, m.group(1));
                metadata.set(Metadata.LONGITUDE, m.group(2));
            } else {
                metadata.set("ICBM", value);
            }
            return;
        }

        if (name.equalsIgnoreCase(Metadata.CONTENT_TYPE)) {
            //don't overwrite Metadata.CONTENT_TYPE!
            MediaType type = MediaType.parse(value);
            if (type != null) {
                metadata.set(TikaCoreProperties.CONTENT_TYPE_HINT, type.toString());
            } else {
                metadata.set(TikaCoreProperties.CONTENT_TYPE_HINT, value);
            }
            return;
        }

        String lcName = name.toLowerCase(Locale.US);
        if (META_HEADER_MAPPINGS.containsKey(lcName)) {
            Property property = META_HEADER_MAPPINGS.get(lcName);
            if (property.equals(TikaCoreProperties.TITLE) && isTitleSetToMetadata) {
                //prefer the title element if it is already set
                //do nothing
                metadata.add(HTML.PREFIX_HTML_META + TikaCoreProperties.TITLE.getName(), value);
            } else if (property.isMultiValuePermitted()) {
                metadata.add(property, value);
            } else {
                metadata.set(property, value);
            }
        } else {
            metadata.add(HTML.PREFIX_HTML_META + name, value);
        }
    }
Adds a metadata setting from the HTML <head/> to the Tika metadata
object. The name and value are normalized where possible.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-html-module/src/main/java/org/apache/tika/parser/html/HtmlHandler.java