public void StartServer()
 {
     if (myServer != null)
     {
         return;
     }
     Console.WriteLine("starting testRDFServer");
     myServer = new PFEndpoint();
     //StringParser.Parse(prologEngine.rdfGraph, "<http://example.org/a1> <http://example.org/b1> <http://example.org/c1> .");
     prologEngine.connectMT("spindleMT", "rdfMT");
     prologEngine.connectMT("rdfMT", "baseKB");
     prologEngine.appendKB("triple(this,can,work).\n", "rdfMT");
     ThreadPool.QueueUserWorkItem((o) => myServer.beginService(prologEngine));
     prologEngine.EndpointCreated(myServer);
 }
Example #2
0
        static void testRDFServer()
        {
            Console.WriteLine("starting testRDFServer");
            PFEndpoint myServer = new PFEndpoint();
            var        rdfGraph = prologEngine.getRefreshedRDFGraph("spindleMT");

            StringParser.Parse(rdfGraph, "<http://example.org/a1> <http://example.org/b1> <http://example.org/c1> .");
            prologEngine.connectMT("spindleMT", "rdfMT");
            prologEngine.appendKB("triple(this,can,work).\n", "rdfMT");

            myServer.beginService(prologEngine);
            while (true)
            {
                Thread.Sleep(1000);
            }
        }