private ISdmxObjects GetKeyFamily() { if (this.SessionObj == null) { this.SessionObj = new SessionImplObject(); this.SessionObj.SdmxObject = new SdmxObjectsImpl(); } // IDataflowObject dataflow = this.SessionObj.SdmxObject.Dataflows.FirstOrDefault(d => d.AgencyId == this.LayObj.Dataflow.agency && d.Id == this.LayObj.Dataflow.id && d.Version == this.LayObj.Dataflow.version); ISdmxObjects Structure = null; /* * if (dataflow != null) * { * Structure = GetSDMXObject.GetStructure(dataflow, this.SessionObj.SdmxObject.DataStructures); * Structure.AddDataflow(dataflow); * } */ if (dataflow != null && this.SessionObj.SdmxObject.HasConceptSchemes) { Structure = this.SessionObj.SdmxObject; } else if (dataflow != null && !this.SessionObj.SdmxObject.HasConceptSchemes) { Structure = GetSDMXObject.GetStructure(dataflow, this.SessionObj.SdmxObject.DataStructures); Structure.AddDataflow(dataflow); } else { Structure = GetSDMXObject.GetStructure(this.LayObj.Dataflow.id, this.LayObj.Dataflow.agency, this.LayObj.Dataflow.version); } this.SessionObj.SdmxObject.Merge(Structure); return(Structure); }
private void FillSDMXArtefacts() { _sdmxArtefacts = new SdmxObjectsImpl(); ISdmxObjects sdmxAppo = new SdmxObjectsImpl(); if (chkCodelist.Checked) { sdmxAppo = _wsModel.GetAllCodeLists(true); foreach (ICodelistObject cl in sdmxAppo.Codelists) _sdmxArtefacts.AddCodelist(cl); } if (chkConcSchema.Checked) { sdmxAppo = _wsModel.GetAllConceptScheme(true); foreach (IConceptSchemeObject cs in sdmxAppo.ConceptSchemes) _sdmxArtefacts.AddConceptScheme(cs); } if (chkDataflow.Checked) { sdmxAppo = _wsModel.GetAllDataFlow(true); foreach (IDataflowObject df in sdmxAppo.Dataflows) _sdmxArtefacts.AddDataflow(df); } if (chkDSD.Checked) { sdmxAppo = _wsModel.GetAllDataStructure(true); foreach (IDataStructureObject dsd in sdmxAppo.DataStructures) _sdmxArtefacts.AddDataStructure(dsd); } }