/// <summary> /// Creates meta-dataflow and categorisations based on the input meta-dataflow /// </summary> /// <param name="metadataflowsType"> /// - if null will not add anything to the sdmxObjects container /// </param> /// <param name="beans"> /// - to add meta-dataflow and categorisations to /// </param> protected internal void ProcessMetadataFlows(MetadataflowsType metadataflowsType, ISdmxObjects beans) { var urns = new HashSet<Uri>(); if (metadataflowsType != null && ObjectUtil.ValidCollection(metadataflowsType.Metadataflow)) { /* foreach */ foreach (MetadataflowType currentType in metadataflowsType.Metadataflow) { try { IMetadataFlow currentMetadataflow = new MetadataflowObjectCore(currentType); this.AddIfNotDuplicateURN(beans, urns, currentMetadataflow); // CATEGORISATIONS FROM METADATAFLOWS if (currentType.CategoryRef != null) { /* foreach */ foreach (CategoryRefType cateogryRefType in currentType.CategoryRef) { beans.AddCategorisation( new CategorisationObjectCore(currentMetadataflow, cateogryRefType)); } } } catch (Exception th) { throw new MaintainableObjectException( th, SdmxStructureType.GetFromEnum(SdmxStructureEnumType.MetadataFlow), currentType.agencyID, currentType.id, currentType.version); } } } }
/// <summary> /// Creates metadataflows on the input metadataflows /// </summary> /// <param name="mdfType"> /// - if null will not add anything to the beans container /// </param> /// <param name="beans"> /// - to add metadataflow to beans /// </param> private void ProcessMetadataFlows(MetadataflowsType mdfType, ISdmxObjects beans) { var urns = new HashSet<Uri>(); if (mdfType != null && ObjectUtil.ValidCollection(mdfType.Metadataflow)) { /* foreach */ foreach (MetadataflowType currentType in mdfType.Metadataflow) { try { IMetadataFlow currentMetadataflow = new MetadataflowObjectCore(currentType); this.AddIfNotDuplicateURN(beans, urns, currentMetadataflow); } catch (Exception th) { throw new MaintainableObjectException( th, SdmxStructureType.GetFromEnum(SdmxStructureEnumType.MetadataFlow), currentType.agencyID, currentType.id, currentType.version); } } } }