Revision 7122
Added by ben leinfelder over 12 years ago
src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java | ||
---|---|---|
333 | 333 |
|
334 | 334 |
} |
335 | 335 |
|
336 |
logMetacat.debug("Checking if identifier exists...");
|
|
336 |
logMetacat.debug("Checking if identifier exists: " + pid.getValue());
|
|
337 | 337 |
// Check that the identifier does not already exist |
338 | 338 |
if (IdentifierManager.getInstance().identifierExists(pid.getValue())) { |
339 | 339 |
throw new IdentifierNotUnique("1120", |
... | ... | |
356 | 356 |
|
357 | 357 |
// verify checksum, only if we can reset the inputstream |
358 | 358 |
if (object.markSupported()) { |
359 |
logMetacat.debug("Checking checksum for: " + pid.getValue()); |
|
359 | 360 |
String checksumAlgorithm = sysmeta.getChecksum().getAlgorithm(); |
360 | 361 |
String checksumValue = sysmeta.getChecksum().getValue(); |
361 | 362 |
try { |
... | ... | |
363 | 364 |
// it's very important that we don't consume the stream |
364 | 365 |
object.reset(); |
365 | 366 |
if (!computedChecksumValue.equals(checksumValue)) { |
367 |
logMetacat.error("Checksum for " + pid.getValue() + " does not match system metadata, computed = " + computedChecksumValue ); |
|
366 | 368 |
throw new InvalidSystemMetadata("4896", "Checksum given does not match that of the object"); |
367 | 369 |
} |
368 | 370 |
} catch (Exception e) { |
... | ... | |
377 | 379 |
// we have the go ahead |
378 | 380 |
if ( allowed ) { |
379 | 381 |
|
382 |
logMetacat.debug("Allowed to insert: " + pid.getValue()); |
|
383 |
|
|
380 | 384 |
// Science metadata (XML) or science data object? |
381 | 385 |
// TODO: there are cases where certain object formats are science metadata |
382 | 386 |
// but are not XML (netCDF ...). Handle this. |
... | ... | |
405 | 409 |
|
406 | 410 |
} |
407 | 411 |
|
412 |
logMetacat.debug("Done inserting new object: " + pid.getValue()); |
|
413 |
|
|
408 | 414 |
// save the sysmeta |
409 | 415 |
try { |
410 | 416 |
// lock and unlock of the pid happens in the subclass |
... | ... | |
422 | 428 |
|
423 | 429 |
resultPid = pid; |
424 | 430 |
|
431 |
logMetacat.debug("create() complete for object: " + pid.getValue()); |
|
432 |
|
|
425 | 433 |
return resultPid; |
426 | 434 |
} |
427 | 435 |
|
Also available in: Unified diff
additional debug logging for tracking down MN replication errors