Changes

Summary

  1. fix(cleaning): restore the null instance.license for missing information, clean the license in the 2nd use only (details)
Commit cb81e4a56a5cb4fec63b4b404abf691a6bcd95e7 by Claudio Atzori
fix(cleaning): restore the null instance.license for missing information, clean the license in the 2nd use only

The UNKNOWN default introduced in instance.license is not the outcome of any cleaning, and it turned the
consumers of the field upside down: every result has a non-empty license (Solr haslicense is always true) and the
indicators built on result_licenses count it as information.

* instance.license stays populated with the term resulting from the cleaning of instance.license2 (pre-cleaning +
  dnet:licenses), but no default is set when there is nothing to populate it with: the absence of information at the
  source is null, a value that cannot be cleaned is preserved as exposed by the source
* the UNKNOWN default set by the former cleaning (value UNKNOWN, no inference provenance, no license2.original) is
  reset to null, in both uses of the cleaning workflow, before license2 is rebuilt from instance.license.
  Source-exposed UNKNOWN values (license2.original available) are preserved
* the license cleaning is performed by the 2nd use of the workflow only (deepClean=true): the instances merged
  in between the two uses don't carry over license2, so the cleaned value would be lost with the original one

Replayed on 03_graph_cleaned (output of the 1st use run from main): 532M instances reset to null, none of the other
instances changes, 15 source-exposed UNKNOWN values preserved.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The file was modifieddhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/CleanGraphSparkJob.java
The file was modifieddhp-workflows/dhp-graph-mapper/src/main/java/eu/dnetlib/dhp/oa/graph/clean/CleaningRuleMap.java
The file was modifieddhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/clean/GraphCleaningFunctionsTest.java
The file was modifieddhp-common/src/main/java/eu/dnetlib/dhp/schema/oaf/utils/GraphCleaningFunctions.java
The file was modifieddhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/clean/CleanGraphSparkJobTest.java