Project

General

Profile

« Previous | Next » 

Revision 7273

use the localId for obsoletes/obsoletedBy ORE system metadata (https://redmine.dataone.org/issues/2964)

View differences:

src/edu/ucsb/nceas/metacat/dataone/SystemMetadataFactory.java
539 539
							resourceMapSysMeta.setObsoletedBy(null);
540 540
							// look up the resource map that this one obsoletes
541 541
							if (sysMeta.getObsoletes() != null) {
542
								// use the localId in case we have a DOI
543
								String obsoletesLocalId = IdentifierManager.getInstance().getLocalId(sysMeta.getObsoletes().getValue());
542 544
								Identifier resourceMapObsoletes = new Identifier();
543
								resourceMapObsoletes.setValue(resourceMapPrefix + sysMeta.getObsoletes().getValue());
545
								resourceMapObsoletes.setValue(resourceMapPrefix + obsoletesLocalId );
544 546
								resourceMapSysMeta.setObsoletes(resourceMapObsoletes);
545 547
								SystemMetadata resourceMapObsoletesSystemMetadata = HazelcastService.getInstance().getSystemMetadataMap().get(resourceMapObsoletes);
546 548
								if (resourceMapObsoletesSystemMetadata != null) {
......
550 552
							}
551 553
							// look up the resource map that this one is obsoletedBy
552 554
							if (sysMeta.getObsoletedBy() != null) {
555
								// use the localId in case we have a DOI
556
								String obsoletedByLocalId = IdentifierManager.getInstance().getLocalId(sysMeta.getObsoletedBy().getValue());
553 557
								Identifier resourceMapObsoletedBy = new Identifier();
554
								resourceMapObsoletedBy.setValue(resourceMapPrefix + sysMeta.getObsoletedBy().getValue());
558
								resourceMapObsoletedBy.setValue(resourceMapPrefix + obsoletedByLocalId);
555 559
								resourceMapSysMeta.setObsoletedBy(resourceMapObsoletedBy);
556 560
								SystemMetadata resourceMapObsoletedBySystemMetadata = HazelcastService.getInstance().getSystemMetadataMap().get(resourceMapObsoletedBy);
557 561
								if (resourceMapObsoletedBySystemMetadata != null) {

Also available in: Unified diff