forked from D-Net/dnet-hadoop
set the old identifier before switching to the new one
This commit is contained in:
parent
1bd70fa2c6
commit
f19feceaf0
|
@ -105,12 +105,11 @@ case object Crossref2Oaf {
|
||||||
//is replaced using IdentifierFactory, but the old identifier
|
//is replaced using IdentifierFactory, but the old identifier
|
||||||
//is preserved among the originalId(s)
|
//is preserved among the originalId(s)
|
||||||
val oldId = generateIdentifier(result, doi)
|
val oldId = generateIdentifier(result, doi)
|
||||||
|
result.setId(oldId)
|
||||||
val newId = IdentifierFactory.createIdentifier(result)
|
val newId = IdentifierFactory.createIdentifier(result)
|
||||||
|
|
||||||
if (!oldId.equalsIgnoreCase(newId)) {
|
if (!oldId.equalsIgnoreCase(newId)) {
|
||||||
result.getOriginalId.add(oldId)
|
result.getOriginalId.add(oldId)
|
||||||
}
|
}
|
||||||
|
|
||||||
result.setId(newId)
|
result.setId(newId)
|
||||||
|
|
||||||
// Add DataInfo
|
// Add DataInfo
|
||||||
|
|
Loading…
Reference in New Issue