@@ -1356,7 +1356,7 @@ private Response doSave(String json, InputStream file, FormDataContentDispositio
13561356
13571357 em .getTransaction ().begin ();
13581358
1359- removeRiDups (md );
1359+ performDataNormalization (md );
13601360
13611361 md .setWorkflowStatus (Status .Saved ); // default to this
13621362 md .setOwner (user .getEmail ()); // this User should OWN it
@@ -1462,7 +1462,7 @@ private Response doSubmit(String json, InputStream file, FormDataContentDisposit
14621462
14631463 em .getTransaction ().begin ();
14641464
1465- removeRiDups (md );
1465+ performDataNormalization (md );
14661466
14671467 // set the ownership and workflow status
14681468 md .setOwner (user .getEmail ());
@@ -1650,7 +1650,7 @@ private Response doAnnounce(String json, InputStream file, FormDataContentDispos
16501650
16511651 em .getTransaction ().begin ();
16521652
1653- removeRiDups (md );
1653+ performDataNormalization (md );
16541654
16551655 // set the OWNER
16561656 md .setOwner (user .getEmail ());
@@ -2160,6 +2160,15 @@ private void removeRiDups(DOECodeMetadata md) {
21602160 }
21612161 }
21622162
2163+ /**
2164+ * Normalize certain aspects of the data prior to storage.
2165+ *
2166+ * @param md the Metadata to normalize
2167+ */
2168+ private void performDataNormalization (DOECodeMetadata md ) {
2169+ removeRiDups (md );
2170+ }
2171+
21632172 /**
21642173 * Store a File to a specific directory location. All files associated with
21652174 * a CODEID are stored in the same folder.
0 commit comments