Revision 7084
Added by ben leinfelder almost 13 years ago
src/edu/ucsb/nceas/metacat/dataone/SystemMetadataFactory.java | ||
---|---|---|
71 | 71 |
import org.jibx.runtime.JiBXException; |
72 | 72 |
import org.xml.sax.SAXException; |
73 | 73 |
|
74 |
import com.ibm.icu.util.Calendar; |
|
75 |
|
|
74 | 76 |
import edu.ucsb.nceas.metacat.AccessionNumber; |
75 | 77 |
import edu.ucsb.nceas.metacat.AccessionNumberException; |
76 | 78 |
import edu.ucsb.nceas.metacat.DBUtil; |
... | ... | |
196 | 198 |
// create the checksum |
197 | 199 |
String algorithm = "MD5"; |
198 | 200 |
Checksum checksum = ChecksumUtil.checksum(inputStream, algorithm); |
201 |
logMetacat.debug("The checksum for " + localId + " is " + checksum.getValue()); |
|
199 | 202 |
sysMeta.setChecksum(checksum); |
200 | 203 |
|
201 | 204 |
// set the size from file on disk, don't read bytes again |
... | ... | |
222 | 225 |
Date createdDate = DateTimeMarshaller.deserializeDateToUTC(createdDateString); |
223 | 226 |
Date updatedDate = DateTimeMarshaller.deserializeDateToUTC(updatedDateString); |
224 | 227 |
sysMeta.setDateUploaded(createdDate); |
225 |
sysMeta.setDateSysMetadataModified(updatedDate); |
|
228 |
//sysMeta.setDateSysMetadataModified(updatedDate); |
|
229 |
// use current datetime |
|
230 |
sysMeta.setDateSysMetadataModified(Calendar.getInstance().getTime()); |
|
226 | 231 |
|
227 | 232 |
// set the revision history |
228 | 233 |
String docidWithoutRev = accNum.getDocid(); |
Also available in: Unified diff
use current datetime (at system metadata generation) as the date last modified