added vocabulary in instanceTypeMapping for

- DOIBoost
- Datacite
- PubMed
- Scholexplorer Datasource
This commit is contained in:
Sandro La Bruzzo 2023-11-29 13:15:43 +01:00
parent c96ff54b45
commit 86b5775e08
4 changed files with 10 additions and 0 deletions

View File

@ -225,8 +225,10 @@ object DataciteToOAFTransformation {
// ADD ORIGINAL TYPE // ADD ORIGINAL TYPE
val itm = new InstanceTypeMapping val itm = new InstanceTypeMapping
itm.setOriginalType(typeQualifiers._3) itm.setOriginalType(typeQualifiers._3)
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
i.setInstanceTypeMapping(List(itm).asJava) i.setInstanceTypeMapping(List(itm).asJava)
typeQualifiers._2.getClassname match { typeQualifiers._2.getClassname match {
case "dataset" => case "dataset" =>
val r = new OafDataset val r = new OafDataset

View File

@ -187,6 +187,7 @@ object BioDBToOAF {
) )
val itm = new InstanceTypeMapping val itm = new InstanceTypeMapping
itm.setOriginalType(input.pidType) itm.setOriginalType(input.pidType)
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
i.setInstanceTypeMapping(List(itm).asJava) i.setInstanceTypeMapping(List(itm).asJava)
} else { } else {
i.setInstancetype( i.setInstancetype(
@ -199,6 +200,7 @@ object BioDBToOAF {
) )
val itm = new InstanceTypeMapping val itm = new InstanceTypeMapping
itm.setOriginalType("Bioentity") itm.setOriginalType("Bioentity")
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
i.setInstanceTypeMapping(List(itm).asJava) i.setInstanceTypeMapping(List(itm).asJava)
} }
@ -274,6 +276,7 @@ object BioDBToOAF {
) )
val itm = new InstanceTypeMapping val itm = new InstanceTypeMapping
itm.setOriginalType("Bioentity") itm.setOriginalType("Bioentity")
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
i.setInstanceTypeMapping(List(itm).asJava) i.setInstanceTypeMapping(List(itm).asJava)
i.setCollectedfrom(collectedFromMap("uniprot")) i.setCollectedfrom(collectedFromMap("uniprot"))
@ -483,6 +486,7 @@ object BioDBToOAF {
) )
val itm = new InstanceTypeMapping val itm = new InstanceTypeMapping
itm.setOriginalType("Bioentity") itm.setOriginalType("Bioentity")
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
i.setInstanceTypeMapping(List(itm).asJava) i.setInstanceTypeMapping(List(itm).asJava)
i.setCollectedfrom(collectedFromMap("pdb")) i.setCollectedfrom(collectedFromMap("pdb"))
@ -586,6 +590,7 @@ object BioDBToOAF {
) )
val itm = new InstanceTypeMapping val itm = new InstanceTypeMapping
itm.setOriginalType("Bioentity") itm.setOriginalType("Bioentity")
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
i.setInstanceTypeMapping(List(itm).asJava) i.setInstanceTypeMapping(List(itm).asJava)

View File

@ -191,6 +191,7 @@ object PubMedToOaf {
// ADD ORIGINAL TYPE to the publication // ADD ORIGINAL TYPE to the publication
val itm = new InstanceTypeMapping val itm = new InstanceTypeMapping
itm.setOriginalType(ja.get.getValue) itm.setOriginalType(ja.get.getValue)
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
pubmedInstance.setInstanceTypeMapping(List(itm).asJava) pubmedInstance.setInstanceTypeMapping(List(itm).asJava)
} else { } else {
val i_type = article.getPublicationTypes.asScala val i_type = article.getPublicationTypes.asScala
@ -202,6 +203,7 @@ object PubMedToOaf {
// ADD ORIGINAL TYPE to the publication // ADD ORIGINAL TYPE to the publication
val itm = new InstanceTypeMapping val itm = new InstanceTypeMapping
itm.setOriginalType(i_type.get._1) itm.setOriginalType(i_type.get._1)
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
pubmedInstance.setInstanceTypeMapping(List(itm).asJava) pubmedInstance.setInstanceTypeMapping(List(itm).asJava)
} }
else else

View File

@ -286,6 +286,7 @@ case object Crossref2Oaf {
//ADD ORIGINAL TYPE to the mapping //ADD ORIGINAL TYPE to the mapping
val itm = new InstanceTypeMapping val itm = new InstanceTypeMapping
itm.setOriginalType(originalType) itm.setOriginalType(originalType)
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
instance.setInstanceTypeMapping(List(itm).asJava) instance.setInstanceTypeMapping(List(itm).asJava)
result.setResourcetype( result.setResourcetype(
OafMapperUtils.qualifier( OafMapperUtils.qualifier(