public void GetOntologyInfoFromService() { // talk to the service and get an ontology info built. // set up RestClientConfig rcc = new RestClientConfig(protocol, serverAddress, onotologyInfoServicePort); OntologyInfoServiceClient oisc = new OntologyInfoServiceClient(rcc); String sparqlConnectionJsonString = "{\"name\": \"pop music test\",\"domain\": \"http://\",\"model\": [{\"type\": \"virtuoso\",\"url\": \"http://fake-server:2420\",\"dataset\": \"http://research.ge.com/test/popmusic/model\"}],\"data\": [{\"type\": \"virtuoso\",\"url\": \"http://fake-server:2420\",\"dataset\": \"http://research.ge.com/test/popmusic/data\"}]}"; SparqlConnection connect = new SparqlConnection(sparqlConnectionJsonString); OntologyInfo oInfo = oisc.ExecuteGetOntologyInfo(connect).Result; Assert.IsTrue(oInfo.GetNumberOfProperties() == 17); Assert.IsTrue(oInfo.GetNumberOfClasses() == 8); Assert.IsTrue(oInfo.GetNumberOfEnum() == 0); }
private void InitServiceClients() { // the Ontology info client. RestClientConfig orcc = new RestClientConfig("http", this.oServerBox.Text, int.Parse(this.oPortBox.Text)); this.oisc = new OntologyInfoServiceClient(orcc); // the Nodegroup client RestClientConfig ngrcc = new RestClientConfig("http", this.ngServerBox.Text, int.Parse(this.ngPortBox.Text)); this.ngc = new NodeGroupClient(ngrcc); // the nodegroup execution client NodeGroupExecutionClientConfig ngercc = new NodeGroupExecutionClientConfig("http", eServerBox.Text, int.Parse(ePortBox.Text)); this.ngec = new NodeGroupExecutionClient(ngercc); }
public void NodeGroupDeleteGeneration() { String selectStatement = ""; NodeGroup ng = new NodeGroup(); Debug.WriteLine(jsonContent); ng.AddJsonEncodedNodeGroup((JsonObject.Parse(jsonContent)).GetNamedObject("sNodeGroup")); RestClientConfig necc = new RestClientConfig(protocol, serverAddress, nodeGroupServicePort); NodeGroupClient nodeGroupClient = new NodeGroupClient(necc); selectStatement = nodeGroupClient.ExecuteGetDelete(ng).Result; Debug.WriteLine("the returned sparql delete was: "); Debug.WriteLine(selectStatement); Assert.IsTrue(selectStatement.Length > 0); }
/// <summary> /// Initializes a new instance of the <see cref="ApiAController" /> class. /// </summary> /// <param name="restClientConfig">The rest client configuration.</param> public ApiController(RestClientConfig restClientConfig ) { }
public ShareOrderApiController(RestClientConfig restClientConfig ) { BaseService = Resolve <IShareOrderService>(); }
public ApiEvaluateController(RestClientConfig restClientConfig) { BaseService = Resolve <IEvaluateService>(); }