using objectSubType as originalType in Crossref2Oaf, code formatting
This commit is contained in:
parent
622fafbd2e
commit
33cb483c75
|
@ -176,7 +176,8 @@ object DataciteToOAFTransformation {
|
||||||
vocabularies.getSynonymAsQualifier(
|
vocabularies.getSynonymAsQualifier(
|
||||||
ModelConstants.DNET_RESULT_TYPOLOGIES,
|
ModelConstants.DNET_RESULT_TYPOLOGIES,
|
||||||
typeQualifier.getClassid
|
typeQualifier.getClassid
|
||||||
), resourceType
|
),
|
||||||
|
resourceType
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (schemaOrg != null && schemaOrg.nonEmpty) {
|
if (schemaOrg != null && schemaOrg.nonEmpty) {
|
||||||
|
@ -188,7 +189,8 @@ object DataciteToOAFTransformation {
|
||||||
vocabularies.getSynonymAsQualifier(
|
vocabularies.getSynonymAsQualifier(
|
||||||
ModelConstants.DNET_RESULT_TYPOLOGIES,
|
ModelConstants.DNET_RESULT_TYPOLOGIES,
|
||||||
typeQualifier.getClassid
|
typeQualifier.getClassid
|
||||||
), schemaOrg
|
),
|
||||||
|
schemaOrg
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -203,7 +205,8 @@ object DataciteToOAFTransformation {
|
||||||
vocabularies.getSynonymAsQualifier(
|
vocabularies.getSynonymAsQualifier(
|
||||||
ModelConstants.DNET_RESULT_TYPOLOGIES,
|
ModelConstants.DNET_RESULT_TYPOLOGIES,
|
||||||
typeQualifier.getClassid
|
typeQualifier.getClassid
|
||||||
), resourceTypeGeneral
|
),
|
||||||
|
resourceTypeGeneral
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -228,7 +231,6 @@ object DataciteToOAFTransformation {
|
||||||
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
|
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
|
||||||
|
|
|
@ -593,7 +593,6 @@ object BioDBToOAF {
|
||||||
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
|
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
|
||||||
i.setInstanceTypeMapping(List(itm).asJava)
|
i.setInstanceTypeMapping(List(itm).asJava)
|
||||||
|
|
||||||
|
|
||||||
i.setCollectedfrom(collectedFromMap("ebi"))
|
i.setCollectedfrom(collectedFromMap("ebi"))
|
||||||
d.setInstance(List(i).asJava)
|
d.setInstance(List(i).asJava)
|
||||||
i.setDateofacceptance(
|
i.setDateofacceptance(
|
||||||
|
|
|
@ -205,8 +205,7 @@ object PubMedToOaf {
|
||||||
itm.setOriginalType(i_type.get._1)
|
itm.setOriginalType(i_type.get._1)
|
||||||
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
|
itm.setVocabularyName(ModelConstants.OPENAIRE_COAR_RESOURCE_TYPES_3_1)
|
||||||
pubmedInstance.setInstanceTypeMapping(List(itm).asJava)
|
pubmedInstance.setInstanceTypeMapping(List(itm).asJava)
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
val result = createResult(pubmedInstance.getInstancetype, vocabularies)
|
val result = createResult(pubmedInstance.getInstancetype, vocabularies)
|
||||||
|
|
|
@ -372,7 +372,7 @@ case object Crossref2Oaf {
|
||||||
objectType,
|
objectType,
|
||||||
mappingCrossrefSubType.getOrElse(objectSubType, "0038 Other literature type")
|
mappingCrossrefSubType.getOrElse(objectSubType, "0038 Other literature type")
|
||||||
)
|
)
|
||||||
mappingResult(result, json, cOBJCategory, originalType)
|
mappingResult(result, json, cOBJCategory, objectSubType)
|
||||||
if (result == null || result.getId == null)
|
if (result == null || result.getId == null)
|
||||||
return List()
|
return List()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue