private SDMXObjectModel.Message.StructureType Get_Structure_Object(SDMXObjectModel.Structure.DataflowType Dataflow) { SDMXObjectModel.Message.StructureType RetVal; RetVal = new SDMXObjectModel.Message.StructureType(); RetVal.Header = this.Get_Appropriate_Header(); RetVal.Structures = new StructuresType(null, null, null, null, null, null, null, null, null, null, null, null, null, Dataflow, null); RetVal.Footer = null; return RetVal; }
private SDMXObjectModel.Message.StructureType Get_Structure_Object(CategorisationType Categorisation) { SDMXObjectModel.Message.StructureType RetVal; RetVal = new SDMXObjectModel.Message.StructureType(); RetVal.Header = this.Get_Appropriate_Header(); RetVal.Structures = new StructuresType(null, null, null, null, null, null, null, null, null, null, Categorisation, null, null, null, null); RetVal.Footer = null; return RetVal; }
private SDMXObjectModel.Message.StructureType Get_Structure_Object(ConceptSchemeType ConceptScheme) { SDMXObjectModel.Message.StructureType RetVal; RetVal = new SDMXObjectModel.Message.StructureType(); RetVal.Header = this.Get_Appropriate_Header(); RetVal.Structures = new StructuresType(null, null, null, null, null, null, null, ConceptScheme, null, null, null, null, null, null, null); RetVal.Footer = null; return RetVal; }
private SDMXObjectModel.Message.StructureType Get_Structure_Object(SDMXObjectModel.Structure.OrganisationSchemeType OrganisationScheme) { SDMXObjectModel.Message.StructureType RetVal; RetVal = new SDMXObjectModel.Message.StructureType(); RetVal.Header = this.Get_Appropriate_Header(); RetVal.Structures = new StructuresType(null, null, null, null, null, null, null, null, null, null, null, null, null, null, OrganisationScheme); RetVal.Footer = null; return RetVal; }
private SDMXObjectModel.Message.StructureType Get_Structure_Object(SDMXObjectModel.Structure.ProvisionAgreementType ProvisionAgreement) { SDMXObjectModel.Message.StructureType RetVal; RetVal = new SDMXObjectModel.Message.StructureType(); RetVal.Header = this.Get_Appropriate_Header(); RetVal.Structures = new StructuresType(ProvisionAgreement, null, null, null, null, null, null, null, null, null, null, null, null, null, null); RetVal.Footer = null; return RetVal; }
private Dictionary<string, string> Check_DimensionsAttributesMeasure_Exist_In_MasterDSD(string dsdFileNameWPath, string devinfodsdFileNameWPath) { Dictionary<string, string> RetVal; List<string> UserDSDDimensionList, UserDSDAttributeList,UserDSDMeasureList; List<string> MasterDSDDimensionList, MasterDSDAttributeList,MasterDSDMeasureList; XmlDocument UserDSDXml,MasterDevInfoDSDXml; RetVal = new Dictionary<string,string>(); UserDSDXml = new XmlDocument(); MasterDevInfoDSDXml = new XmlDocument(); SDMXObjectModel.Message.StructureType UserDSD = new SDMXObjectModel.Message.StructureType(); SDMXObjectModel.Message.StructureType MasterDevInfoDSD = new SDMXObjectModel.Message.StructureType(); SDMXObjectModel.Structure.DataStructureComponentsType UserDSComponents = new DataStructureComponentsType(); SDMXObjectModel.Structure.DataStructureComponentsType MasterDSComponents = new DataStructureComponentsType(); UserDSDXml.Load(dsdFileNameWPath); UserDSD = (SDMXObjectModel.Message.StructureType)Deserializer.LoadFromXmlDocument(typeof(SDMXObjectModel.Message.StructureType), UserDSDXml); MasterDevInfoDSDXml.Load(devinfodsdFileNameWPath); MasterDevInfoDSD = (SDMXObjectModel.Message.StructureType)Deserializer.LoadFromXmlDocument(typeof(SDMXObjectModel.Message.StructureType), MasterDevInfoDSDXml); UserDSComponents = (SDMXObjectModel.Structure.DataStructureComponentsType)(UserDSD.Structures.DataStructures[0].Item); MasterDSComponents = (SDMXObjectModel.Structure.DataStructureComponentsType)(MasterDevInfoDSD.Structures.DataStructures[0].Item); UserDSDDimensionList = BindDimensionList(UserDSComponents); UserDSDAttributeList = BindAttributeList(UserDSComponents); UserDSDMeasureList = BindMeasureList(UserDSComponents); RetVal=Check_MandatoryDimensions_Exist_In_UserDSD(UserDSDDimensionList, UserDSDMeasureList); if (RetVal.Keys.Count == 0) { MasterDSDDimensionList = BindDimensionList(MasterDSComponents); MasterDSDAttributeList = BindAttributeList(MasterDSComponents); MasterDSDMeasureList = BindMeasureList(MasterDSComponents); //Comparison of Dimensions foreach (string Dimension in UserDSDDimensionList) { if (!MasterDSDDimensionList.Contains(Dimension)) { RetVal.Add(DSDValidationStatus.DSD_Dimensions_Invalid.ToString(), Constants.ValidationMessages.Invalid_Dimension + Dimension); break; } } //Comparison of Attributes foreach (string Attribute in UserDSDAttributeList) { if (!MasterDSDAttributeList.Contains(Attribute)) { RetVal.Add(DSDValidationStatus.DSD_Attribute_Invalid.ToString(), Constants.ValidationMessages.Invalid_Attribute + Attribute); break; } } //Comparison of Measure foreach (string Measure in UserDSDMeasureList) { if (!MasterDSDMeasureList.Contains(Measure)) { RetVal.Add(DSDValidationStatus.DSD_Primary_Measure_Invalid.ToString(), Constants.ValidationMessages.Invalid_Primary_Measure + Measure); break; } } } return RetVal; }