public MetadataTargetKeyValuesCore(ComponentValueSetType keyValueType, IMetadataTargetRegion parent) : base(keyValueType, parent) { _objectReferences = new List<ICrossReference>(); _datasetReferences = new List<IDataSetReference>(); if (keyValueType.DataSet != null) { foreach (SetReferenceType currentDatasetRef in keyValueType.DataSet) { this._datasetReferences.Add(new DataSetReferenceCore(currentDatasetRef, this)); } } if (keyValueType.Object != null) { foreach (ObjectReferenceType currentRef in keyValueType.Object) { this._objectReferences.Add(RefUtil.CreateReference(this, currentRef)); } } }
/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////BUILD FROM V2.1 SCHEMA ////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// #region Constructors and Destructors /// <summary> /// Initializes a new instance of the <see cref="DataKeyObjectCore"/> class. /// </summary> /// <param name="parent"> /// The parent. /// </param> /// <param name="type"> /// The type. /// </param> public DataKeyObjectCore(IReferenceValue parent, ComponentValueSetType type) : base(SdmxStructureType.GetFromEnum(SdmxStructureEnumType.KeyValues), parent) { this.included = type.include; this.keyValue = new KeyValueImpl(type.Value[0].TypedValue, type.id); }
/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////BUILD FROM V2.1 SCHEMA ////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <see cref="KeyValuesCore"/> class. /// </summary> /// <param name="keyValueType"> /// The key value type. /// </param> /// <param name="parent"> /// The parent. /// </param> public KeyValuesCore(ComponentValueSetType keyValueType, ISdmxStructure parent) : base(SdmxStructureType.GetFromEnum(SdmxStructureEnumType.KeyValues), parent) { this.values = new List<string>(); this.caseCadeList = new List<string>(); this.id = keyValueType.id; if (keyValueType.Value != null) { foreach (SimpleValueType dataKeyType in keyValueType.Value) { this.values.Add(dataKeyType.TypedValue); if (dataKeyType.cascadeValues) { this.caseCadeList.Add(dataKeyType.TypedValue); } } } if (keyValueType.TimeRange != null) { this.timeRange = new TimeRangeCore(keyValueType.TimeRange, this); } Validate(); }
/// <summary> /// Initializes a new instance of the <see cref="KeyValuesMutableImpl"/> class. /// </summary> /// <param name="keyValueType"> /// The key value type. /// </param> public KeyValuesMutableImpl(ComponentValueSetType keyValueType) : base(SdmxStructureType.GetFromEnum(SdmxStructureEnumType.KeyValues)) { this.values = new List<string>(); this.cascadeList = new List<string>(); this.id = keyValueType.id; if (keyValueType.Value != null) { foreach (SimpleValueType dataKeyType in keyValueType.Value) { this.values.Add(dataKeyType.TypedValue); if (dataKeyType.cascadeValues) { this.cascadeList.Add(dataKeyType.TypedValue); } } } if (keyValueType.TimeRange != null) { this.timeRange = new TimeRangeMutableCore(keyValueType.TimeRange); } }