/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////BUILD FROM V2.1 SCHEMA ////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// #region Constructors and Destructors /// <summary> /// Initializes a new instance of the <see cref="ReportedAttributeObjectObjectCore"/> class. /// </summary> /// <param name="parent"> /// The parent. /// </param> /// <param name="type"> /// The type. /// </param> public ReportedAttributeObjectObjectCore(ISdmxObject parent, ReportedAttributeType type) : base(SdmxStructureType.GetFromEnum(SdmxStructureEnumType.MetadataReportAttribute), parent) { this.metadataText = new List<ITextTypeWrapper>(); this.reportedAttribute = new List<IReportedAttributeObject>(); this.id = type.id; if (ObjectUtil.ValidCollection(type.StructuredText)) { foreach (StructuredText text in type.StructuredText) { this.metadataText.Add(new TextTypeWrapperImpl(text.Content, this)); } } if (ObjectUtil.ValidCollection(type.Text)) { foreach (Text text0 in type.Text) { this.metadataText.Add(new TextTypeWrapperImpl(text0.Content, this)); } } if (type.AttributeSet != null) { foreach (ReportedAttributeType currentType in type.AttributeSet.ReportedAttribute) { this.reportedAttribute.Add(new ReportedAttributeObjectObjectCore(this, currentType)); } } this.simpleValue = type.value; this.Validate(); }
public ContactCore(IContactMutableObject mutableBean, ISdmxObject parent) : base(mutableBean, parent) { this.id = mutableBean.Id; CopyTextTypes(name, mutableBean.Names); CopyTextTypes(role, mutableBean.Names); CopyTextTypes(departments, mutableBean.Departments); if (mutableBean.Email != null) { this.email = new List<string>(mutableBean.Email); } if (mutableBean.Telephone != null) { this.telephone = new List<string>(mutableBean.Telephone); } if (mutableBean.Fax != null) { this.fax = new List<string>(mutableBean.Fax); } if (mutableBean.Uri != null) { this.uri = new List<string>(mutableBean.Uri); } if (mutableBean.X400 != null) { this.x400 = new List<string>(mutableBean.X400); } }
public ObjectBaseCore(ISdmxObject builtFrom) { if (builtFrom == null) { throw new ValidationException( "Super Bean missing the required ISdmxObject that it is built from"); } this._builtFrom = builtFrom; }
// FUNC this constructor does not account the sRef having the incorrect SdmxStructureType (i.e from a mutable agencySchemeMutableObject) #region Constructors and Destructors /// <summary> /// Initializes a new instance of the <see cref="CrossReferenceImpl"/> class. /// </summary> /// <param name="referencedFrom"> /// The referenced from. /// </param> /// <param name="structureReference"> /// The structure reference /// </param> public CrossReferenceImpl(ISdmxObject referencedFrom, IStructureReference structureReference) : base( structureReference.MaintainableReference.AgencyId, structureReference.MaintainableReference.MaintainableId, structureReference.MaintainableReference.Version, structureReference.TargetReference, structureReference.IdentifiableIds) { this._referencedFrom = referencedFrom; this.ValidateReference(); }
/// <summary> /// Initializes a new instance of the <see cref="CrossReferenceImpl"/> class. /// </summary> /// <param name="referencedFrom"> /// The referenced from. /// </param> /// <param name="agencyId"> /// The agency id. /// </param> /// <param name="maintainableId"> /// The maintainable id. /// </param> /// <param name="version"> /// The version. /// </param> /// <param name="structureType"> /// The structure type. /// </param> public CrossReferenceImpl( ISdmxObject referencedFrom, string agencyId, string maintainableId, string version, SdmxStructureType structureType) : base(agencyId, maintainableId, version, structureType) { this._referencedFrom = referencedFrom; this.ValidateReference(); }
public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) { return false; } var that = sdmxObject as IDataSetReference; if (that != null) { if (!ObjectUtil.Equivalent(this.DataProviderReference, that.DataProviderReference)) { return false; } if (!ObjectUtil.Equivalent(this.DatasetId, that.DatasetId)) { return false; } } return false; }
public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) { return false; } var that = sdmxObject as IMetadataTargetKeyValues; if (that != null) { if (!ObjectUtil.EquivalentCollection(this._objectReferences, that.ObjectReferences)) { return false; } if (!base.Equivalent(this._datasetReferences, that.DatasetReferences, includeFinalProperties)) { return false; } return true; } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (ICubeRegion)sdmxObject; if (!ObjectUtil.EquivalentCollection(this.keyValues, that.KeyValues)) { return false; } if (!ObjectUtil.EquivalentCollection(this.attributeValues, that.AttributeValues)) { return false; } return true; } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (ICode)sdmxObject; if (!ObjectUtil.Equivalent(this.parentCode, that.ParentCode)) { return false; } return this.DeepEqualsNameable(that, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (IConceptObject)sdmxObject; if (!ObjectUtil.Equivalent(this.parentConcept, that.ParentConcept)) { return false; } if (!ObjectUtil.Equivalent(this.parentAgency, that.ParentAgency)) { return false; } if (!this.Equivalent(this.isoConceptReference, that.IsoConceptReference)) { return false; } if (!this.Equivalent(this.coreRepresentation, that.CoreRepresentation, includeFinalProperties)) { return false; } return this.DeepEqualsNameable(that, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject.StructureType == this.StructureType) { var that = (IMetadataAttributeObject)sdmxObject; if (!this.Equivalent(this.metadataAttributes, that.MetadataAttributes, includeFinalProperties)) { return false; } if (!ObjectUtil.Equivalent(this.minOccurs, that.MinOccurs)) { return false; } if (!ObjectUtil.Equivalent(this.maxOccurs, that.MaxOccurs)) { return false; } if (this.presentational != that.Presentational) { return false; } return this.DeepEqualsInternal(that, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (IComponentMapObject)sdmxObject; if (!ObjectUtil.Equivalent(this.mapConceptRef, that.MapConceptRef)) { return false; } if (!ObjectUtil.Equivalent(this.mapTargetConceptRef, that.MapTargetConceptRef)) { return false; } if (!this.Equivalent(this.repMapRef, that.RepMapRef, includeFinalProperties)) { return false; } return this.DeepEqualsInternalAnnotable(that, includeFinalProperties); } return false; }
/// <summary> /// Gets a value indicating whether the SdmxObject equals the given sdmxObject in every respect (except for the validTo property of a maintainable artefact, this is not taken into consideration) /// <p/> /// This method calls deepEquals on any SdmxObject composites. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> /// Set to true to check final properties. /// </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { throw new NotImplementedException(); }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if(sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (ICategoryObject)sdmxObject; if (!this.Equivalent(this._categories, that.Items, includeFinalProperties)) { return false; } return this.DeepEqualsNameable(that, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (IReportingCategoryObject)sdmxObject; if (!ObjectUtil.Equivalent(this.structuralMetadata, that.StructuralMetadata)) { return false; } if (!ObjectUtil.Equivalent(this.provisioningMetadata, that.ProvisioningMetadata)) { return false; } if (!this.Equivalent(this.reportingCategories, that.Items, includeFinalProperties)) { return false; } return this.DeepEqualsNameable(that, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (IMeasureList)sdmxObject; if (!this.Equivalent(this.primaryMeasure, that.PrimaryMeasure, includeFinalProperties)) { return false; } return this.DeepEqualsInternal(that, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (ISchemeMapObject)sdmxObject; if (ObjectUtil.Equivalent(this.sourceRef, that.SourceRef)) { return false; } if (ObjectUtil.Equivalent(this.targetRef, that.TargetRef)) { return false; } return this.DeepEqualsNameable(that, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The agencyScheme. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (ICategoryMap)sdmxObject; if (!ObjectUtil.EquivalentCollection(this.sourceId, that.SourceId)) { return false; } if (!ObjectUtil.EquivalentCollection(this.targetId, that.TargetId)) { return false; } if (!ObjectUtil.Equivalent(this.alias, that.Alias)) { return false; } return true; } return false; }
/// <summary> /// Initializes a new instance of the <see cref="CrossReferenceImpl"/> class. /// </summary> /// <param name="referencedFrom"> /// The referenced from. /// </param> /// <param name="urn"> /// The urn. /// </param> public CrossReferenceImpl(ISdmxObject referencedFrom, Uri urn) : base(urn) { this._referencedFrom = referencedFrom; this.ValidateReference(); }
/// <summary> /// Initializes a new instance of the <see cref="CrossReferenceImpl"/> class. /// </summary> /// <param name="referencedFrom"> /// The referenced from. /// </param> /// <param name="agencyId"> /// The agency id. /// </param> /// <param name="maintainableId"> /// The maintainable id. /// </param> /// <param name="version"> /// The version. /// </param> /// <param name="structureType"> /// The structure type. /// </param> /// <param name="identifiableIds"> /// The identifiable ids. /// </param> public CrossReferenceImpl( ISdmxObject referencedFrom, string agencyId, string maintainableId, string version, SdmxStructureEnumType structureType, params string[] identifiableIds) : base(agencyId, maintainableId, version, structureType, identifiableIds) { this._referencedFrom = referencedFrom; this.ValidateReference(); }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (ILevelObject)sdmxObject; if (!this.Equivalent(this.childLevel, that.ChildLevel, includeFinalProperties)) { return false; } if (!this.Equivalent(this.textFormat, that.CodingFormat, includeFinalProperties)) { return false; } return this.DeepEqualsNameable(that, includeFinalProperties); } return false; }
/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////DEEP VALIDATION ////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// #region Public Methods and Operators /// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The agencyScheme. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { return this.DeepEqualsNameable((IConceptSchemeMapObject)sdmxObject, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (IRelatedStructures)sdmxObject; if (!ObjectUtil.EquivalentCollection(this._keyFamilyRef, that.DataStructureRef)) { return false; } if (!ObjectUtil.EquivalentCollection(this._metadataStructureRef, that.MetadataStructureRef)) { return false; } if (!ObjectUtil.EquivalentCollection(this._conceptSchemeRef, that.ConceptSchemeRef)) { return false; } if (!ObjectUtil.EquivalentCollection(this._categorySchemeRef, that.CategorySchemeRef)) { return false; } if (!ObjectUtil.EquivalentCollection(this._orgSchemeRef, that.OrgSchemeRef)) { return false; } if (!ObjectUtil.EquivalentCollection(this._hierCodelistRef, that.HierCodelistRef)) { return false; } return true; } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject.StructureType == this.StructureType) { var that = (IMetadataTarget)sdmxObject; if (!this.Equivalent(this.constraintContentTarget, that.ConstraintContentTarget, includeFinalProperties)) { return false; } if (!this.Equivalent(this.dataSetTarget, that.DataSetTarget, includeFinalProperties)) { return false; } if (!this.Equivalent(this.keyDescriptorValuesTarget, that.KeyDescriptorValuesTarget, includeFinalProperties)) { return false; } if (!this.Equivalent(this.reportPeriodTarget, that.ReportPeriodTarget, includeFinalProperties)) { return false; } if (!this.Equivalent(this._identifiableTarget, that.IdentifiableTarget, includeFinalProperties)) { return false; } return this.DeepEqualsInternal(that, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (IDimension)sdmxObject; if (this.measureDimension != that.MeasureDimension) { return false; } if (this.timeDimension != that.TimeDimension) { return false; } if (this.Position != that.Position) { return false; } if (!ObjectUtil.EquivalentCollection(this.conceptRole, that.ConceptRole)) { return false; } return this.DeepEqualsInternal(that, includeFinalProperties); } return false; }
/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////DEEP EQUALS ////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// #region Public Methods and Operators /// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if(sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (IRepresentation)sdmxObject; if (!this.Equivalent(this.representation, that.Representation)) { return false; } if (!this.Equivalent(this.textFormat, that.TextFormat, includeFinalProperties)) { return false; } return true; } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (IInputOutputObject)sdmxObject; if (!this.Equivalent(this.structureReference, that.StructureReference)) { return false; } if (!ObjectUtil.Equivalent(this.localId, that.LocalId)) { return false; } return this.DeepEqualsInternalAnnotable(that, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The agencyScheme. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (ICodelistMapObject)sdmxObject; if (!ObjectUtil.Equivalent(this.srcAlias, that.SrcAlias)) { return false; } if (!ObjectUtil.Equivalent(this.srcAlias, that.TargetAlias)) { return false; } return this.DeepEqualsNameable(that, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The agencyScheme. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (IAttributeObject)sdmxObject; if (!ObjectUtil.Equivalent(this.attachmentLevel, that.AttachmentLevel)) { return false; } if (!ObjectUtil.Equivalent(this.assignmentStatus, that.AssignmentStatus)) { return false; } if (!ObjectUtil.Equivalent(this.attachmentGroup, that.AttachmentGroup)) { return false; } if (!ObjectUtil.EquivalentCollection(this.dimensionReferences, that.DimensionReferences)) { return false; } if (!ObjectUtil.EquivalentCollection(this.conceptRoles, that.ConceptRoles)) { return false; } if (!ObjectUtil.Equivalent(this.primaryMeasureReference, that.PrimaryMeasureReference)) { return false; } return this.DeepEqualsInternal(that, includeFinalProperties); } return false; }
/// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject.StructureType == this.StructureType) { var that = (IReportPeriodTarget)sdmxObject; if (!ObjectUtil.Equivalent(this.startTime, that.StartTime)) { return false; } if (!ObjectUtil.Equivalent(this.endTime, that.EndTime)) { return false; } return this.DeepEqualsInternal(that, includeFinalProperties); } return false; }
/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////DEEP EQUALS ////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// #region Public Methods and Operators /// <summary> /// The deep equals. /// </summary> /// <param name="sdmxObject"> /// The sdmxObject. /// </param> /// <param name="includeFinalProperties"> </param> /// <returns> /// The <see cref="bool"/> . /// </returns> public override bool DeepEquals(ISdmxObject sdmxObject, bool includeFinalProperties) { if (sdmxObject == null) return false; if (sdmxObject.StructureType == this.StructureType) { var that = (ITransition)sdmxObject; if (!this.Equivalent(this.condition, that.Condition, includeFinalProperties)) { return false; } if (!ObjectUtil.Equivalent(this.targetStep, that.TargetStep)) { return false; } if (!ObjectUtil.Equivalent(this.localId, that.LocalId)) { return false; } return this.DeepEqualsInternal(that, includeFinalProperties); } return false; }