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

Merged
claudio.atzori merged 3 commits from oaf_relation_mapping into beta 2 years ago
Owner

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 2 years ago
alessia.bardi was assigned by claudio.atzori 2 years ago
miriam.baglioni was assigned by claudio.atzori 2 years ago
michele.artini was assigned by claudio.atzori 2 years ago
claudio.atzori added 1 commit 2 years ago
claudio.atzori requested review from alessia.bardi 2 years ago
claudio.atzori requested review from miriam.baglioni 2 years ago
claudio.atzori requested review from michele.artini 2 years ago
claudio.atzori added 1 commit 2 years ago
miriam.baglioni reviewed 2 years ago
@ -281,0 +298,4 @@
final String validationdDate = ((Node) o).valueOf("@validationDate");
if (StringUtils.isNotBlank(target)) {
final String targetType = element.attributeValue("targetType");
Collaborator

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?
Poster
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.
Collaborator

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 2 years ago
claudio.atzori merged commit 875ae29961 into beta 2 years ago

Reviewers

miriam.baglioni was requested for review 2 years ago
alessia.bardi was requested for review 2 years ago
michele.artini was requested for review 2 years ago
The pull request has been merged as 875ae29961.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b oaf_relation_mapping beta
git pull origin oaf_relation_mapping

Step 2:

Merge the changes and update on Gitea.
git checkout beta
git merge --no-ff oaf_relation_mapping
git push origin beta
Sign in to join this conversation.
Loading…
There is no content yet.