@Override
    protected void addMetadata(String value) {
        LOG.trace("adding {}={}", name, value);
        if (targetProperty != null && targetProperty.isMultiValuePermitted()) {
            if ((value != null && value.length() > 0) || allowEmptyValues) {
                if (value == null || value.isEmpty() && allowEmptyValues) {
                    value = "";
                }
                String[] previous = metadata.getValues(name);
                if (previous == null || !Arrays.asList(previous).contains(value) ||
                        allowDuplicateValues) {
                    metadata.add(targetProperty, value);
                }
            }
        } else {
            super.addMetadata(value);
        }
    }
Constructor for Property metadata keys which allows change of behavior
for duplicate and empty entry values.

@param uri                  the uri of the namespace of the element
@param localName            the local name of the element
@param metadata             the Tika metadata object to populate
@param targetProperty       the Tika metadata Property key
@param allowDuplicateValues add duplicate values to the Tika metadata
@param allowEmptyValues     add empty values to the Tika metadata
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-xml-module/src/main/java/org/apache/tika/parser/xml/ElementMetadataHandler.java