Revision 6097
Added by ben leinfelder almost 13 years ago
ReplicationHandler.java | ||
---|---|---|
53 | 53 |
import java.text.*; |
54 | 54 |
|
55 | 55 |
import org.apache.log4j.Logger; |
56 |
import org.dataone.service.types.SystemMetadata; |
|
56 | 57 |
import org.xml.sax.ContentHandler; |
57 | 58 |
import org.xml.sax.ErrorHandler; |
58 | 59 |
import org.xml.sax.InputSource; |
... | ... | |
453 | 454 |
idman.createSystemMetadataMapping(guid, docinfoHash.get("docid")); |
454 | 455 |
} |
455 | 456 |
|
456 |
Long dateUploadedLong = new Long(docinfoHash.get("date_uploaded"));
|
|
457 |
Long dateModifiedLong = new Long(docinfoHash.get("date_modified"));
|
|
458 |
idman.insertAdditionalSystemMetadataFields(
|
|
459 |
dateUploadedLong.longValue(),
|
|
457 |
Date dateUploaded = new Date(new Long(docinfoHash.get("date_uploaded")));
|
|
458 |
Date dateModified = new Date(new Long(docinfoHash.get("date_modified")));
|
|
459 |
SystemMetadata sysMeta = IdentifierManager.getInstance().asSystemMetadata(
|
|
460 |
dateUploaded, |
|
460 | 461 |
docinfoHash.get("rights_holder"), |
461 | 462 |
docinfoHash.get("checksum"), |
462 | 463 |
docinfoHash.get("checksum_algorithm"), |
463 | 464 |
docinfoHash.get("origin_member_node"), |
464 | 465 |
docinfoHash.get("authoritive_member_node"), |
465 |
dateModifiedLong.longValue(),
|
|
466 |
dateModified, |
|
466 | 467 |
docinfoHash.get("submitter"), |
467 | 468 |
docinfoHash.get("guid"), |
468 | 469 |
docinfoHash.get("object_format"), |
469 | 470 |
new Long(docinfoHash.get("size")).longValue()); |
471 |
IdentifierManager.getInstance().insertAdditionalSystemMetadataFields(sysMeta); |
|
472 |
|
|
470 | 473 |
System.out.println("4"); |
471 | 474 |
} |
472 | 475 |
|
Also available in: Unified diff
do not use XML files for storing SystemMetadata - use DB tables only.