mapping relationship from trasformed records based on oaf:relation #219

Merged
claudio.atzori merged 3 commits from oaf_relation_mapping into beta 2022-06-16 09:27:19 +02:00

Transformed records in the aggregation system might expose relationships pointing to other entities that do exist in the graph. However, the XML element carrying this information was never defined in a uniform way, leading to the presence of several ways to express this information.

With the occasion of introducing the result-organization (affiliation) relations from the CNR Explora (aka. People) we took the opportunity to base this relation types on a common, extendible format, that could be hopefully adopted also to represent other relation types.

As for today, the XML representation for the affiliation links is based on the example below.

<oaf:relation relClass="hasAuthorInstitution"
              relType="resultOrganization"
              subRelType="affiliation">ror_________::https://ror.org/02gdcn153</oaf:relation>

This approach is almost fine, but misses an important information: the target entity type. It could be desumed by the relType attribute, but it would not be a very robust approach, it would be better to introduce yet another attribute to declare it explocitly, so that the implementation of the mapping can be straightforward.

Transformed records in the aggregation system might expose relationships pointing to other entities that do exist in the graph. However, the XML element carrying this information was never defined in a uniform way, leading to the presence of several ways to express this information. With the occasion of introducing the result-organization (affiliation) relations from the [CNR Explora (aka. People)](https://beta.services.openaire.eu/is/mvc/ui/repoApis.do#/api/openaire____::cnr_explora/api_________::openaire____::cnr_explora::oai/ALL/ALL) we took the opportunity to base this relation types on a common, extendible format, that could be hopefully adopted also to represent other relation types. As for today, the XML representation for the affiliation links is based on the example below. ``` <oaf:relation relClass="hasAuthorInstitution" relType="resultOrganization" subRelType="affiliation">ror_________::https://ror.org/02gdcn153</oaf:relation> ``` This approach is almost fine, but misses an important information: the target entity type. It could be desumed by the `relType` attribute, but it would not be a very robust approach, it would be better to introduce yet another attribute to declare it explocitly, so that the implementation of the mapping can be straightforward.
claudio.atzori added the
enhancement
label 2022-06-13 14:43:18 +02:00
alessia.bardi was assigned by claudio.atzori 2022-06-13 14:43:18 +02:00
miriam.baglioni was assigned by claudio.atzori 2022-06-13 14:43:18 +02:00
michele.artini was assigned by claudio.atzori 2022-06-13 14:43:18 +02:00
claudio.atzori added 1 commit 2022-06-13 14:43:19 +02:00
claudio.atzori requested review from alessia.bardi 2022-06-13 14:46:56 +02:00
claudio.atzori requested review from miriam.baglioni 2022-06-13 14:46:56 +02:00
claudio.atzori requested review from michele.artini 2022-06-13 14:47:05 +02:00
claudio.atzori added 1 commit 2022-06-14 08:49:10 +02:00
miriam.baglioni reviewed 2022-06-14 12:06:17 +02:00
@ -281,0 +298,4 @@
final String validationdDate = ((Node) o).valueOf("@validationDate");
if (StringUtils.isNotBlank(target)) {
final String targetType = element.attributeValue("targetType");

you here assume the attribute targetType will be in the result once this method will run. Is it correct?

you here assume the attribute targetType will be in the result once this method will run. Is it correct?
Author
Owner

We assume the presence of the targetType attribute is part of the oaf:relation specification, just like the other attributes. I suppose it is reasonable to assume to know, when defining the transformation rules, the main entity type at which a relationsh will refer to.

We assume the presence of the `targetType` attribute is part of the `oaf:relation` specification, just like the other attributes. I suppose it is reasonable to assume to know, when defining the transformation rules, the main entity type at which a relationsh will refer to.

The PR can be integrated given the information in the transformed records will contain also the targetType attribute.

The PR can be integrated given the information in the transformed records will contain also the targetType attribute.
claudio.atzori added 1 commit 2022-06-16 09:27:03 +02:00
claudio.atzori merged commit 875ae29961 into beta 2022-06-16 09:27:19 +02:00
Sign in to join this conversation.
No description provided.