1
0
Fork 0

code formatting

This commit is contained in:
Claudio Atzori 2024-11-15 09:16:51 +01:00
parent b95672b420
commit 5f512f510e
1 changed files with 15 additions and 11 deletions

View File

@ -155,7 +155,8 @@ public abstract class AbstractMdRecordToOafMapper {
final Instance instance = prepareInstances(doc, entityInfo, collectedFrom, hostedBy);
if (!Optional.ofNullable(instance.getInstancetype())
if (!Optional
.ofNullable(instance.getInstancetype())
.map(Qualifier::getClassid)
.filter(StringUtils::isNotBlank)
.isPresent()) {
@ -173,10 +174,13 @@ public abstract class AbstractMdRecordToOafMapper {
protected String getResultType(final Instance instance) {
if (this.vocs.vocabularyExists(ModelConstants.DNET_RESULT_TYPOLOGIES)) {
return Optional.ofNullable(instance.getInstancetype())
return Optional
.ofNullable(instance.getInstancetype())
.map(Qualifier::getClassid)
.map(instanceType -> Optional
.ofNullable(this.vocs.getSynonymAsQualifier(ModelConstants.DNET_RESULT_TYPOLOGIES, instanceType))
.map(
instanceType -> Optional
.ofNullable(
this.vocs.getSynonymAsQualifier(ModelConstants.DNET_RESULT_TYPOLOGIES, instanceType))
.map(Qualifier::getClassid)
.orElse("0000"))
.orElse("0000");