Exemple #1
0
        //--------------------------------------------------------------------------
        public void ImportDatabase(FileInfo filename, IStatsUpdates statsUpdate)
        {
            GlobalParamatersService.Delegate.OnDatabaseImportStatusChanged(
                "Loading xml file ...");
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.Load(filename.FullName);

            GlobalParamatersService.Delegate.OnDatabaseImportStatusChanged(
                "Importing Words [1/6] ...");
            WordsService.Instance.Import(xmlDocument);
            statsUpdate.CollectStats();

            GlobalParamatersService.Delegate.OnDatabaseImportStatusChanged(
                "Importing Documents [2/6] ...");
            DocumentsService.Instance.Import(xmlDocument, filename);
            statsUpdate.CollectStats();

            GlobalParamatersService.Delegate.OnDatabaseImportStatusChanged(
                "Importing Contains [3/6] ...");
            ContainsService.Instance.Import(xmlDocument);
            statsUpdate.CollectStats();

            GlobalParamatersService.Delegate.OnDatabaseImportStatusChanged(
                "Importing Groups [4/6] ...");
            GroupsService.Instance.Import(xmlDocument);
            statsUpdate.CollectStats();

            GlobalParamatersService.Delegate.OnDatabaseImportStatusChanged(
                "Importing Relations [5/6] ...");
            RelationsService.Instance.Import(xmlDocument);
            statsUpdate.CollectStats();

            GlobalParamatersService.Delegate.OnDatabaseImportStatusChanged(
                "Importing Relations [6/6] ...");
            PhrasesService.Instance.Import(xmlDocument);
            statsUpdate.CollectStats();
        }
Exemple #2
0
 //--------------------------------------------------------------------------
 public Groups(ThreadWorkerQueue workerThread, IStatsUpdates statsUpdate)
 {
     this._workerThread = workerThread;
     this._statsUpdate  = statsUpdate;
 }
Exemple #3
0
 //--------------------------------------------------------------------------
 public Relations(ThreadWorkerQueue workerThread, IStatsUpdates statsUpdate)
 {
     this._workerThread = workerThread;
     this._statsUpdate  = statsUpdate;
 }
Exemple #4
0
 //--------------------------------------------------------------------------
 public ExportImport(ThreadWorkerQueue workerThread,
                     IStatsUpdates statsUpdate)
 {
     this._workerThread = workerThread;
     this._statsUpdate  = statsUpdate;
 }