Project

General

Profile

« Previous | Next » 

Revision 6451

check if system metadata exists rather than just the id mapping (before creating the entry)

View differences:

src/edu/ucsb/nceas/metacat/dataone/hazelcast/HazelcastService.java
308 308
				// need to pull the entry into the local store
309 309
				logMetacat.debug("Saving entry locally: " + event.getKey().getValue());
310 310
				try {
311
					if (!IdentifierManager.getInstance().identifierExists(event.getKey().getValue())) {
311
					if (!IdentifierManager.getInstance().systemMetadataExists(event.getKey().getValue())) {
312 312
						IdentifierManager.getInstance().createSystemMetadata(event.getValue());
313 313
					} else {
314 314
						IdentifierManager.getInstance().updateSystemMetadata(event.getValue());
src/edu/ucsb/nceas/metacat/dataone/hazelcast/SystemMetadataMap.java
41 41
	public void store(Identifier pid, SystemMetadata sm) {
42 42
		try {
43 43
			//System.out.println("Storing System Metadata to store: " + pid.getValue());
44
			if (!IdentifierManager.getInstance().identifierExists(pid.getValue())) {
44
			if (!IdentifierManager.getInstance().systemMetadataExists(pid.getValue())) {
45 45
				IdentifierManager.getInstance().createSystemMetadata(sm);
46 46
			} else {
47 47
				IdentifierManager.getInstance().updateSystemMetadata(sm);

Also available in: Unified diff