Revision 8267
Added by ben leinfelder about 11 years ago
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java | ||
---|---|---|
335 | 335 |
throw new InvalidRequest("1202", |
336 | 336 |
"The previous identifier has already been made obsolete by: " + existingObsoletedBy.getValue()); |
337 | 337 |
} |
338 |
|
|
339 |
// add the newPid to the obsoletedBy list for the existing sysmeta |
|
340 |
existingSysMeta.setObsoletedBy(newPid); |
|
341 | 338 |
|
342 |
// then update the existing system metadata |
|
343 |
updateSystemMetadata(existingSysMeta); |
|
344 |
|
|
345 |
// prep the new system metadata, add pid to the affected lists |
|
346 |
sysmeta.setObsoletes(pid); |
|
347 |
//sysmeta.addDerivedFrom(pid); |
|
348 |
|
|
349 | 339 |
isScienceMetadata = isScienceMetadata(sysmeta); |
350 | 340 |
|
351 | 341 |
// do we have XML metadata or a data object? |
... | ... | |
378 | 368 |
localId = insertDataObject(object, newPid, session); |
379 | 369 |
|
380 | 370 |
} |
371 |
|
|
372 |
// add the newPid to the obsoletedBy list for the existing sysmeta |
|
373 |
existingSysMeta.setObsoletedBy(newPid); |
|
381 | 374 |
|
375 |
// then update the existing system metadata |
|
376 |
updateSystemMetadata(existingSysMeta); |
|
377 |
|
|
378 |
// prep the new system metadata, add pid to the affected lists |
|
379 |
sysmeta.setObsoletes(pid); |
|
380 |
//sysmeta.addDerivedFrom(pid); |
|
381 |
|
|
382 | 382 |
// and insert the new system metadata |
383 | 383 |
insertSystemMetadata(sysmeta); |
384 | 384 |
|
Also available in: Unified diff
do not modify existing SystemMetadata on MN.update() if something goes wrong during content insertion. https://projects.ecoinformatics.org/ecoinfo/issues/6101