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); }