public ConceptObjectBaseCore(IConceptObject concept,
				ICodelistObjectBase representation0) : base(concept) {
			this._representation = representation0;
			if (concept.CoreRepresentation != null) {
				this._textFormat = concept.CoreRepresentation.TextFormat;
			}
			this._builtFrom = concept;
		}
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryComponent"/> class.
 /// Initialize a new instance of the QueryComponent class for a coded component
 /// </summary>
 /// <param name="keyFamilyComponent">
 /// The component, value for <see cref="KeyFamilyComponent"/> property
 /// </param>
 /// <param name="concept">
 /// The concept used by this component, value for <see cref="Concept"/> property
 /// </param>
 /// <param name="codes">
 /// The selected code used by this component, value for <see cref="Concept"/> property
 /// </param>
 public QueryComponent(IComponent keyFamilyComponent, IConceptObject concept, List <ICode> codes)
 {
     this._keyFamilyComponent = keyFamilyComponent;
     this._concept            = concept;
     this._codeMap            = new Dictionary <string, ICode>(codes.Count);
     foreach (ICode code in codes)
     {
         this._codeMap.Add(code.Id, code);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Saves a component which does not have an associated artefact.
        /// </summary>
        /// <param name="conceptRef">
        /// the concept which identifies the component
        /// </param>
        /// <param name="value">
        /// the value
        /// </param>
        public void SaveComponent(string conceptRef, string value)
        {
            IDimension     dimension = Utils.GetComponentByName(this._keyFamily, conceptRef);
            IConceptObject concept   = this.GetCachedConcept(dimension);

            this.RemoveComponent(dimension);
            var qc = new QueryComponent(dimension, concept, value);

            this.UpdateComponentIndex(dimension, qc);
        }
Esempio n. 4
0
        /// <summary>
        /// Saves a component which has an associated artefact (all of them should have).
        /// </summary>
        /// <param name="dimension">
        /// the dimemnsion
        /// </param>
        /// <param name="codes">
        /// the codes
        /// </param>
        public void SaveComponent(IDimension dimension, List <ICode> codes)
        {
            IConceptObject concept = this.GetCachedConcept(dimension);

            this.RemoveComponent(dimension);
            var qc = new QueryComponent(dimension, concept, codes);

            this._codeTreeMap[dimension].CheckCodes(codes);

            this.UpdateComponentIndex(dimension, qc);
        }
Esempio n. 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QueryComponent"/> class.
        /// Initialize a new instance of the QueryComponent class for the TimeDimension component
        /// </summary>
        /// <param name="keyFamilyComponent">
        /// The component, value for <see cref="KeyFamilyComponent"/> property
        /// </param>
        /// <param name="concept">
        /// The concept used by this component, value for <see cref="Concept"/> property
        /// </param>
        /// <param name="startYear">
        /// The start year, value for <see cref="StartYear"/> property
        /// </param>
        /// <param name="endYear">
        /// The end year, value for <see cref="EndYear"/> property
        /// </param>
        /// <param name="startPeriod">
        /// The start period, value for <see cref="StartPeriod"/> property
        /// </param>
        /// <param name="endPeriod">
        /// The end period , value for <see cref="EndPeriod"/> property
        /// </param>
        public QueryComponent(
            IComponent keyFamilyComponent,
            IConceptObject concept,
            string startDate,
            string endDate
            )
        {
            this._keyFamilyComponent = keyFamilyComponent;
            this._concept            = concept;
            this._startDate          = startDate;

            this._endDate = endDate;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ConceptMutableCore"/> class.
        /// </summary>
        /// <param name="objTarget">
        /// The agencySchemeMutable target. 
        /// </param>
        public ConceptMutableCore(IConceptObject objTarget)
            : base(objTarget)
        {
            if (objTarget.CoreRepresentation != null)
            {
                this._coreRepresentation = new RepresentationMutableCore(objTarget.CoreRepresentation);
            }

            if (objTarget.IsoConceptReference != null)
            {
                this._isoConceptReference = objTarget.IsoConceptReference.CreateMutableInstance();
            }

            this._parent = objTarget.ParentConcept;
            this._parentAgency = objTarget.ParentAgency;
        }
Esempio n. 7
0
        /// <summary>
        /// Setter for the time dimension
        /// </summary>
        /// <param name="startYear">
        /// The start year
        /// </param>
        /// <param name="endYear">
        /// The end year
        /// </param>
        /// <param name="startDate">
        /// The start date
        /// </param>
        /// <param name="endDate">
        /// The end date
        /// </param>
        public void SetTimeComponent(string startDate, string endDate)
        {
            IDimension     dimension = this.KeyFamily.TimeDimension;
            IConceptObject concept   = this.GetCachedConcept(dimension);

            if (dimension == null)
            {
                throw new NsiClientException(Resources.ExceptionNoTimeDimension);
            }

            this.RemoveComponent(dimension);
            if (!string.IsNullOrEmpty(startDate))
            {
                var qc = new QueryComponent(dimension, concept, startDate, endDate);
                this.UpdateComponentIndex(dimension, qc);
            }
        }
Esempio n. 8
0
        public Concept(IConceptObject concept)
        {
            this._id = concept.Id;
            this._names = new List<TextTypeWrapper>();
            this._descriptions = new List<TextTypeWrapper>();

            foreach (var text in concept.Names)
                this._names.Add(new TextTypeWrapper(text.Locale, text.Value));
            foreach (var text in concept.Descriptions)
                this._descriptions.Add(new TextTypeWrapper(text.Locale, text.Value));

            this._coreRepresentation = concept.CoreRepresentation;
            this._isoConceptReference = concept.IsoConceptReference;
            this._parentAgency = concept.ParentAgency;
            this._parentConcept = concept.ParentConcept;
            this._uri = concept.Uri;
            this._urn = concept.Urn;
        }
		public ReportedAttributeObjectBaseCore(
				IMetadataAttribute correspondingMA,
				IReportedAttribute builtFrom,
				IIdentifiableRetrievalManager retrievalManager) : base(builtFrom) {
                    this.reportedAttributes = new List<IReportedAttributeBase>();
			this.builtFrom = builtFrom;
			concept = retrievalManager.GetIdentifiableObject<IConceptObject>(
					correspondingMA.ConceptRef, typeof(IConceptObject));
			if (correspondingMA.HasCodedRepresentation()) {
                this.codelist = retrievalManager.GetIdentifiableObject<ICodelistObject>(
						correspondingMA.Representation.RepresentationRef,
						typeof(ICodelistObject));
			}
			if (builtFrom.ReportedAttributes != null) {
				/* foreach */
				foreach (IReportedAttribute reportedAttribute  in  builtFrom
						.ReportedAttributes) {
					IMetadataAttribute metadataAttribute = GetMetadataAttributeForRepotedAttribtue(
							reportedAttribute, correspondingMA.MetadataAttributes);
					reportedAttributes.Add(new ReportedAttributeObjectBaseCore(metadataAttribute, reportedAttribute, retrievalManager));
				}
			}
		}
Esempio n. 10
0
        public void Merge(IConceptObject concept)
        {
            Concept _concept = new Concept(concept);

            this._names = new List<TextTypeWrapper>();
            foreach (TextTypeWrapper text in _concept.Names)
            {
                this._names.Add(new TextTypeWrapper(text.Locale, text.Value));
            }

            this._descriptions = new List<TextTypeWrapper>();
            foreach (TextTypeWrapper text in _concept.Descriptions)
            {
                this._descriptions.Add(new TextTypeWrapper(text.Locale, text.Value));
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryComponent"/> class. 
 /// Initialize a new instance of the QueryComponent class for a coded component
 /// </summary>
 /// <param name="keyFamilyComponent">
 /// The component, value for <see cref="KeyFamilyComponent"/> property
 /// </param>
 /// <param name="concept">
 /// The concept used by this component, value for <see cref="Concept"/> property
 /// </param>
 /// <param name="codes">
 /// The selected code used by this component, value for <see cref="Concept"/> property
 /// </param>
 public QueryComponent(IComponent keyFamilyComponent, IConceptObject concept, List<ICode> codes)
 {
     this._keyFamilyComponent = keyFamilyComponent;
     this._concept = concept;
     this._codeMap = new Dictionary<string, ICode>(codes.Count);
     foreach (ICode code in codes)
     {
         this._codeMap.Add(code.Id, code);
     }
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="QueryComponent"/> class. 
        /// Initialize a new instance of the QueryComponent class for the TimeDimension component
        /// </summary>
        /// <param name="keyFamilyComponent">
        /// The component, value for <see cref="KeyFamilyComponent"/> property
        /// </param>
        /// <param name="concept">
        /// The concept used by this component, value for <see cref="Concept"/> property
        /// </param>
        /// <param name="startYear">
        /// The start year, value for <see cref="StartYear"/> property
        /// </param>
        /// <param name="endYear">
        /// The end year, value for <see cref="EndYear"/> property
        /// </param>
        /// <param name="startPeriod">
        /// The start period, value for <see cref="StartPeriod"/> property
        /// </param>
        /// <param name="endPeriod">
        /// The end period , value for <see cref="EndPeriod"/> property
        /// </param>
        public QueryComponent(
            IComponent keyFamilyComponent,
            IConceptObject concept,
            string startDate,
            string endDate
           )
        {
            this._keyFamilyComponent = keyFamilyComponent;
            this._concept = concept;
            this._startDate = startDate;

            this._endDate = endDate;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryComponent"/> class. 
 /// Initialize a new instance of the QueryComponent class for a uncoded component
 /// </summary>
 /// <param name="keyFamilyComponent">
 /// The component, value for <see cref="KeyFamilyComponent"/> property
 /// </param>
 /// <param name="concept">
 /// The concept used by this component, value for <see cref="Concept"/> property
 /// </param>
 /// <param name="value">
 /// The value for <see cref="TextValue"/> property
 /// </param>
 public QueryComponent(IComponent keyFamilyComponent, IConceptObject concept, string value)
 {
     this._keyFamilyComponent = keyFamilyComponent;
     this._concept = concept;
     this._textValue = value;
 }
Esempio n. 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryComponent"/> class.
 /// Initialize a new instance of the QueryComponent class for a uncoded component
 /// </summary>
 /// <param name="keyFamilyComponent">
 /// The component, value for <see cref="KeyFamilyComponent"/> property
 /// </param>
 /// <param name="concept">
 /// The concept used by this component, value for <see cref="Concept"/> property
 /// </param>
 /// <param name="value">
 /// The value for <see cref="TextValue"/> property
 /// </param>
 public QueryComponent(IComponent keyFamilyComponent, IConceptObject concept, string value)
 {
     this._keyFamilyComponent = keyFamilyComponent;
     this._concept            = concept;
     this._textValue          = value;
 }