master #59

Closed
claudio.atzori wants to merge 3221 commits from master into stable_ids
1 changed files with 3 additions and 4 deletions
Showing only changes of commit 0892cad4e8 - Show all commits

View File

@ -83,9 +83,8 @@ object ORCIDToOAF {
JObject(extIds) <- json \ "workDetail" \"extIds"
JField("type", JString(typeValue)) <- extIds
JField("value", JString(value)) <- extIds
normalized_value: String = DoiBoostMappingUtil.normalizeDoi(value)
if "doi".equalsIgnoreCase(typeValue) && normalized_value != null
} yield (typeValue, normalized_value)
if "doi".equalsIgnoreCase(typeValue)
} yield (typeValue, DoiBoostMappingUtil.normalizeDoi(value))
if (doi.nonEmpty) {
return doi.map(l =>OrcidWork(oid, l._2))
}
@ -103,7 +102,7 @@ object ORCIDToOAF {
def convertTOOAF(input:ORCIDItem) :Publication = {
val doi = input.doi
val pub:Publication = new Publication
pub.setPid(List(createSP(doi.toLowerCase, "doi", ModelConstants.DNET_PID_TYPES)).asJava)
pub.setPid(List(createSP(doi, "doi", ModelConstants.DNET_PID_TYPES)).asJava)
pub.setDataInfo(generateDataInfo())
pub.setId(IdentifierFactory.createDOIBoostIdentifier(pub))