Revision 6971
Added by ben leinfelder almost 13 years ago
src/edu/ucsb/nceas/metacat/dataone/SystemMetadataFactory.java | ||
---|---|---|
250 | 250 |
|
251 | 251 |
// update the system metadata for the object[s] we are revising |
252 | 252 |
if (obsoletedBy != null) { |
253 |
//SystemMetadata obsoletedBySysMeta = HazelcastService.getInstance().getSystemMetadataMap().get(obsoletedBy); |
|
254 |
SystemMetadata obsoletedBySysMeta = IdentifierManager.getInstance().getSystemMetadata(obsoletedBy.getValue()); |
|
253 |
SystemMetadata obsoletedBySysMeta = null; |
|
254 |
try { |
|
255 |
//obsoletedBySysMeta = HazelcastService.getInstance().getSystemMetadataMap().get(obsoletedBy); |
|
256 |
obsoletedBySysMeta = IdentifierManager.getInstance().getSystemMetadata(obsoletedBy.getValue()); |
|
257 |
} catch (McdbDocNotFoundException e) { |
|
258 |
// ignore |
|
259 |
} |
|
255 | 260 |
if (obsoletedBySysMeta != null) { |
256 | 261 |
obsoletedBySysMeta.setObsoletes(identifier); |
257 | 262 |
HazelcastService.getInstance().getSystemMetadataMap().put(obsoletedBy, obsoletedBySysMeta); |
258 | 263 |
} |
259 | 264 |
} |
260 | 265 |
if (obsoletes != null) { |
261 |
//SystemMetadata obsoletesSysMeta = HazelcastService.getInstance().getSystemMetadataMap().get(obsoletes); |
|
262 |
SystemMetadata obsoletesSysMeta = IdentifierManager.getInstance().getSystemMetadata(obsoletes.getValue()); |
|
266 |
SystemMetadata obsoletesSysMeta = null; |
|
267 |
try { |
|
268 |
//obsoletesSysMeta = HazelcastService.getInstance().getSystemMetadataMap().get(obsoletes); |
|
269 |
obsoletesSysMeta = IdentifierManager.getInstance().getSystemMetadata(obsoletes.getValue()); |
|
270 |
} catch (McdbDocNotFoundException e) { |
|
271 |
// ignore |
|
272 |
} |
|
263 | 273 |
if (obsoletesSysMeta != null) { |
264 | 274 |
obsoletesSysMeta.setObsoletedBy(identifier); |
265 | 275 |
obsoletesSysMeta.setArchived(true); |
Also available in: Unified diff
catch cases where the previous/next revision of objects have not had system metadata generated yet