rel_project_validation #69

Merged
claudio.atzori merged 3 commits from rel_project_validation into master 2020-12-09 19:01:21 +01:00
1 changed files with 12 additions and 0 deletions
Showing only changes of commit 1bc9adc10d - Show all commits

View File

@ -75,6 +75,8 @@ public abstract class AbstractMdRecordToOafMapper {
protected static final Qualifier MAG_PID_TYPE = qualifier( protected static final Qualifier MAG_PID_TYPE = qualifier(
"MAGIdentifier", "Microsoft Academic Graph Identifier", DNET_PID_TYPES, DNET_PID_TYPES); "MAGIdentifier", "Microsoft Academic Graph Identifier", DNET_PID_TYPES, DNET_PID_TYPES);
protected static final String DEFAULT_TRUST_FOR_VALIDATED_RELS = "0.999";
protected static final Map<String, String> nsContext = new HashMap<>(); protected static final Map<String, String> nsContext = new HashMap<>();
static { static {
@ -279,6 +281,16 @@ public abstract class AbstractMdRecordToOafMapper {
source, target, relType, subRelType, relClass, collectedFrom, info, lastUpdateTimestamp); source, target, relType, subRelType, relClass, collectedFrom, info, lastUpdateTimestamp);
r.setValidated(StringUtils.isNotBlank(validationDate)); r.setValidated(StringUtils.isNotBlank(validationDate));
r.setValidationDate(StringUtils.isNotBlank(validationDate) ? validationDate : null); r.setValidationDate(StringUtils.isNotBlank(validationDate) ? validationDate : null);
if (StringUtils.isNotBlank(validationDate)) {
r.setValidated(true);
r.setValidationDate(validationDate);
r.getDataInfo().setTrust(DEFAULT_TRUST_FOR_VALIDATED_RELS);
} else {
r.setValidated(false);
r.setValidationDate(null);
}
return r; return r;
} }