コード例 #1
0
ファイル: MFDUtility.cs プロジェクト: SDRC-India/sdrcdevinfo
        private ArtefactInfo Generate_MFD_Source()
        {
            ArtefactInfo RetVal;
            SDMXObjectModel.Structure.MetadataflowType Metadataflow;

            RetVal = null;
            Metadataflow = null;

            try
            {
                Metadataflow = new SDMXObjectModel.Structure.MetadataflowType(Constants.MFD.Source.Id, this.AgencyId, Constants.MFD.Source.Version, Constants.MFD.Source.Name, Constants.MFD.Source.Description, Constants.DefaultLanguage, null);

                Metadataflow.Structure = new MetadataStructureReferenceType();
                Metadataflow.Structure.Items.Add(new MetadataStructureRefType(Constants.MSD.Source.Id, this.AgencyId, Constants.MSD.Source.Version));

                RetVal = this.Prepare_ArtefactInfo_From_MFD(Metadataflow, Constants.MFD.Source.FileName);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
            }

            return RetVal;
        }
コード例 #2
0
    private void Generate_MFD(string MFDId, string MFDAgencyId, string MFDVersion, string MFDName, string MFDDescription, string MFDLanguage, string DSDId, string DSDAgencyId, string DSDVersion, string sdmxFolderPath, int DbNId)
    {
        SDMXObjectModel.Message.StructureType MFD;
        SDMXObjectModel.Structure.MetadataflowType Metadataflow;

        Metadataflow = null;

        try
        {
            MFD = new SDMXObjectModel.Message.StructureType();
            MFD.Header = Get_Appropriate_Header_Of_StructureHeaderType();
            Metadataflow = new SDMXObjectModel.Structure.MetadataflowType(MFDId, MFDAgencyId, MFDVersion, MFDName, MFDDescription, MFDLanguage, null);

            Metadataflow.Structure = new MetadataStructureReferenceType();
            Metadataflow.Structure.Items.Add(new MetadataStructureRefType(DSDId, DSDAgencyId, DSDVersion));
            MFD.Structures.Metadataflows = new List<MetadataflowType>();
            MFD.Structures.Metadataflows.Add(Metadataflow);
            SDMXObjectModel.Serializer.SerializeToFile(typeof(SDMXObjectModel.Message.StructureType), MFD, sdmxFolderPath + "\\Provisioning Metadata\\" + MFDId + DevInfo.Lib.DI_LibSDMX.Constants.XmlExtension);
            this.Save_Artefacts_Details_For_Uploaded_DSD_In_Database(DbNId, MFDId, MFDAgencyId, MFDVersion, string.Empty, ArtefactTypes.MFD, sdmxFolderPath + "\\Provisioning Metadata\\" + MFDId + DevInfo.Lib.DI_LibSDMX.Constants.XmlExtension, MFDId + DevInfo.Lib.DI_LibSDMX.Constants.XmlExtension);
        }
        catch (Exception ex)
        {
            Global.CreateExceptionString(ex, null);
            throw ex;
        }
        finally
        {
        }
    }
コード例 #3
0
        public StructuresType(ProvisionAgreementType provisionAgreement, ConstraintType constraint, ProcessType process, 
                              ReportingTaxonomyType reportingTaxonomoy, StructureSetType structureSet, DataStructureType dataStructure, 
                              MetadataStructureType metadataStructure, ConceptSchemeType conceptScheme, 
                              HierarchicalCodelistType hierarchicalCodelist, CodelistType codelist, CategorisationType categorisation, 
                              CategorySchemeType categoryScheme, MetadataflowType metadataFlow, DataflowType dataFlow, 
                              OrganisationSchemeType organisationScheme)
        {
            if (provisionAgreement != null)
            {
                this.provisionAgreementsField = new List<ProvisionAgreementType>();
                this.provisionAgreementsField.Add(provisionAgreement);
            }

            if (constraint != null)
            {
                this.constraintsField = new List<ConstraintType>();
                this.constraintsField.Add(constraint);
            }

            if (process != null)
            {
                this.processesField = new List<ProcessType>();
                this.processesField.Add(process);
            }

            if (reportingTaxonomoy != null)
            {
                this.reportingTaxonomiesField = new List<ReportingTaxonomyType>();
                this.reportingTaxonomiesField.Add(reportingTaxonomoy);
            }

            if (structureSet != null)
            {
                this.structureSetsField = new List<StructureSetType>();
                this.structureSetsField.Add(structureSet);
            }

            if (dataStructure != null)
            {
                this.dataStructuresField = new List<DataStructureType>();
                this.dataStructuresField.Add(dataStructure);
            }

            if (metadataStructure != null)
            {
                this.metadataStructuresField = new List<MetadataStructureType>();
                this.metadataStructuresField.Add(metadataStructure);
            }

            if (conceptScheme != null)
            {
                this.conceptsField = new List<ConceptSchemeType>();
                this.conceptsField.Add(conceptScheme);
            }

            if (hierarchicalCodelist != null)
            {
                this.hierarchicalCodelistsField = new List<HierarchicalCodelistType>();
                this.hierarchicalCodelistsField.Add(hierarchicalCodelist);
            }

            if (codelist != null)
            {
                this.codelistsField = new List<CodelistType>();
                this.codelistsField.Add(codelist);
            }

            if (categorisation != null)
            {
                this.categorisationsField = new List<CategorisationType>();
                this.categorisationsField.Add(categorisation);
            }

            if (categoryScheme != null)
            {
                this.categorySchemesField = new List<CategorySchemeType>();
                this.categorySchemesField.Add(categoryScheme);
            }

            if (metadataFlow != null)
            {
                this.metadataflowsField = new List<MetadataflowType>();
                this.metadataflowsField.Add(metadataFlow);
            }

            if (dataFlow != null)
            {
                this.dataflowsField = new List<DataflowType>();
                this.dataflowsField.Add(dataFlow);
            }

            if (organisationScheme != null)
            {
                this.organisationSchemesField = new List<OrganisationSchemeType>();
                this.organisationSchemesField.Add(organisationScheme);
            }
        }