From ff7559eb52b709fe757b834b64c7d42080d304ab Mon Sep 17 00:00:00 2001 From: sundarvenkata-ebi Date: Thu, 16 Jun 2022 17:13:22 +0100 Subject: [PATCH] SS_SPLIT event --- .../ampt2d/commons/accession/core/models/EventType.java | 8 +++++++- .../persistence/mongodb/document/EventDocument.java | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/accession-commons-core/src/main/java/uk/ac/ebi/ampt2d/commons/accession/core/models/EventType.java b/accession-commons-core/src/main/java/uk/ac/ebi/ampt2d/commons/accession/core/models/EventType.java index c3ccfc9d..ba09e29c 100644 --- a/accession-commons-core/src/main/java/uk/ac/ebi/ampt2d/commons/accession/core/models/EventType.java +++ b/accession-commons-core/src/main/java/uk/ac/ebi/ampt2d/commons/accession/core/models/EventType.java @@ -42,5 +42,11 @@ public enum EventType { DEPRECATED, // RS ID was back-propagated from a remapped assembly - RS_BACK_PROPAGATED + RS_BACK_PROPAGATED, + + // Candidates for SS ID split + SS_SPLIT_CANDIDATES, + + // new SS ID created because of SS split - as a result of processing SS_SPLIT_CANDIDATES + SS_SPLIT } diff --git a/accession-commons-mongodb/src/main/java/uk/ac/ebi/ampt2d/commons/accession/persistence/mongodb/document/EventDocument.java b/accession-commons-mongodb/src/main/java/uk/ac/ebi/ampt2d/commons/accession/persistence/mongodb/document/EventDocument.java index a838396b..0052fe93 100644 --- a/accession-commons-mongodb/src/main/java/uk/ac/ebi/ampt2d/commons/accession/persistence/mongodb/document/EventDocument.java +++ b/accession-commons-mongodb/src/main/java/uk/ac/ebi/ampt2d/commons/accession/persistence/mongodb/document/EventDocument.java @@ -69,7 +69,7 @@ public void fill(EventType eventType, ACCESSION accessionIdOrigin, ACCESSION acc String reason, List inactiveObjects) { this.eventType = eventType; this.accession = accessionIdOrigin; - if(eventType==EventType.RS_SPLIT){ + if(eventType==EventType.RS_SPLIT || eventType == EventType.SS_SPLIT) { this.splitInto = accessionIdDestiny; }else if(eventType==EventType.MERGED){ this.mergeInto = accessionIdDestiny; @@ -133,6 +133,10 @@ public String getId() { return id; } + public void setId(String id) { + this.id = id; + } + @Override public boolean isNew() { return true;