Revision 6519
Added by ben leinfelder about 13 years ago
src/edu/ucsb/nceas/metacat/IdentifierManager.java | ||
---|---|---|
285 | 285 |
checksumObject.setValue(checksum); |
286 | 286 |
checksumObject.setAlgorithm(checksumAlgorithm); |
287 | 287 |
sysMeta.setChecksum(checksumObject); |
288 |
NodeReference omn = new NodeReference(); |
|
289 |
omn.setValue(originMemberNode); |
|
290 |
sysMeta.setOriginMemberNode(omn); |
|
291 |
NodeReference amn = new NodeReference(); |
|
292 |
amn.setValue(authoritativeMemberNode); |
|
293 |
sysMeta.setAuthoritativeMemberNode(amn); |
|
288 |
if (originMemberNode != null) { |
|
289 |
NodeReference omn = new NodeReference(); |
|
290 |
omn.setValue(originMemberNode); |
|
291 |
sysMeta.setOriginMemberNode(omn); |
|
292 |
} |
|
293 |
if (authoritativeMemberNode != null) { |
|
294 |
NodeReference amn = new NodeReference(); |
|
295 |
amn.setValue(authoritativeMemberNode); |
|
296 |
sysMeta.setAuthoritativeMemberNode(amn); |
|
297 |
} |
|
294 | 298 |
sysMeta.setDateSysMetadataModified(dateModified); |
295 | 299 |
Subject submitterSubject = new Subject(); |
296 | 300 |
submitterSubject.setValue(submitter); |
... | ... | |
1563 | 1567 |
} |
1564 | 1568 |
oi.setChecksum(cs); |
1565 | 1569 |
|
1566 |
try { |
|
1567 |
oi.setFmtid(ObjectFormatCache.getInstance().getFormat(fmtidStr).getFmtid()); |
|
1568 |
} catch (NotFound e) { |
|
1569 |
logMetacat.error("could not find object format: " + fmtidStr, e); |
|
1570 |
// skip this one |
|
1571 |
continue; |
|
1572 |
} |
|
1570 |
// set the format type |
|
1571 |
ObjectFormatIdentifier fmtid = new ObjectFormatIdentifier(); |
|
1572 |
fmtid.setValue(fmtidStr); |
|
1573 |
oi.setFmtid(fmtid); |
|
1574 |
|
|
1575 |
// try { |
|
1576 |
// oi.setFmtid(ObjectFormatCache.getInstance().getFormat(fmtidStr).getFmtid()); |
|
1577 |
// } catch (NotFound e) { |
|
1578 |
// logMetacat.error("could not find object format: " + fmtidStr, e); |
|
1579 |
// // skip this one |
|
1580 |
// continue; |
|
1581 |
// } |
|
1573 | 1582 |
|
1574 | 1583 |
oi.setSize(size); |
1575 | 1584 |
|
Also available in: Unified diff
-use whatever object format id is stored in the DB
-only set originating node and authoritative node if we have non-null values for them