当前位置: 首页>>代码示例>>C#>>正文


C# IStructureReference类代码示例

本文整理汇总了C#中IStructureReference的典型用法代码示例。如果您正苦于以下问题:C# IStructureReference类的具体用法?C# IStructureReference怎么用?C# IStructureReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IStructureReference类属于命名空间,在下文中一共展示了IStructureReference类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Build

        /// <summary>
        /// Return a <see cref="ICategorisationObject"/>  with the specified <paramref name="categoryReference"/> and <paramref name="structureReference"/>
        /// </summary>
        /// <param name="categoryReference">
        /// The category reference.
        /// </param>
        /// <param name="structureReference">
        /// The structure reference.
        /// </param>
        /// <returns>
        /// The <see cref="ICategorisationObject"/>.
        /// </returns>
        public ICategorisationObject Build(IStructureReference categoryReference, IStructureReference structureReference)
        {
            ICategorisationMutableObject mutable = new CategorisationMutableCore();
            mutable.CategoryReference = categoryReference;
            mutable.StructureReference = structureReference;

            var structureRef = structureReference.MaintainableReference;
            var categorySchemeRef = categoryReference.MaintainableReference;
            string name =
                string.Format(
                    CultureInfo.InvariantCulture,
                    "{0}@{1}@{2}@{3}@{4}@{5}",
                    structureRef.MaintainableId,
                    structureRef.AgencyId,
                    structureRef.Version,
                    categorySchemeRef.MaintainableId,
                    categorySchemeRef.Version,
                    categoryReference.ChildReference.Id).Replace(".", string.Empty);
            mutable.Id = name.Length > 50 ? BuildHash(name) : name;

            mutable.Version = "1.0";
            mutable.AgencyId = categorySchemeRef.AgencyId;
            mutable.AddName("en", name);
            return mutable.ImmutableInstance;
        }
开发者ID:alcardac,项目名称:SDMXRI_ENH_WS,代码行数:37,代码来源:CategorisationBuilder.cs

示例2: DatasetStructureReferenceCore

        /// <summary>
        /// Initializes a new instance of the <see cref="DatasetStructureReferenceCore"/> class. 
        ///   Minimal Constructor
        /// </summary>
        /// <param name="structureReference">CategorisationStructure reference object
        /// </param>
        public DatasetStructureReferenceCore(IStructureReference structureReference)
        {
            this._dimensionAtObservation = DimensionObject.TimeDimensionFixedId;

            this._structureReference = structureReference;
            this.Validate();
        }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:13,代码来源:DatasetStructureReferenceCore.cs

示例3: GetComponentMapIds

        /// <summary>
        /// Gets the component map ids.
        /// </summary>
        /// <param name="state">
        /// The state.
        /// </param>
        /// <param name="dsdReference">
        /// The DSD reference.
        /// </param>
        /// <returns>
        /// The component id to primary key value dictionary
        /// </returns>
        public static IDictionary<string, long> GetComponentMapIds(DbTransactionState state, IStructureReference dsdReference)
        {
            IDictionary<string, long> map = new Dictionary<string, long>(StringComparer.Ordinal);

            var idParameter = state.Database.CreateInParameter("p_id", DbType.AnsiString, dsdReference.MaintainableId);
            var agencyParameter = state.Database.CreateInParameter("p_agency", DbType.AnsiString, dsdReference.AgencyId);
            var versionParameter = state.Database.CreateInParameter("p_version", DbType.AnsiString, dsdReference.Version);

            var queryFormat = dsdReference.MaintainableStructureEnumType.EnumType == SdmxStructureEnumType.Dsd
                                  ? "select c.COMP_ID, c.ID from COMPONENT c inner join ARTEFACT_VIEW a on a.ART_ID = c.DSD_ID where a.ID = {0} and a.AGENCY = {1} and a.VERSION = {2}"
                                  : "select c.COMP_ID, c.ID from COMPONENT c inner join DATAFLOW d on d.DSD_ID = c.DSD_ID inner join ARTEFACT_VIEW a on a.ART_ID = d.DF_ID where a.ID = {0} and a.AGENCY = {1} and a.VERSION = {2}";
            using (var command = state.Database.GetSqlStringCommandFormat(queryFormat, idParameter, agencyParameter, versionParameter))
            using (var reader = state.Database.ExecuteReader(command))
            {
                var sysIdOrdinal = reader.GetOrdinal("COMP_ID");
                var idOrdinal = reader.GetOrdinal("ID");

                while (reader.Read())
                {
                    map.Add(reader.GetString(idOrdinal), reader.GetInt64(sysIdOrdinal));
                }
            }

            return map;
        }
开发者ID:alcardac,项目名称:SDMXRI_ENH_WS,代码行数:37,代码来源:StructureCache.cs

示例4: RESTStructureQueryCore

        /// <summary>
        /// Initializes a new instance of the <see cref="RESTStructureQueryCore"/> class. 
        /// Creation of a Structure Query for structures that match the given reference
        /// </summary>
        /// <param name="structureReference">
        /// The structure reference. 
        /// </param>
	    public RESTStructureQueryCore(IStructureReference structureReference)
        {
		    this._structureReference = structureReference;
            if(structureReference.Version != null)
            {
		  	  _structureQueryMetadata = new StructureQueryMetadataCore(StructureQueryDetail.GetFromEnum(StructureQueryDetailEnumType.Null), null, null, false);
		    }
	    }
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:15,代码来源:RESTStructureQueryCore.cs

示例5: RESTSchemaQueryCore

          public RESTSchemaQueryCore(IStructureReference reference, string dimAtObs, bool explicitMeasure) 
          {
		     this._reference = reference;
		     if(ObjectUtil.ValidString(dimAtObs)) 
             {
			      this._dimAtObs = dimAtObs;
		     }
		     this._explicitMeasure = explicitMeasure;
	      }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:9,代码来源:RESTSchemaQueryCore.cs

示例6: IdentifiableRefObjetcImpl

        /// <summary>
        /// Initializes a new instance of the <see cref="IdentifiableRefObjetcImpl"/> class.
        /// </summary>
        /// <param name="maintainableParent">
        /// The maintainable parent.
        /// </param>
        /// <param name="id">
        /// The id.
        /// </param>
        /// <param name="targetStructureEnumType">
        /// The target structure enum type.
        /// </param>
        public IdentifiableRefObjetcImpl(
            IStructureReference maintainableParent, string id, SdmxStructureType targetStructureEnumType)
        {
            this._structureEnumType = targetStructureEnumType;
            this._maintainableParent = maintainableParent;
            this._id = id;

            Validate();
        }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:21,代码来源:IdentifiableRefObjetcImpl.cs

示例7: BuildErrorResponse

        ////// PRIVATE CONSTRUCTOR 
        ///// TODO java 0.9.1 has private ctor that is not accessed anywhere 
        ////#region Constructors and Destructors

        /////// <summary>
        /////// Prevents a default instance of the <see cref="SubmitStructureResponseBuilderV2"/> class from being created.
        /////// </summary>
        ////private SubmitStructureResponseBuilderV2()
        ////{
        ////}

        ////#endregion
        #region Public Methods and Operators

        /// <summary>
        /// The build error response.
        /// </summary>
        /// <param name="exception">
        /// The exception.
        /// </param>
        /// <param name="errorBean">
        /// The error bean.
        /// </param>
        /// <returns>
        /// The <see cref="RegistryInterface"/>.
        /// </returns>
        public RegistryInterface BuildErrorResponse(Exception exception, IStructureReference errorBean)
        {
            var responseType = new RegistryInterface();
            RegistryInterfaceType regInterface = responseType.Content;
            V2Helper.Header = regInterface;
            var returnType = new SubmitStructureResponseType();
            regInterface.SubmitStructureResponse = returnType;
            ProcessMaintainable(returnType, errorBean, exception);
            return responseType;
        }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:36,代码来源:SubmitStructureResponseBuilderV2.cs

示例8: IGetObjectsBase

		/// <summary>
		/// Returns a set of super beans that match the query parameter
		/// </summary>
		///
		/// <param name="structureQuery"></param>
		/// <returns></returns>
		private IObjectsBase IGetObjectsBase(IStructureReference xref) {
			ISet<IMaintainableObject> maintainables = this.SdmxObjectRetrievalManager
					.GetMaintainableWithReferences(xref);
			ISdmxObjects beans = new SdmxObjectsImpl(null, maintainables);
			if (superBeanBuilder == null) {
				throw new Exception(
						"SuperBeansBuilder not set, ISdmxBaseObjectRetrievalManagerImpl is @Configurable please ensure AspectJ weaving is enabled");
			}
			return superBeanBuilder.Build(beans);
		}
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:16,代码来源:SdmxSuperBeanRetrievalManagerImpl.cs

示例9: CrossReferenceImpl

        // 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();
        }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:23,代码来源:CrossReferenceImpl.cs

示例10: GetSubscriptions

		public virtual ISet<ISubscriptionMutableObject> GetSubscriptions(
				IStructureReference organisationReference) {
			ISet<ISubscriptionMutableObject> returnSet = new HashSet<ISubscriptionMutableObject>();
			ISet<ISubscriptionObject> queryResults = sdmxSubscriptionRetrievalManager
					.GetSubscriptions(organisationReference);
			/* foreach */
			foreach (ISubscriptionObject currentResult  in  queryResults) {
				returnSet.Add(new SubscriptionMutableCore(currentResult));
			}
			return returnSet;
		}
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:11,代码来源:SdmxMutableSubscriptionBeanRetrievalManagerImpl.cs

示例11: GetProvisions

		public virtual IList<IProvisionAgreementMutableObject> GetProvisions(
				IStructureReference xref) {
			IList<IProvisionAgreementMutableObject> returnedProvisions = new List<IProvisionAgreementMutableObject>();
			ISet<IProvisionAgreementObject> provisions = provisionBeanRetrievalManager
					.GetProvisions(xref);
			if (provisions != null) {
				/* foreach */
				foreach (IProvisionAgreementObject currentProvision  in  provisions) {
					returnedProvisions.Add(currentProvision.MutableInstance);
				}
			}
			return returnedProvisions;
		}
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:13,代码来源:SdmxMutableProvisionBeanRetrievalManagerImpl.cs

示例12: GetRegistrations

		public virtual ISet<IRegistrationMutableObject> GetRegistrations(
				IStructureReference xref) {
			ISet<IRegistrationMutableObject> returnSet = new HashSet<IRegistrationMutableObject>();
			ISet<IRegistrationObject> registrationBeans = registrationBeanRetrievalManager
					.GetRegistrations(xref);
			if (registrationBeans != null) {
				/* foreach */
				foreach (IRegistrationObject currentRegistration  in  registrationBeans) {
					returnSet.Add(currentRegistration.MutableInstance);
				}
			}
			return returnSet;
		}
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:13,代码来源:SdmxMutableRegistrationBeanRetrievalManagerImpl.cs

示例13: BuildErrorResponse

 /// <summary>
 /// Build error response for submission of provisions..
 /// </summary>
 /// <param name="exception">
 /// The exception.
 /// </param>
 /// <param name="structureReference">
 /// The structure Reference.
 /// </param>
 /// <param name="schemaVersion">
 /// The schema version.
 /// </param>
 /// <returns>
 /// The error response for submission of provisions
 /// </returns>
 public virtual XTypedElement BuildErrorResponse(
     Exception exception, IStructureReference structureReference, SdmxSchemaEnumType schemaVersion)
 {
     switch (schemaVersion)
     {
         case SdmxSchemaEnumType.VersionTwo:
             return this._submitProvisionResponseBuilderV2.BuildErrorResponse(exception);
         case SdmxSchemaEnumType.VersionTwoPointOne:
             return this._v21Builder.BuildErrorResponse(exception, structureReference);
         default:
             throw new SdmxNotImplementedException(ExceptionCode.Unsupported, schemaVersion);
     }
 }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:28,代码来源:SubmitProvisionResponseBuilder.cs

示例14: GetError

 /// <summary>
 /// Returns an error message with the specified <paramref name="format"/> for <paramref name="reference"/>
 /// </summary>
 /// <param name="format">
 /// The format.
 /// </param>
 /// <param name="reference">
 /// The component.
 /// </param>
 /// <returns>
 /// The error message.
 /// </returns>
 public string GetError(string format, IStructureReference reference)
 {
     IMaintainableRefObject maintainableRefObject = reference.MaintainableReference;
     return reference.HasChildReference()
                ? string.Format(
                    format,
                    maintainableRefObject.MaintainableId,
                    maintainableRefObject.AgencyId,
                    maintainableRefObject.Version,
                    reference.ChildReference.Id,
                    reference.TargetReference)
                : string.Format(format, maintainableRefObject.MaintainableId, maintainableRefObject.AgencyId, maintainableRefObject.Version, reference.TargetReference);
 }
开发者ID:alcardac,项目名称:SDMXRI_ENH_WS,代码行数:25,代码来源:ValidateStatusEngine.cs

示例15: InputOutputMutableCore

 /// <summary>
 /// Initializes a new instance of the <see cref="InputOutputMutableCore"/> class.
 /// </summary>
 /// <param name="inputOutputObject">
 /// The inputOutputObject. 
 /// </param>
 public InputOutputMutableCore(IInputOutputObject inputOutputObject)
     : base(inputOutputObject)
 {
     this._localId = inputOutputObject.LocalId;
     if (inputOutputObject.StructureReference != null)
     {
         this._structureReference = inputOutputObject.StructureReference.CreateMutableInstance();
     }
 }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:15,代码来源:InputOutputMutableCore.cs


注:本文中的IStructureReference类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。