예제 #1
0
        public virtual IGraph ParseFile(string fName, ProvInfo prov, IFileController fileController, out List <Exception> Errors, MainWindowViewModel toUpdate, string outputFormat)
        {
            IGraph targetGraph = new Graph();

            targetGraph.BaseUri = UriFactory.Create(Properties.Settings.Default.StationGraphBase);
            ontovis.Util.AddNamesSpaces(targetGraph);
            return(ParseFile(fName, prov, fileController, targetGraph, out Errors, toUpdate, outputFormat));
        }
예제 #2
0
        public virtual IGraph ParseFile(string fName, ProvInfo prov, IFileController fileController, IGraph startingGraph, out List <Exception> Errors,
                                        MainWindowViewModel toUpdate, string outputFormat)
        {
            IUriNode provAction = null;

            if (prov != null)
            {
                provAction = addProvenance(ref startingGraph, prov.Aurthor, prov.AurthorIsUri);
            }
            ParseFileDetail(fName, ref startingGraph, provAction, fileController, out Errors, toUpdate, outputFormat);
            return(startingGraph);
        }
예제 #3
0
 private void btnImportSchedules_Click(object sender, RoutedEventArgs e)
 {
     Microsoft.Win32.OpenFileDialog openDlg = new Microsoft.Win32.OpenFileDialog();
     openDlg.DefaultExt = ".mca";
     openDlg.Filter     = "Complete schedule file|*.mca";
     openDlg.Title      = "Schedule to Import";
     if (openDlg.ShowDialog(this) == true)
     {
         IFileController cntrl  = new ScheduleFileControl();
         FileParseBase   parser = new FileParseBase();
         parser.MessageToDisplay += new FileParseBase.MessageDisplayDel(parser_MessageToDisplay);
         ProvInfo         provInfo = new ProvInfo(txtName.Text, this.rbUri.IsChecked == true);
         List <Exception> Errors;
         IGraph           stationNameGraph = parser.ParseFile(openDlg.FileName, provInfo, cntrl, out Errors, this.viewModel, Properties.Settings.Default.ScheduleFNameFormat);
         saveGraphToTurtle(stationNameGraph);
     }
 }
 private void importStationList_Click(object sender, RoutedEventArgs e)
 {
     Microsoft.Win32.OpenFileDialog openDlg = new Microsoft.Win32.OpenFileDialog();
     openDlg.DefaultExt = ".msn";
     openDlg.Filter     = "Master Station Name List (msn)|*.msn";
     openDlg.Title      = "Station List to import";
     if (openDlg.ShowDialog(this) == true)
     {
         IFileController cntrl  = new StationFileControl();
         FileParseBase   parser = new FileParseBase();
         parser.MessageToDisplay += new FileParseBase.MessageDisplayDel(parser_MessageToDisplay);
         ProvInfo         provInfo = new ProvInfo(txtName.Text, this.rbUri.IsChecked == true);
         List <Exception> Errors;
         IGraph           stationNameGraph = parser.ParseFile(openDlg.FileName, provInfo, cntrl, out Errors, this, Properties.Settings.Default.Outputdir);
         saveGraphToTurtle(stationNameGraph);
         saveGraphToRDF(stationNameGraph);
     }
 }
예제 #5
0
 private void btnCombinedImport_Click(object sender, RoutedEventArgs e)
 {
     Microsoft.Win32.OpenFileDialog openDlg = new Microsoft.Win32.OpenFileDialog();
     openDlg.DefaultExt = ".msn";
     openDlg.Filter     = "Master Station Name List (msn)|*.msn";
     openDlg.Title      = "Station List to import";
     if (openDlg.ShowDialog(this) == true)
     {
         openDlg.DefaultExt = ".cif";
         openDlg.Filter     = "Complete schedule file|*.cif";
         openDlg.Title      = "Schedule to Import";
         string stationName = openDlg.FileName;
         if (openDlg.ShowDialog(this) == true)
         {
             ProvInfo provInfo = null;
             if (chkIncludeProv.IsChecked.Value)
             {
                 provInfo = new ProvInfo(txtName.Text, this.rbUri.IsChecked == true);
             }
             CominedImportArgs toPass = new CominedImportArgs(stationName, openDlg.FileName, provInfo);
             worker.RunWorkerAsync(toPass);
         }
     }
 }
예제 #6
0
 public CominedImportArgs(string stationName, string schedule, ProvInfo prov)
 {
     StationNameList = stationName;
     ScheduleFile    = schedule;
     Prov            = prov;
 }