internal ConstraintUtility(XmlDocument sdmxMLFileXMLDocument, string registrationId, string simpleDataSourceUrl, string agencyId, Header header, string outputFolder)
     : base(agencyId, string.Empty, header, outputFolder)
 {
     this._sdmxMLFileXMLDocument = sdmxMLFileXMLDocument;
     this._registrationId = registrationId;
     this._simpleDataSourceUrl = simpleDataSourceUrl;
 }
        internal CategorySchemeUtility(CategorySchemeTypes categorySchemeType, bool completeOrSummaryFlag, string agencyId, string language, Header header, string outputFolder, Dictionary<string, string> DictIndicator, Dictionary<string, string> DictIndicatorMapping, DIConnection DIConnection, DIQueries DIQueries)
            : base(agencyId, language, header, outputFolder)
        {
            this._categorySchemeType = categorySchemeType;
            this._completeOrSummaryFlag = completeOrSummaryFlag;
            this._diConnection = DIConnection;
            this._diQueries = DIQueries;

            if (string.IsNullOrEmpty(language))
            {
                this.Language = this._diQueries.LanguageCode.Substring(1);
                this._multiLanguageHandlingRequired = true;
            }
            else
            {
                if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
                {
                    this.Language = language;
                    this._multiLanguageHandlingRequired = false;
                }
                else
                {
                    this.Language = this._diQueries.LanguageCode.Substring(1);
                    this._multiLanguageHandlingRequired = false;
                }
            }

            this._dictIndicator = DictIndicator;
            this._dictIndicatorMapping = DictIndicatorMapping;
        }
Example #3
0
 internal PAUtility(bool dfdMfdFlag, string dfdMfdId, string providerId, string agencyId, Header header, string outputFolder)
     : base(agencyId, string.Empty, header, outputFolder)
 {
     this._dfdMfdFlag = dfdMfdFlag;
     this._dfdMfdId = dfdMfdId;
     this._providerId = providerId;
 }
Example #4
0
        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;
        }
        internal CodelistUtility(CodelistTypes codelistType, bool completeOrSummaryFlag, string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries)
            : base(agencyId, language, header, outputFolder)
        {
            this._codelistType = codelistType;
            this._completeOrSummaryFlag = completeOrSummaryFlag;
            this._diConnection = DIConnection;
            this._diQueries = DIQueries;

            if (string.IsNullOrEmpty(language))
            {
                this.Language = this._diQueries.LanguageCode.Substring(1);
                this._multiLanguageHandlingRequired = true;
            }
            else
            {
                if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
                {
                    this.Language = language;
                    this._multiLanguageHandlingRequired = false;
                }
                else
                {
                    this.Language = this._diQueries.LanguageCode.Substring(1);
                    this._multiLanguageHandlingRequired = false;
                }
            }
        }
 internal ArtefactUtility(string agencyId, string language, Header header, string outputFolder)
 {
     this._agencyId = agencyId;
     this._language = language;
     this._header = header;
     this._outputFolder = outputFolder;
 }
        internal MetadataReportUtility(string agencyId, string language, Header header, DIConnection DIConnection, DIQueries DIQueries)
        {
            this._agencyId = agencyId;
            this._header = header;
            this._diConnection = DIConnection;
            this._diQueries = DIQueries;

            if (string.IsNullOrEmpty(language))
            {
                this._language = this._diQueries.LanguageCode.Substring(1);
                this._multiLanguageHandlingRequired = true;
            }
            else
            {
                if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
                {
                    this._language = language;
                    this._multiLanguageHandlingRequired = false;
                }
                else
                {
                    this._language = this._diQueries.LanguageCode.Substring(1);
                    this._multiLanguageHandlingRequired = false;
                }
            }
        }
Example #8
0
        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;
        }
        internal CategorizationUtility(string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries)
            : base(agencyId, language, header, outputFolder)
        {
            this._diConnection = DIConnection;
            this._diQueries = DIQueries;

            if (string.IsNullOrEmpty(language))
            {
                this.Language = this._diQueries.LanguageCode.Substring(1);
                this._multiLanguageHandlingRequired = true;
            }
            else
            {
                if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
                {
                    this.Language = language;
                    this._multiLanguageHandlingRequired = false;
                }
                else
                {
                    this.Language = this._diQueries.LanguageCode.Substring(1);
                    this._multiLanguageHandlingRequired = false;
                }
            }
        }
        internal NotificationUtility(DateTime eventTime, List<ArtefactRef> artefacts, string subscriptionURN, ActionType action, Header header)
            : base(string.Empty, string.Empty, header, string.Empty)
        {
            this._eventTime = eventTime;
            this._artefacts = artefacts;
            this._subscriptionURN = subscriptionURN;
            this._action = action;

            this._registrationNotificationFlag = false;
        }
        internal NotificationUtility(DateTime eventTime, string registrationId, string subscriptionURN, ActionType action, RegistrationType registration, Header header)
            : base(string.Empty, string.Empty, header, string.Empty)
        {
            this._eventTime = eventTime;
            this._registrationId = registrationId;
            this._subscriptionURN = subscriptionURN;
            this._action = action;
            this._registration = registration;

            this._registrationNotificationFlag = true;
        }
 internal RegistrationUtility(string id, string paId, string dataURL, bool isREST, string wadlURL, bool isSOAP, string wsdlURL, string fileURL, string agencyId, Header header, string outputFolder)
     : base(agencyId, string.Empty, header, outputFolder)
 {
     this._id = id;
     this._paId = paId;
     this._dataURL = dataURL;
     this._isREST = isREST;
     this._wadlURL = wadlURL;
     this._isSOAP = isSOAP;
     this._wsdlURL = wsdlURL;
     this._fileURL = fileURL;
 }
Example #13
0
 internal MappingUtility(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)
     : base(agencyId, language, header, outputFolder)
 {
     this._mappingType = mappingType;
     this._dictMapping = dictMapping;
     this._sourceId = sourceId;
     this._sourceAgencyId = sourceAgencyId;
     this._sourceVersion = sourceVersion;
     this._targetId = targetId;
     this._targetAgencyId = targetAgencyId;
     this._targetVersion = targetVersion;
     this._fileNameWPath = fileNameWPath;
     this._codelistName = codelistName;
 }
 internal SubscriptionUtility(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)
     : base(agencyId, string.Empty, header, outputFolder)
 {
     this._id = id;
     this._userId = userId;
     this._userType = userType;
     this._isSOAPMailIds = isSOAPMailIds;
     this._notificationMailIds = notificationMailIds;
     this._isSOAPHTTPs = isSOAPHTTPs;
     this._notificationHTTPs = notificationHTTPs;
     this._subscriberAssignedId = subscriberAssignedId;
     this._startDate = startDate;
     this._endDate = endDate;
     this._eventSelector = EventSelector;
     this._dictCategories = dictCategories;
     this._mfdId = MFDId;
 }
Example #15
0
        public static List<ArtefactInfo> Generate_Header(string agencyId, string language, Header header, string outputFolder)
        {
            List<ArtefactInfo> RetVal;

            HeaderUtility ArtifactHeader;
            RetVal = null;
            ArtifactHeader = null;

            try
            {
                if (language.Contains("_"))
                {
                    language = language.Replace("_", "");
                }
                ArtifactHeader = new HeaderUtility(agencyId, language, header, outputFolder);
                RetVal = ArtifactHeader.Generate_Artefact();

                ArtifactHeader.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
Example #16
0
        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;
        }
Example #17
0
        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;
        }
Example #18
0
        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;
        }
Example #19
0
        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;
        }
Example #20
0
        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;
        }
Example #21
0
        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;
        }
Example #22
0
 internal DFDUtility(string dsdId, string agencyId, Header header, string outputFolder)
     : base(agencyId, string.Empty, header, outputFolder)
 {
     this._dsdId = dsdId;
 }
Example #23
0
 internal MFDUtility(MSDTypes msdType, string agencyId, Header header, string outputFolder)
     : base(agencyId, string.Empty, header, outputFolder)
 {
     this._msdType = msdType;
 }
Example #24
0
        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;
        }
Example #25
0
        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;
        }
Example #26
0
        //, 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;
        }
Example #27
0
        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;
        }
Example #28
0
        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;
        }
Example #29
0
        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;
        }
Example #30
0
        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;
        }