public void AlignmentRun()
 {
     try
     {
         BingMapsGPSlookup gps = new BingMapsGPSlookup();
         MyLoFacebookContextReader _fbContext = new MyLoFacebookContextReader(gps);
         _fbContext.InitializeContextFromFile();
         _fbContext.MyLoFacebookAlignment01();
         _fbContext.MyLoSchemaReasoner();
         _fbContext.MyLoFacebookAlignment02();
         _fbContext.MyLoSchemaReasoner();
         _fbContext.SaveContextToFile();
     }
     catch (Exception ex)
     {
         Debug.WriteLine("AlignmentRun Error");
         Debug.WriteLine(ex.Message);
     }
 }
        public void SimpleLoad01()
        {
            try
            {
                BingMapsGPSlookup gps = new BingMapsGPSlookup();
                MyLoFacebookContextReader _fbContext = new MyLoFacebookContextReader(gps);
                _fbContext.InitializeContextFromFile();

                _fbContext.MyLoFacebookAlignment02();
                _fbContext.MyLoSchemaReasoner();
                _fbContext.SaveContextToFile();

                // Not sure if this is a bug in the dotNetRDF library, but it seems to require a fresh store and read from file
                // to make the second inference rules work ... investigating ...
                MyLoFacebookContextReader _fbContext2 = new MyLoFacebookContextReader(gps);
                _fbContext2.InitializeContextFromFile();
                _fbContext2.SaveContextToDB("Keith");
            }
            catch (Exception ex)
            {
                Debug.WriteLine("SimpleLoad01 Error");
                Debug.WriteLine(ex.Message);
            }
        }
Exemple #3
0
        private void btnSaveStore_Click(object sender, EventArgs e)
        {
            try
            {
                MyLoFacebookContextReader _fbContext = new MyLoFacebookContextReader(_bingGpsLookup);
                _fbContext.InitializeContextFromFile();

                _fbContext.MyLoFacebookAlignment02();
                _fbContext.MyLoSchemaReasoner();
                _fbContext.SaveContextToFile();

                // Not sure if this is a bug in the dotNetRDF library, but it seems to require a fresh store and read from file
                // to make the second inference rules work ... investigating ...
                MyLoFacebookContextReader _fbContext2 = new MyLoFacebookContextReader(_bingGpsLookup);
                _fbContext2.InitializeContextFromFile();
                _fbContext2.SaveContextToDB("Keith");
                this.queryOutBox.Text = "Context saved to database";
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Store Error");
                Debug.WriteLine(ex.Message);
            }
        }