コード例 #1
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Generate_Categorization(SDMXSchemaType schemaType, string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries,string IcType)
        {
            List<ArtefactInfo> RetVal;
            CategorizationUtility CategorizationUtility;

            RetVal = null;
            CategorizationUtility = null;

            try
            {
                CategorizationUtility = new CategorizationUtility(agencyId, language, header, outputFolder, DIConnection, DIQueries);
               // RetVal = CategorizationUtility.Generate_Artefact();
                RetVal = CategorizationUtility.Generate_CompleteArtefact(IcType);
                CategorizationUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #2
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Create_Constraint(SDMXSchemaType schemaType, XmlDocument sdmxMLFileXMLDocument, string registrationId, string simpleDataSourceUrl, string agencyId, Header header, string outputFolder)
        {
            List<ArtefactInfo> RetVal;
            ConstraintUtility ConstraintUtility;

            RetVal = null;
            ConstraintUtility = null;

            try
            {
                ConstraintUtility = new ConstraintUtility(sdmxMLFileXMLDocument, registrationId, simpleDataSourceUrl, agencyId, header, outputFolder);
                RetVal = ConstraintUtility.Generate_Artefact();
                ConstraintUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            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>
        /// <returns></returns>
        public static bool Import_DSD(SDMXSchemaType schemaType, string dsdfileNameWPath, DataFormats format, string agencyId, DIConnection dbConnection, DIQueries dbQueries)
        {
            bool RetVal = false;

            RetVal = SDMXHelper.Import_DSD(schemaType, dsdfileNameWPath, format, agencyId, dbConnection, dbQueries, false);

            return(RetVal);
        }
コード例 #4
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);
        }
コード例 #5
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);
        }
コード例 #6
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);
        }
コード例 #7
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);
        }
コード例 #8
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Generate_Report(SDMXSchemaType schemaType, string completeXmlFileNameWPath, string agencyId, string language, string outputFolder)
        {
            List<ArtefactInfo> RetVal;
            ReportUtility ReportUtility;

            RetVal = null;
            ReportUtility = null;

            try
            {
                ReportUtility = new ReportUtility(completeXmlFileNameWPath, agencyId, language, outputFolder);
                RetVal = ReportUtility.Generate_Artefact();
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #9
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Register_DataRepository(SDMXSchemaType schemaType, string id, string paId, string dataURL, bool isREST, string wadlURL, bool isSOAP, string wsdlURL, string fileURL, string agencyId, Header header, string outputFolder)
        {
            List<ArtefactInfo> RetVal;
            RegistrationUtility RegistrationUtility;

            RetVal = null;
            RegistrationUtility = null;

            try
            {
                RegistrationUtility = new RegistrationUtility(id, paId, dataURL, isREST, wadlURL, isSOAP, wsdlURL, fileURL, agencyId, header, outputFolder);
                RetVal = RegistrationUtility.Generate_Artefact();
                RegistrationUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #10
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static Dictionary<string, string> Validate_SDMXML(SDMXSchemaType schemaType, string dataFileNameWPath, string completeFileNameWPath)
        {
            Dictionary<string, string> RetVal;
            BaseValidateUtility BaseValidateUtility;

            RetVal = new Dictionary<string, string>();
            BaseValidateUtility = null;

            try
            {
                BaseValidateUtility = new SDMXMLValidateUtility();
                RetVal = BaseValidateUtility.ValidateSdmxMlAgainstDSD(dataFileNameWPath, completeFileNameWPath);
                if (RetVal.Keys.Count == 0)
                {
                    RetVal.Add(SDMXValidationStatus.Valid.ToString(), string.Empty);
                }
            }
            catch (Exception ex)
            {
                RetVal = new Dictionary<string, string>();
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #11
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static XmlDocument Get_MetadataReport(SDMXSchemaType schemaType, string TargetObjectId, MetadataTypes metadataType, string agencyId, string language, DIConnection DIConnection, DIQueries DIQueries)
        {
            XmlDocument RetVal;
            MetadataReportUtility MetadataReportUtility;

            RetVal = null;
            MetadataReportUtility = null;

            try
            {
                MetadataReportUtility = new MetadataReportUtility(agencyId, language, null, DIConnection, DIQueries);
                RetVal = MetadataReportUtility.Get_MetadataReport(TargetObjectId, metadataType);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #12
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Get_Notification(SDMXSchemaType schemaType, DateTime eventTime, List<ArtefactRef> artefacts, string subscriptionURN, ActionType action, Header header)
        {
            List<ArtefactInfo> RetVal;
            NotificationUtility NotificationUtility;

            RetVal = null;
            NotificationUtility = null;

            try
            {
                NotificationUtility = new NotificationUtility(eventTime, artefacts, subscriptionURN, action, header);
                RetVal = NotificationUtility.Generate_Artefact();
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #13
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Generate_Mapping(SDMXSchemaType schemaType, MappingType mappingType, Dictionary<string, string> dictMapping, string sourceId, string sourceAgencyId, string sourceVersion, string targetId, string targetAgencyId, string targetVersion, string agencyId, string language, Header header, string fileNameWPath, string outputFolder,string codelistName)
        {
            List<ArtefactInfo> RetVal;
            MappingUtility MappingUtility;

            RetVal = null;
            MappingUtility = null;

            try
            {
                MappingUtility = new MappingUtility(mappingType, dictMapping, sourceId, sourceAgencyId, sourceVersion, targetId, targetAgencyId, targetVersion, agencyId, language, header, fileNameWPath, outputFolder,codelistName);
                RetVal = MappingUtility.Generate_Artefact();
                MappingUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #14
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static XmlDocument Get_MetadataQuery(SDMXSchemaType schemaType, MetadataTypes metadataType, string codeId, string agencyId)
        {
            XmlDocument RetVal;
            MetadataQueryUtility MetadataQueryUtility;

            RetVal = null;
            MetadataQueryUtility = null;

            try
            {
                MetadataQueryUtility = new MetadataQueryUtility(metadataType, codeId, agencyId);
                RetVal = MetadataQueryUtility.Get_Query();
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #15
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        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;
        }
コード例 #16
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        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;
        }
コード例 #17
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Generate_ConceptScheme(SDMXSchemaType schemaType, ConceptSchemeTypes conceptSchemeType, string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries)
        {
            List<ArtefactInfo> RetVal;
            ConceptSchemeUtility ConceptSchemeUtility;

            RetVal = null;
            ConceptSchemeUtility = null;

            try
            {
                ConceptSchemeUtility = new ConceptSchemeUtility(conceptSchemeType, agencyId, language, header, outputFolder, DIConnection, DIQueries);
                RetVal = ConceptSchemeUtility.Generate_Artefact();
                ConceptSchemeUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #18
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        //, List<ArtefactInfo> Artefacts
        public static List<ArtefactInfo> Generate_Complete_XML(SDMXSchemaType schemaType, string agencyId, string language, Header header, string outputFolder, Dictionary<string, string> DictIndicator, Dictionary<string, string> DictIndicatorMapping, DIConnection DIConnection, DIQueries DIQueries,string IcType)
        {
            List<ArtefactInfo> RetVal;
            CompositeUtility CompositeUtility;

            RetVal = null;
            CompositeUtility = null;

            try
            {
                if (language.Contains("_"))
                {
                    language = language.Replace("_","");
                }
                CompositeUtility = new CompositeUtility(true, agencyId, language, header, outputFolder, DictIndicator, DictIndicatorMapping, DIConnection, DIQueries);
                 RetVal = CompositeUtility.Generate_Artefact(IcType);
               // RetVal = CompositeUtility.Generate_CompleteArtefact(Artefacts);
                CompositeUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #19
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static bool Validate_SDMXMLFile(SDMXSchemaType schemaType, string dataFileNameWPath)
        {
            bool Retval;
            Dictionary<string, string> dictStatus;
            BaseValidateUtility BaseValidateUtility;
            string ValidationStatus;

            dictStatus = new Dictionary<string, string>();
            BaseValidateUtility = null;
            Retval = true;
            ValidationStatus = string.Empty;

            try
            {
                BaseValidateUtility = new SDMXMLValidateUtility();
                dictStatus = BaseValidateUtility.ValidateSdmxML(dataFileNameWPath);
                foreach (string key in dictStatus.Keys)
                {
                    ValidationStatus = key;
                }
                if ((ValidationStatus == SDMXValidationStatus.Valid.ToString()) || (dictStatus.Keys.Count == 0))
                {
                    Retval = true;
                }
                else
                {
                    Retval = false;
                }
            }
            catch (Exception ex)
            {
                Retval = false;
                throw ex;
            }
            finally
            {
            }

            return Retval;
        }
コード例 #20
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Generate_Summary_XML(SDMXSchemaType schemaType, string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries)
        {
            List<ArtefactInfo> RetVal;
            CompositeUtility CompositeUtility;

            RetVal = null;
            CompositeUtility = null;

            try
            {
                if (language.Contains("_"))
                {
                    language = language.Replace("_", "");
                }

                CompositeUtility = new CompositeUtility(false, agencyId, language, header, outputFolder, null, null, DIConnection, DIQueries);
                RetVal = CompositeUtility.Generate_Artefact();
                CompositeUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #21
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static bool Generate_MetadataReport(SDMXSchemaType schemaType, MetadataTypes metadataType, string filterNIds, string agencyId, string language, Header header, DIConnection DIConnection, DIQueries DIQueries, string outputFolder, out List<string> GeneratedMetadataFiles, SDMXObjectModel.Message.StructureHeaderType Header)
        {
            bool RetVal;
            MetadataReportUtility MetadataReportUtility;

            RetVal = false;
            MetadataReportUtility = null;
            GeneratedMetadataFiles = new List<string>();
            try
            {
                MetadataReportUtility = new MetadataReportUtility(agencyId, language, header, DIConnection, DIQueries);
                RetVal = MetadataReportUtility.Generate_MetadataReport(metadataType, filterNIds, outputFolder,out GeneratedMetadataFiles,Header);
            }
            catch (Exception ex)
            {
                RetVal = false;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #22
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static XmlDocument Get_Data(SDMXSchemaType schemaType, XmlDocument query, DataFormats format, DIConnection DIConnection, DIQueries DIQueries)
        {
            XmlDocument RetVal;
            BaseDataUtility BaseDataUtility;

            RetVal = null;
            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.Get_Data(query);
            }
            catch (Exception ex)
            {
                if (!ex.Message.Contains(Constants.SDMXWebServices.Exceptions.InvalidSyntax.Message) &&
                    !ex.Message.Contains(Constants.SDMXWebServices.Exceptions.NoResults.Message) &&
                    !ex.Message.Contains(Constants.SDMXWebServices.Exceptions.NotImplemented.Message))
                {
                    throw new Exception(Constants.SDMXWebServices.Exceptions.ServerError.Message);
                }
                else
                {
                    throw ex;
                }
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #23
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static bool Generate_MetadataReport(SDMXSchemaType schemaType, MetadataTypes metadataType, string filterNIds, string agencyId, string language, Header header, DIConnection DIConnection, DIQueries DIQueries, string outputFolder)
        {
            bool RetVal;
            MetadataReportUtility MetadataReportUtility;

            RetVal = false;
            MetadataReportUtility = null;

            try
            {
                MetadataReportUtility = new MetadataReportUtility(agencyId, language, header, DIConnection, DIQueries);
                RetVal = MetadataReportUtility.Generate_MetadataReport(metadataType, filterNIds, outputFolder);
            }
            catch (Exception ex)
            {
                RetVal = false;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #24
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static XmlDocument Get_MetadataReport(SDMXSchemaType schemaType, XmlDocument query, string language, Header header, DIConnection DIConnection, DIQueries DIQueries)
        {
            XmlDocument RetVal;
            MetadataReportUtility MetadataReportUtility;

            RetVal = null;
            MetadataReportUtility = null;

            try
            {
                MetadataReportUtility = new MetadataReportUtility(string.Empty, language, header, DIConnection, DIQueries);
                RetVal = MetadataReportUtility.Get_MetadataReport(query);
            }
            catch (Exception ex)
            {
                if (!ex.Message.Contains(Constants.SDMXWebServices.Exceptions.InvalidSyntax.Message) &&
                    !ex.Message.Contains(Constants.SDMXWebServices.Exceptions.NoResults.Message) &&
                    !ex.Message.Contains(Constants.SDMXWebServices.Exceptions.NotImplemented.Message))
                {
                    throw new Exception(Constants.SDMXWebServices.Exceptions.ServerError.Message);
                }
                else
                {
                    throw ex;
                }
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #25
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Generate_MFD(SDMXSchemaType schemaType, MSDTypes msdType, string agencyId, Header header, string outputFolder)
        {
            List<ArtefactInfo> RetVal;
            MFDUtility MFDUtility;

            RetVal = null;
            MFDUtility = null;

            try
            {
                MFDUtility = new MFDUtility(msdType, agencyId, header, outputFolder);
                RetVal = MFDUtility.Generate_Artefact();
                MFDUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #26
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Generate_CategoryScheme(SDMXSchemaType schemaType, CategorySchemeTypes categorySchemeType, string agencyId, string language, Header header, string outputFolder, Dictionary<string, string> DictIndicator, Dictionary<string, string> DictIndicatorMapping, DIConnection DIConnection, DIQueries DIQueries)
        {
            List<ArtefactInfo> RetVal;
            CategorySchemeUtility CategorySchemeUtility;

            RetVal = null;
            CategorySchemeUtility = null;

            try
            {
                CategorySchemeUtility = new CategorySchemeUtility(categorySchemeType, true, agencyId, language, header, outputFolder, DictIndicator, DictIndicatorMapping, DIConnection, DIQueries);
                RetVal = CategorySchemeUtility.Generate_Artefact();
                CategorySchemeUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #27
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Subscribe_User(SDMXSchemaType schemaType, string id, string userId, UserTypes userType, List<bool> isSOAPMailIds, List<string> notificationMailIds, List<bool> isSOAPHTTPs, List<string> notificationHTTPs, string subscriberAssignedId, DateTime startDate, DateTime endDate, string EventSelector, Dictionary<string, string> dictCategories, string MFDId, string agencyId, Header header, string outputFolder)
        {
            List<ArtefactInfo> RetVal;
            SubscriptionUtility SubscriptionUtility;

            RetVal = null;
            SubscriptionUtility = null;

            try
            {
                SubscriptionUtility = new SubscriptionUtility(id, userId, userType, isSOAPMailIds, notificationMailIds, isSOAPHTTPs, notificationHTTPs, subscriberAssignedId, startDate, endDate, EventSelector, dictCategories, MFDId, agencyId, header, outputFolder);
                RetVal = SubscriptionUtility.Generate_Artefact();
                SubscriptionUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #28
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static XmlDocument Get_Query(SDMXSchemaType schemaType, Dictionary<string, string> dictUserSelections, QueryFormats format, DataReturnDetailTypes dataReturnDetailType, string agencyId, DIConnection DIConnection, DIQueries DIQueries)
        {
            XmlDocument RetVal;
            BaseQueryUtility BaseQueryUtility;

            RetVal = null;
            BaseQueryUtility = null;

            try
            {
                switch (format)
                {
                    case QueryFormats.Generic:
                        BaseQueryUtility = new GenericQueryUtility(dictUserSelections, dataReturnDetailType, agencyId, DIConnection, DIQueries);
                        break;
                    case QueryFormats.GenericTS:
                        BaseQueryUtility = new GenericTimeSeriesQueryUtility(dictUserSelections, dataReturnDetailType, agencyId, DIConnection, DIQueries);
                        break;
                    case QueryFormats.StructureSpecific:
                        BaseQueryUtility = new StructureSpecificQueryUtility(dictUserSelections, dataReturnDetailType, agencyId, DIConnection, DIQueries);
                        break;
                    case QueryFormats.StructureSpecificTS:
                        BaseQueryUtility = new StructureSpecificTimeSeriesQueryUtility(dictUserSelections, dataReturnDetailType, agencyId, DIConnection, DIQueries);
                        break;
                    default:
                        break;
                }

                RetVal = BaseQueryUtility.Get_Query();
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #29
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static Dictionary<string, string> Validate_DSDAgainstMasterDSD(SDMXSchemaType schemaType, string dsdFileNameWPath, string devinfodsdFileNameWPath)
        {
            Dictionary<string, string> RetVal;
            BaseValidateUtility BaseValidateUtility;

            RetVal = new Dictionary<string, string>();
            BaseValidateUtility = null;

            try
            {
                BaseValidateUtility = new DSDValidateUtility();
                RetVal = BaseValidateUtility.ValidateDSDAgainstDevInfoDSD(dsdFileNameWPath, devinfodsdFileNameWPath);
                if (RetVal.Keys.Count == 0)
                {
                    RetVal.Add(DSDValidationStatus.Valid.ToString(), string.Empty);
                }
            }
            catch (Exception ex)
            {
                RetVal = new Dictionary<string, string>();
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #30
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Register_User(SDMXSchemaType schemaType, string originalFileNameWPath, UserTypes userType, string id, string name, string language, string outputFolder)
        {
            List<ArtefactInfo> RetVal;
            UsersUtility UsersUtility;

            RetVal = null;
            UsersUtility = null;

            try
            {
                UsersUtility = new UsersUtility(originalFileNameWPath, userType, id, name, language, outputFolder, true);
                RetVal = UsersUtility.Generate_Artefact();
                UsersUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #31
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static Dictionary<string, string> Validate_MetadataReport(SDMXSchemaType schemaType, string metadataFileNameWPath, string completeFileNameWPath, string mfd_Id)
        {
            Dictionary<string, string> RetVal;
            BaseValidateUtility BaseValidateUtility;

            RetVal = new Dictionary<string, string>();
            BaseValidateUtility = null;

            try
            {
                BaseValidateUtility = new MetadataValidateUtility();
                RetVal = BaseValidateUtility.ValidateMetadataReportAgainstMSD(metadataFileNameWPath, completeFileNameWPath, mfd_Id);
                if (RetVal.Keys.Count == 0)
                {
                    RetVal.Add(MetadataValidationStatus.Valid.ToString(), string.Empty);
                }
            }
            catch (Exception ex)
            {
                RetVal = new Dictionary<string, string>();
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #32
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> UnRegister_User(SDMXSchemaType schemaType, string originalFileNameWPath, UserTypes userType, string id)
        {
            List<ArtefactInfo> RetVal;
            UsersUtility UsersUtility;

            RetVal = null;
            UsersUtility = null;

            try
            {
                UsersUtility = new UsersUtility(originalFileNameWPath, userType, id, string.Empty, string.Empty, string.Empty, false);
                RetVal = UsersUtility.Generate_Artefact();
                UsersUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #33
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Generate_MSD(SDMXSchemaType schemaType, MSDTypes msdType, string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries)
        {
            List<ArtefactInfo> RetVal;
            MSDUtility MSDUtility;

            RetVal = null;
            MSDUtility = null;

            try
            {
                MSDUtility = new MSDUtility(msdType, agencyId, language, header, outputFolder, DIConnection, DIQueries);
                RetVal = MSDUtility.Generate_Artefact();
                MSDUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #34
0
    private void Generate_Header(SDMXSchemaType schemaType, string agencyId, string language, Header header, string outputFolder, string sdmxFolderPath, int DbNId)
    {
        SDMXObjectModel.Message.StructureType Header;

        try
        {
            Header = new SDMXObjectModel.Message.StructureType();
            Header.Header = Get_Appropriate_Header_Of_StructureHeaderType();
            Header.Structures = null;
            Header.Footer = null;
            SDMXObjectModel.Serializer.SerializeToFile(typeof(SDMXObjectModel.Message.StructureType), Header, sdmxFolderPath + "\\" + DevInfo.Lib.DI_LibSDMX.Constants.Header.FileName);
            this.Save_Artefacts_Details_For_Uploaded_DSD_In_Database(DbNId, DevInfo.Lib.DI_LibSDMX.Constants.Header.Id, string.Empty, string.Empty, string.Empty, ArtefactTypes.Header, sdmxFolderPath + "\\" + DevInfo.Lib.DI_LibSDMX.Constants.Header.FileName, DevInfo.Lib.DI_LibSDMX.Constants.Header.FileName);
        }
        catch (Exception ex)
        {
            Global.CreateExceptionString(ex, null);
            throw ex;
        }
        finally
        {
        }
    }
コード例 #35
0
ファイル: SDMXUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        public static List<ArtefactInfo> Generate_PA(SDMXSchemaType schemaType, bool dfdMfdFlag, string dfdMfdId, string providerId, string agencyId, Header header, string outputFolder)
        {
            List<ArtefactInfo> RetVal;
            PAUtility PAUtility;

            RetVal = null;
            PAUtility = null;

            try
            {
                PAUtility = new PAUtility(dfdMfdFlag, dfdMfdId, providerId, agencyId, header, outputFolder);
                RetVal = PAUtility.Generate_Artefact();
                PAUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }