Пример #1
0
        public static int ExportTdbToTwdb(List <string> files)
        {
            var twdbAdapter     = CreateAnalysisAdapter("dummy.twdb") as ArffAnalysisAdapter;
            var factory         = new AnalysisAdapterFactory();
            int countFilesSaved = 0;

            foreach (var file in files)
            {
                var analysisAdapter = factory.GetAdapter(file) as Tw4JetAnalysisAdapter;
                if (analysisAdapter != null)
                {
                    var analysis = analysisAdapter.Load(file);
                    twdbAdapter.Save(System.IO.Path.ChangeExtension(file, TwEnvironment.ArffAnalysisExtension), analysis, true);
                    countFilesSaved++;
                }
            }
            return(countFilesSaved);
        }
Пример #2
0
        public static AnalysisAdapter CreateAnalysisAdapter(string dataSource)
        {
            var factory = new AnalysisAdapterFactory();

            return(factory.GetAdapter(dataSource) as AnalysisAdapter);
        }
Пример #3
0
        public static bool IsAnalysis(string dataSource)
        {
            var factory = new AnalysisAdapterFactory();

            return(factory.GetAdapter(dataSource) != null);
        }