public ISet<ICodelistObject> GetCodelistStruc() { WebOperationContext ctx = WebOperationContext.Current; IRestStructureQuery input = BuildRestQueryBean(structure, agencyID, resourceID, version, ctx.IncomingRequest.UriTemplateMatch.QueryParameters); CodelistXmlBuilder codelistXmlBuilderBean = new CodelistXmlBuilder(); var codelistsType = new CodelistsType(); var structures = new StructuresType(); structures.Codelists = codelistsType; IMutableStructureSearchManager mutableStructureSearchManagerV21; IStructureSearchManagerFactory<IMutableStructureSearchManager> structureSearchManager = new MutableStructureSearchManagerFactory(); var sdmxSchemaV21 = SdmxSchema.GetFromEnum(SdmxSchemaEnumType.VersionTwoPointOne); mutableStructureSearchManagerV21 = structureSearchManager.GetStructureSearchManager(SettingsManager.MappingStoreConnectionSettings, sdmxSchemaV21); this._structureSearchManager = mutableStructureSearchManagerV21; ; IMutableObjects mutableObjects = this._structureSearchManager.GetMaintainables(input); var immutableObj = mutableObjects.ImmutableObjects; immutableObj.Header = SettingsManager.Header; ISet<ICodelistObject> codelists = immutableObj.Codelists; return codelists; }
/// <summary> /// Creates Codelist based on the input Codelist schemes /// </summary> /// <param name="codelists"> /// - if null will not add anything to the beans container /// </param> /// <param name="beans"> /// - to add codelist to /// </param> private void ProcessCodelists(CodelistsType codelists, ISdmxObjects beans) { var urns = new HashSet<Uri>(); if (codelists != null && codelists.Codelist != null) { /* foreach */ foreach (CodelistType currentType in codelists.Codelist) { try { this.AddIfNotDuplicateURN(beans, urns, new CodelistObjectCore(currentType)); } catch (Exception th) { throw new MaintainableObjectException( th, SdmxStructureType.GetFromEnum(SdmxStructureEnumType.CodeList), currentType.agencyID, currentType.id, currentType.version); } } } }