/// <summary> /// Create a ImmutableInstance of ConceptScheme /// </summary> /// <param name="AgencyId">Agency Id</param> /// <param name="Version">Artefact Version</param> /// <returns>IConceptSchemeObject</returns> public IConceptSchemeObject BuildConceptScheme(string AgencyId, string Version) { try { IConceptSchemeMutableObject cs = new ConceptSchemeMutableCore(); cs.AgencyId = AgencyId; cs.Version = Version; cs.Id = this.Code; if (this.Names != null) { foreach (SdmxObjectNameDescription item in this.Names) { cs.AddName(item.Lingua, item.Name); } } if (!this.ParsingObject.ReturnStub) { foreach (IConceptMutableObject _dim in Concepts) { cs.AddItem(_dim); } } cs.FinalStructure = TertiaryBool.ParseBoolean(true); if (this.ParsingObject.isReferenceOf || this.ParsingObject.ReturnStub) { cs.ExternalReference = TertiaryBool.ParseBoolean(true); cs.StructureURL = RetreivalStructureUrl.Get(this, cs.Id, cs.AgencyId, cs.Version); } return(cs.ImmutableInstance); } catch (SdmxException) { throw; } catch (Exception ex) { throw new SdmxException(this, FlyExceptionObject.FlyExceptionTypeEnum.CreateImmutable, ex); } }