Revision 6997
Added by ben leinfelder almost 13 years ago
src/edu/ucsb/nceas/metacat/dataone/SystemMetadataFactory.java | ||
---|---|---|
635 | 635 |
//insert the systemmetadata object or just update it as needed |
636 | 636 |
boolean exists = IdentifierManager.getInstance().systemMetadataExists(sm.getIdentifier().getValue()); |
637 | 637 |
if (!exists) { |
638 |
IdentifierManager.getInstance().createSystemMetadata(sm);
|
|
638 |
IdentifierManager.getInstance().insertSystemMetadata(sm);
|
|
639 | 639 |
logMetacat.info("Generated SystemMetadata for " + localId); |
640 | 640 |
} else { |
641 | 641 |
IdentifierManager.getInstance().updateSystemMetadata(sm); |
src/edu/ucsb/nceas/metacat/dataone/hazelcast/HazelcastService.java | ||
---|---|---|
435 | 435 |
logMetacat.debug("Saving entry locally: " + sm.getIdentifier().getValue()); |
436 | 436 |
try { |
437 | 437 |
if (!IdentifierManager.getInstance().systemMetadataExists(sm.getIdentifier().getValue())) { |
438 |
IdentifierManager.getInstance().createSystemMetadata(sm);
|
|
438 |
IdentifierManager.getInstance().insertSystemMetadata(sm);
|
|
439 | 439 |
|
440 | 440 |
} else { |
441 | 441 |
IdentifierManager.getInstance().updateSystemMetadata(sm); |
src/edu/ucsb/nceas/metacat/dataone/hazelcast/SystemMetadataMap.java | ||
---|---|---|
47 | 47 |
try { |
48 | 48 |
//System.out.println("Storing System Metadata to store: " + pid.getValue()); |
49 | 49 |
if (!IdentifierManager.getInstance().systemMetadataExists(pid.getValue())) { |
50 |
IdentifierManager.getInstance().createSystemMetadata(sm);
|
|
50 |
IdentifierManager.getInstance().insertSystemMetadata(sm);
|
|
51 | 51 |
|
52 | 52 |
} else { |
53 | 53 |
IdentifierManager.getInstance().updateSystemMetadata(sm); |
src/edu/ucsb/nceas/metacat/IdentifierManager.java | ||
---|---|---|
918 | 918 |
* @throws SQLException |
919 | 919 |
* @throws InvalidSystemMetadata |
920 | 920 |
*/ |
921 |
public void createSystemMetadata(SystemMetadata sysmeta)
|
|
921 |
public void insertSystemMetadata(SystemMetadata sysmeta)
|
|
922 | 922 |
throws McdbDocNotFoundException, SQLException, InvalidSystemMetadata { |
923 | 923 |
String guid = sysmeta.getIdentifier().getValue(); |
924 | 924 |
// insert the record |
Also available in: Unified diff
refactor IdentityManager.createSystemMetadata(sm) to be insertSystemMetadata(sm) so that it is clear that this method inserts the SM object into the backing store. This differentiates it from the "generation" methods we use when we need to create SM about pre-existing objects or objects we get from non-D1 api calls.