示例#1
0
        /// <summary>
        /// Genmerate DES File from
        /// </summary>
        /// <param name="schemaType"></param>
        /// <param name="DESFileNameWPath"></param>
        /// <param name="format"></param>
        /// <param name="agencyId"></param>
        /// <param name="dbConnection"></param>
        /// <param name="dbQueries"></param>
        /// <returns></returns>
        public static bool Generate_DES(SDMXSchemaType schemaType, DataFormats format, string agencyId, string DESOutputFileNameWPath, string SDMXFileNameWithPath, DIConnection dbConnection, DIQueries dbQueries)
        {
            bool           RetVal           = false;
            BaseSDMXHelper BaseSDMXHelpeObj = null;

            try
            {
                BaseSDMXHelpeObj = new BaseSDMXHelper(dbConnection, dbQueries);


                RetVal = BaseSDMXHelpeObj.Generate_DES(schemaType, DESOutputFileNameWPath, SDMXFileNameWithPath);
            }
            catch (Exception)
            {
            }
            return(RetVal);
        }
示例#2
0
        public static bool Import_Metadata(SDMXSchemaType schemaType, string tempxmlfileNameWPath, string sdmxWebServiceUrl, DIConnection dbConnection, DIQueries dbQueries)
        {
            bool           RetVal           = false;
            BaseSDMXHelper BaseSDMXHelpeObj = null;

            try
            {
                BaseSDMXHelpeObj = new BaseSDMXHelper(dbConnection, dbQueries);


                RetVal = BaseSDMXHelpeObj.GenerateMetadataXMLFromSDMXWebservice(sdmxWebServiceUrl, tempxmlfileNameWPath);
            }
            catch (Exception)
            {
            }

            return(RetVal);
        }
示例#3
0
        /// <summary>
        /// Import DSD from Webservice to template/database
        /// </summary>
        /// <param name="schemaType"></param>
        /// <param name="dsdfileNameWPath"></param>
        /// <param name="format"></param>
        /// <param name="agencyId"></param>
        /// <param name="dbConnection"></param>
        /// <param name="dbQueries"></param>
        /// <param name="includeSource"></param>
        /// <returns></returns>
        public static bool Import_DSD(SDMXSchemaType schemaType, string dsdfileNameWPath, DataFormats format, string agencyId, DIConnection dbConnection, DIQueries dbQueries, bool includeSource)
        {
            bool           RetVal           = false;
            BaseSDMXHelper BaseSDMXHelpeObj = null;

            try
            {
                BaseSDMXHelpeObj = new BaseSDMXHelper(dbConnection, dbQueries);


                RetVal = BaseSDMXHelpeObj.Import_DSD(schemaType, dsdfileNameWPath, includeSource);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(RetVal);
        }
示例#4
0
        /// <summary>
        /// Import SDMX Data Files
        /// </summary>
        /// <param name="schemaType"></param>
        /// <param name="format"></param>
        /// <param name="agencyId"></param>
        /// <param name="SDMXFileNameWithPath"></param>
        /// <param name="dbConnection"></param>
        /// <param name="dbQueries"></param>
        /// <returns></returns>
        public static bool Import_SDMXML_Data(SDMXSchemaType schemaType, DataFormats format, string agencyId, string SDMXFileNameWithPath, DIConnection dbConnection, DIQueries dbQueries)
        {
            bool RetVal = false;

            BaseSDMXHelper BaseSDMXHelpeObj = null;

            try
            {
                BaseSDMXHelpeObj = new BaseSDMXHelper(dbConnection, dbQueries);


                RetVal = BaseSDMXHelpeObj.Import_SDMXML_Data(SDMXFileNameWithPath);
            }
            catch (Exception)
            {
            }


            return(RetVal);
        }
示例#5
0
        public bool CreateMetadataFromSDMX(string templateFileName,string tempFolderPath, string languageCode,string sdmxRegistryUrl)
        {
            bool RetVal = true;
            DIConnection DBConnection = null;
            DIQueries DBQueries;
            try
            {
                //create temp template file
                DIDatabase TempTemplateFile = new DIDatabase(templateFileName, "UT_", languageCode);

                // create database object
                DBConnection = new DIConnection(DIServerType.MsAccess, string.Empty, string.Empty, templateFileName, string.Empty, string.Empty);
                DBQueries = new DIQueries(DBConnection.DIDataSetDefault(), languageCode);

                // delete default categories from blank template
                DBConnection.ExecuteNonQuery(DevInfo.Lib.DI_LibDAL.Queries.MetadataCategory.Delete.DeleteMetadataCategory(DBQueries.TablesName.MetadataCategory, string.Empty));

                // import data from SDMX
                BaseSDMXHelper HelperObj = new BaseSDMXHelper(DBConnection, DBQueries);
                string TempXmlFile = tempFolderPath + "\\IMPORT_MSDXML_" + this.GetDateTimeStamp() + DICommon.FileExtension.XML;

                HelperObj.GenerateMetadataXMLFromSDMXWebservice(sdmxRegistryUrl, TempXmlFile);

            }
            catch (Exception ex)
            {
                RetVal = false;

            }
            finally
            {
                // dispose database object
                if (DBConnection != null)
                {
                    DBConnection.Dispose();
                }

            }

            return RetVal;
        }
示例#6
0
        /// <summary>
        /// Import SDMX Data Files
        /// </summary>
        /// <param name="schemaType"></param>
        /// <param name="format"></param>
        /// <param name="agencyId"></param>
        /// <param name="SDMXFileNameWithPath"></param>
        /// <param name="dbConnection"></param>
        /// <param name="dbQueries"></param>
        /// <returns></returns>
        public static bool Import_SDMXML_Data(SDMXSchemaType schemaType, DataFormats format, string agencyId, string SDMXFileNameWithPath, DIConnection dbConnection, DIQueries dbQueries)
        {
            bool RetVal = false;

            BaseSDMXHelper BaseSDMXHelpeObj = null;
            try
            {
                BaseSDMXHelpeObj = new BaseSDMXHelper(dbConnection, dbQueries);

                RetVal = BaseSDMXHelpeObj.Import_SDMXML_Data(SDMXFileNameWithPath);
            }
            catch (Exception)
            {
            }

            return RetVal;
        }
示例#7
0
        public static bool Import_Metadata(SDMXSchemaType schemaType, string tempxmlfileNameWPath, string sdmxWebServiceUrl, DIConnection dbConnection, DIQueries dbQueries)
        {
            bool RetVal = false;
            BaseSDMXHelper BaseSDMXHelpeObj = null;
            try
            {
                BaseSDMXHelpeObj = new BaseSDMXHelper(dbConnection, dbQueries);

                RetVal = BaseSDMXHelpeObj.GenerateMetadataXMLFromSDMXWebservice(sdmxWebServiceUrl, tempxmlfileNameWPath);
            }
            catch (Exception)
            {
            }

            return RetVal;
        }
示例#8
0
        /// <summary>
        /// Import DSD from Webservice to template/database
        /// </summary>
        /// <param name="schemaType"></param>
        /// <param name="dsdfileNameWPath"></param>
        /// <param name="format"></param>
        /// <param name="agencyId"></param>
        /// <param name="dbConnection"></param>
        /// <param name="dbQueries"></param>
        /// <param name="includeSource"></param>
        /// <returns></returns>
        public static bool Import_DSD(SDMXSchemaType schemaType, string dsdfileNameWPath, DataFormats format, string agencyId, DIConnection dbConnection, DIQueries dbQueries, bool includeSource)
        {
            bool RetVal = false;
            BaseSDMXHelper BaseSDMXHelpeObj = null;
            try
            {
                BaseSDMXHelpeObj = new BaseSDMXHelper(dbConnection, dbQueries);

                RetVal = BaseSDMXHelpeObj.Import_DSD(schemaType, dsdfileNameWPath, includeSource);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return RetVal;
        }
示例#9
0
        /// <summary>
        /// Generate_DES
        /// </summary>
        /// <param name="schemaType"></param>
        /// <param name="format"></param>
        /// <param name="agencyId"></param>
        /// <param name="DESOutputFileNameWPath"></param>
        /// <param name="dataFileNameWithPath"></param>
        /// <param name="DSDFileNameWPath"></param>
        /// <returns></returns>
        public static bool Generate_DES(SDMXSchemaType schemaType, DataFormats format, string agencyId, string DESOutputFileNameWPath, string SDMXFileNameWithPath, string DSDFileNameWPath, string languageCode)
        {
            bool RetVal = false;
            BaseSDMXHelper BaseSDMXHelpeObj = null;
            try
            {
                BaseSDMXHelpeObj = new BaseSDMXHelper();//(dbConnection, dbQueries);

                RetVal = BaseSDMXHelpeObj.Generate_DES(schemaType, DESOutputFileNameWPath, SDMXFileNameWithPath, DSDFileNameWPath, languageCode);
            }
            catch (Exception)
            {
            }

            return RetVal;
        }