Project

General

Profile

« Previous | Next » 

Revision 6916

On MN.create(), set the archived flag to be false. This field isn't required in the schema, but is needed by the DataONE indexer once objects are sync'd.

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
59 59
import org.dataone.service.mn.tier2.v1.MNAuthorization;
60 60
import org.dataone.service.mn.tier3.v1.MNStorage;
61 61
import org.dataone.service.mn.tier4.v1.MNReplication;
62
import org.dataone.service.types.v1.AccessPolicy;
63 62
import org.dataone.service.types.v1.Checksum;
64
import org.dataone.service.types.v1.DescribeResponse;
65 63
import org.dataone.service.types.v1.Event;
66 64
import org.dataone.service.types.v1.Group;
67 65
import org.dataone.service.types.v1.Identifier;
......
93 91
import edu.ucsb.nceas.metacat.EventLog;
94 92
import edu.ucsb.nceas.metacat.IdentifierManager;
95 93
import edu.ucsb.nceas.metacat.McdbDocNotFoundException;
96
import edu.ucsb.nceas.metacat.McdbException;
97 94
import edu.ucsb.nceas.metacat.MetacatHandler;
98 95
import edu.ucsb.nceas.metacat.client.InsufficientKarmaException;
99
import edu.ucsb.nceas.metacat.database.DBConnection;
100
import edu.ucsb.nceas.metacat.database.DBConnectionPool;
101 96
import edu.ucsb.nceas.metacat.dataone.hazelcast.HazelcastService;
102 97
import edu.ucsb.nceas.metacat.properties.PropertyService;
103
import edu.ucsb.nceas.metacat.shared.ServiceException;
104 98
import edu.ucsb.nceas.metacat.util.SystemUtil;
105
import edu.ucsb.nceas.utilities.ParseLSIDException;
106 99
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
107 100

  
108 101
/**
......
396 389
    public Identifier create(Session session, Identifier pid, InputStream object, SystemMetadata sysmeta) throws InvalidToken, ServiceFailure, NotAuthorized,
397 390
            IdentifierNotUnique, UnsupportedType, InsufficientResources, InvalidSystemMetadata, NotImplemented, InvalidRequest {
398 391

  
399
      // check for null session
392
        // check for null session
400 393
        if (session == null) {
401 394
          throw new InvalidToken("1110", "Session is required to WRITE to the Node.");
402 395
        }
......
405 398
        // set the originating node
406 399
        NodeReference originMemberNode = this.getCapabilities().getIdentifier();
407 400
        sysmeta.setOriginMemberNode(originMemberNode);
401
        sysmeta.setArchived(false);
402

  
408 403
        // set the dates
409 404
        Date now = Calendar.getInstance().getTime();
410
    sysmeta.setDateSysMetadataModified(now);
411
    sysmeta.setDateUploaded(now);
405
        sysmeta.setDateSysMetadataModified(now);
406
        sysmeta.setDateUploaded(now);
412 407
        // call the shared impl
413 408
        return super.create(session, pid, object, sysmeta);
414 409
    }

Also available in: Unified diff