master #59

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

View File

@ -202,12 +202,13 @@ public abstract class AbstractMdRecordToOafMapper {
final OafEntity entity = createEntity(doc, type, instances, collectedFrom, info, lastUpdateTimestamp); final OafEntity entity = createEntity(doc, type, instances, collectedFrom, info, lastUpdateTimestamp);
if (!forceOriginalId) {
final String id = IdentifierFactory.createIdentifier(entity, shouldHashId);
if (!id.equals(entity.getId())) {
final Set<String> originalId = Sets.newHashSet(entity.getOriginalId()); final Set<String> originalId = Sets.newHashSet(entity.getOriginalId());
originalId.add(entity.getId()); originalId.add(entity.getId());
entity.setOriginalId(Lists.newArrayList(originalId)); entity.setOriginalId(Lists.newArrayList(originalId));
if (!forceOriginalId) {
final String id = IdentifierFactory.createIdentifier(entity, shouldHashId);
if (!id.equals(entity.getId())) {
entity.setId(id); entity.setId(id);
} }
} }