Ejemplo n.º 1
0
        public static bool Generate_Data(SDMXSchemaType schemaType, XmlDocument query, DataFormats format, DIConnection DIConnection, DIQueries DIQueries, string outputFolder)
        {
            bool RetVal;
            BaseDataUtility BaseDataUtility;

            RetVal = false;
            BaseDataUtility = null;

            try
            {
                switch (format)
                {
                    case DataFormats.Generic:
                        BaseDataUtility = new GenericDataUtility(DIConnection, DIQueries, string.Empty);
                        break;
                    case DataFormats.GenericTS:
                        BaseDataUtility = new GenericTimeSeriesDataUtility(DIConnection, DIQueries, string.Empty);
                        break;
                    case DataFormats.StructureSpecific:
                        BaseDataUtility = new StructureSpecificDataUtility(DIConnection, DIQueries, string.Empty);
                        break;
                    case DataFormats.StructureSpecificTS:
                        BaseDataUtility = new StructureSpecificTimeSeriesDataUtility(DIConnection, DIQueries, string.Empty);
                        break;
                    default:
                        break;
                }

                RetVal = BaseDataUtility.Generate_Data(query, outputFolder);
            }
            catch (Exception ex)
            {
                RetVal = false;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
Ejemplo n.º 2
0
        public static bool Generate_Data(SDMXSchemaType schemaType, XmlDocument query, DataFormats format, DIConnection DIConnection, DIQueries DIQueries, string outputFolder, out int fileCount,out List<string> GeneratedFiles,SDMXObjectModel.Message.StructureHeaderType Header)
        {
            bool RetVal;
            BaseDataUtility BaseDataUtility;

            RetVal = false;
            BaseDataUtility = null;
            fileCount = 0;
            GeneratedFiles = new List<string>();
            try
            {
                switch (format)
                {
                    case DataFormats.Generic:
                        BaseDataUtility = new GenericDataUtility(DIConnection, DIQueries, string.Empty);
                        break;
                    case DataFormats.GenericTS:
                        BaseDataUtility = new GenericTimeSeriesDataUtility(DIConnection, DIQueries, string.Empty);
                        break;
                    case DataFormats.StructureSpecific:
                        BaseDataUtility = new StructureSpecificDataUtility(DIConnection, DIQueries, string.Empty);
                        break;
                    case DataFormats.StructureSpecificTS:
                        BaseDataUtility = new StructureSpecificTimeSeriesDataUtility(DIConnection, DIQueries, string.Empty);
                        break;
                    default:
                        break;
                }

                RetVal = BaseDataUtility.Generate_Data(query, outputFolder,out fileCount,out GeneratedFiles,Header);
            }
            catch (Exception ex)
            {
                RetVal = false;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }