Project

General

Profile

« Previous | Next » 

Revision 6330

provisional getCapabilities() implementation. Much of the synchronization information and node health is omitted.

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
49 49
import org.dataone.service.mn.tier2.MNAuthorization;
50 50
import org.dataone.service.mn.tier3.MNStorage;
51 51
import org.dataone.service.mn.tier4.MNReplication;
52
import org.dataone.service.types.AccessPolicy;
53 52
import org.dataone.service.types.Checksum;
54 53
import org.dataone.service.types.ChecksumAlgorithm;
55 54
import org.dataone.service.types.DescribeResponse;
56 55
import org.dataone.service.types.Event;
57 56
import org.dataone.service.types.Group;
58 57
import org.dataone.service.types.Identifier;
59
import org.dataone.service.types.Log;
60 58
import org.dataone.service.types.MonitorList;
61 59
import org.dataone.service.types.Node;
60
import org.dataone.service.types.NodeHealth;
62 61
import org.dataone.service.types.NodeReference;
62
import org.dataone.service.types.NodeType;
63 63
import org.dataone.service.types.ObjectFormat;
64 64
import org.dataone.service.types.ObjectFormatIdentifier;
65 65
import org.dataone.service.types.ObjectList;
66 66
import org.dataone.service.types.Permission;
67
import org.dataone.service.types.Service;
68
import org.dataone.service.types.Services;
67 69
import org.dataone.service.types.Session;
68 70
import org.dataone.service.types.Subject;
71
import org.dataone.service.types.Synchronization;
69 72
import org.dataone.service.types.SystemMetadata;
70 73
import org.dataone.service.types.util.ServiceTypeUtil;
71 74

  
......
76 79
import edu.ucsb.nceas.metacat.client.InsufficientKarmaException;
77 80
import edu.ucsb.nceas.metacat.database.DBConnection;
78 81
import edu.ucsb.nceas.metacat.database.DBConnectionPool;
79
import edu.ucsb.nceas.metacat.properties.PropertyService;
80
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
81 82

  
82 83
/**
83 84
 * Represents Metacat's implementation of the DataONE Member Node 
......
618 619
  public Node getCapabilities() throws NotImplemented, NotAuthorized,
619 620
      ServiceFailure, InvalidRequest {
620 621

  
621
		throw new NotImplemented("2160", "getCapabilities() not yet implemented");
622
	  Node node = new Node();
623
	  node.setBaseURL(metacatUrl + "/mn");
624
	  node.setDescription("Metacat Member Node");
625
	  // TODO: health
626
	  NodeHealth health = new NodeHealth();
627
	  node.setHealth(health );
628
	  NodeReference identifier = new NodeReference();
629
	  identifier.setValue("MN (" + node.getBaseURL() + ")");
630
	  node.setIdentifier(identifier);
631
	  node.setName("Metacat MN");
632
	  node.setReplicate(false);
633
	  // services: MNAuthorization, MNCore, MNRead, MNReplication, MNStorage
634
	  Services services = new Services();
635
	  Service sMNRead = new Service();
636
	  sMNRead.setName("MNRead");
637
	  Service sMNCore = new Service();
638
	  sMNCore.setName("MNCore");
639
	  Service sMNAuthorization = new Service();
640
	  sMNAuthorization.setName("MNAuthorization");
641
	  Service sMNStorage = new Service();
642
	  sMNStorage.setName("MNStorage");
643
	  Service sMNReplication = new Service();
644
	  sMNReplication.setName("MNReplication");
645
	  services.addService(sMNRead);
646
	  services.addService(sMNCore);
647
	  services.addService(sMNAuthorization);
648
	  services.addService(sMNStorage);
649
	  services.addService(sMNReplication);
650
	  node.setServices(services );
651
	  // TODO: sync info
652
	  Synchronization synchronization = new Synchronization();
653
	  node.setSynchronization(synchronization );
654
	  node.setSynchronize(false);
655
	  node.setType(NodeType.MN);
656
	  
657
	  return node;
622 658
  }
623 659

  
624 660
  /**

Also available in: Unified diff