Project

General

Profile

« Previous | Next » 

Revision 9362

Added by Jing Tao about 9 years ago

In the create method, the modification date is reset only on the objects whose authoritative member node is v1.

View differences:

src/edu/ucsb/nceas/metacat/dataone/CNodeService.java
1835 1835
              // create the coordinating node version of the document      
1836 1836
              logMetacat.debug("Locked identifier " + pid.getValue());
1837 1837
              sysmeta.setSerialVersion(BigInteger.ONE);
1838
              sysmeta.setDateSysMetadataModified(Calendar.getInstance().getTime());
1838
              //for the object whose authoritative mn is v1. we need reset the modification date.
1839
              //for the object whose authoritative mn is v2. we just accept the modification date.
1840
              D1NodeVersionChecker checker = new D1NodeVersionChecker(sysmeta.getAuthoritativeMemberNode());
1841
              String version = checker.getVersion("MNStorage");
1842
              if(version != null && version.equalsIgnoreCase(D1NodeVersionChecker.V1)) {
1843
                  sysmeta.setDateSysMetadataModified(Calendar.getInstance().getTime());
1844
              }
1839 1845
              //sysmeta.setArchived(false); // this is a create op, not update
1840 1846
              
1841 1847
              // the CN should have set the origin and authoritative member node fields

Also available in: Unified diff