COAR based resource types & Irish tender #350
No reviewers
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
RDGraph
RSAC
wontfix
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: D-Net/dnet-hadoop#350
Loading…
Reference in New Issue
No description provided.
Delete Branch "resource_types"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR introduces support for
The mapping populates the
instance.instanceTypeMapping
field by looking for the original types in the transformed records. When the relative xpaths doesn't resolve to any literal, then it is not possible to produce any entry to include in theinstanceTypeMapping
list. Otherwise the mapping proceeds as followsopenaire::coar_resource_types_3_1
for a term, given the original resource type as a synonym. When found, the term is created, when not found, the original type is included in the entry anyway for further analysis and support the refinement of the entries in the vocabulary;openaire::coar_resource_types_3_1
is used to lookup for the relative user term in the vocabularyopenaire::user_resource_types
;Furthermore, the mapping populates the
result.metaResourceType
based on theinstanceTypeMaping
entry associated with the vocabularyopenaire::coar_resource_types_3_1
, by means of the vocabulary namedopenaire::meta_resource_types
.For further reference, the PR for introducing the changes in the model is defined in D-Net/dhp-schemas#25.
@ -138,0 +143,4 @@
final Vocabulary vocabulary = vocs.get(vocId.toLowerCase());
return Optional
.ofNullable(vocabulary.getTerm(syn))
It looks like vocs.get(vocId.toLowerCase()) too had to be wrapped into an Optional to prevent NullPointerException
Nice catch, I'm going to make it more NPE-safe. Thanks!
This PR addressed so far the application of the revised resource type mappings to the contents acquired from the aggregation system. It doesn't cover yet the results which get their way into the graph in the form of actionsets, thus more work is necessary to update the relative mapping implementations.
So, we found a compromise solution that @sandro.labruzzo and I believe is viable for the time being
originalType
field in a singleinstanceTypeMapping
elementeu.dnetlib.dhp.oa.merge.GroupEntitiesSparkJob
Below the implementation of a function that can be used to apply the cleaning.
@sandro.labruzzo I moved the application of the COAR based vocabularies in the
GroupEntitiesSparkJob
mentioned above. It assumes to find one element in theinstance[].instanceTypeMapping[]
list with two fields setoriginalType
=[whatever comes from the source]
// the only restriction is that we support a single value herevocabularyName
="openaire::coar_resource_types_3_1"
// fromeu.dnetlib.dhp.schema.common.ModelConstants#OPENAIRE_COAR_RESOURCE_TYPES_3_1
I'm waiting your contribution on adapting each of the actionset generating procedures for the following sources
I made a fresh checkout of the branch and installed dhp-schemas from the master, and it doesn't compile. Please @claudio.atzori check the dependencies to dhp-schemas and the current version of the snapshot deployed on nexus.
Thanks Sandro. The dhp-schemas version to use is 4.17.2 and I'm going to resolve the conflict locally.