• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IDataflowObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetDataReaderEngine

        /// <summary>
        /// Obtains a DataReaderEngine that is capable of reading the data which is exposed via the ReadableDataLocation
        /// </summary>
        /// <param name="sourceData">The source data, giving access to an InputStream of the data.</param>
        /// <param name="dsd">The Data Structure Definition, describes the data in terms of the dimensionality.</param>
        /// <param name="dataflow">The dataflow (optional). Provides further information about the data.</param>
        /// <returns>The <see cref="IDataReaderEngine"/>; otherwise null if the <paramref name="sourceData"/> cannot be read.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="sourceData"/> is null -or- <paramref name="dsd"/> is null</exception>
        public IDataReaderEngine GetDataReaderEngine(IReadableDataLocation sourceData, IDataStructureObject dsd, IDataflowObject dataflow)
        {
            _log.Debug("Get DataReader Engine");

            if (sourceData == null)
            {
                throw new ArgumentNullException("sourceData");
            }

            if (dsd == null)
            {
                throw new ArgumentNullException("dsd");
            }

            MessageEnumType messageType;
            try
            {
                messageType = SdmxMessageUtil.GetMessageType(sourceData);
            }
            catch (Exception e)
            {
               _log.Error("While trying to get the message type.", e);
                return null;
            }

            var dataFormat = this.GetDataFormat(sourceData, messageType);

            if (dataFormat != null && dataFormat.SdmxDataFormat != null)
            {
                switch (dataFormat.SdmxDataFormat.BaseDataFormat.EnumType)
                {
                    case BaseDataFormatEnumType.Compact:
                        return new CompactDataReaderEngine(sourceData, dataflow, dsd);
                    case BaseDataFormatEnumType.Generic:
                        return new GenericDataReaderEngine(sourceData, dataflow, dsd);
                    case BaseDataFormatEnumType.CrossSectional:
                        var crossDsd = dsd as ICrossSectionalDataStructureObject;
                        if (crossDsd == null)
                        {
                            throw new SdmxNotImplementedException("Not supported. Reading from CrossSectional Data for non cross-sectional dsd.");
                        }

                        return new CrossSectionalDataReaderEngine(sourceData, crossDsd, dataflow);
                    case BaseDataFormatEnumType.Edi:
                        if (this._ediParseManager != null)
                        {
                            return this._ediParseManager.ParseEdiMessage(sourceData).GetDataReader(dsd, dataflow);
                        }

                        break;
                    default:
                        _log.WarnFormat("SdmxDataReaderFactory encountered unsupported SDMX format: {0} ", dataFormat);
                        break;
                }
            }

            return null;
        }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:66,代码来源:SdmxDataReaderFactory.cs


示例2: Log

        /// <summary>
        /// Logs the specified dataflow identifier.
        /// </summary>
        /// <param name="dataflow">The dataflow identifier.</param>
        /// <exception cref="ArgumentNullException"><paramref name="dataflow"/> is <see langword="null" />.</exception>
        public void Log(IDataflowObject dataflow)
        {
            if (dataflow == null)
            {
                throw new ArgumentNullException("dataflow");
            }

            _log.InfoFormat("{0}{1}{2}", dataflow.Id, this._separator, this._dataFormat);
        }
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:14,代码来源:DataflowLogManager.cs


示例3: DataflowObjectBaseCore

		public DataflowObjectBaseCore(IDataflowObject dataflow,
				IDataStructureObjectBase keyFamily0) : base(dataflow) {
			if (keyFamily0 == null) {
				throw new ValidationException(
						"DataflowObjectBaseCore requires IKeyFamilyObjectBase");
			}
			this._keyFamily = keyFamily0;
			this._dataflow = dataflow;
			//TODO Build KeyFamily Ref once the uniqueness constraints have been implemented on the schemas
	
		}
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:11,代码来源:DataflowSuperBeanImpl.cs


示例4: GetDataReaderEngine

        /// <summary>
        /// Obtains a DataReaderEngine that is capable of reading the data which is exposed via the ReadableDataLocation
        /// </summary>
        /// <param name="sourceData">
        /// SourceData - giving access to an InputStream of the data
        /// </param>
        /// <param name="dsd">
        /// Describes the data in terms of the dimensionality
        /// </param>
        /// <param name="dataflowObject">
        /// The data flow object (optional)
        /// </param>
        /// <returns>
        /// The data reader engine
        /// </returns>
        /// throws SdmxNotImplementedException if ReadableDataLocation or DataStructureBean is null, also if additioanlInformation is not of the expected type
        public IDataReaderEngine GetDataReaderEngine(IReadableDataLocation sourceData, IDataStructureObject dsd, IDataflowObject dataflowObject)
        {
            foreach (var currentFactory in this._engines)
            {
                IDataReaderEngine dre = currentFactory.GetDataReaderEngine(sourceData, dsd, dataflowObject);
                if (dre != null)
                {
                    return dre;
                }
            }

            throw new SdmxNotImplementedException("Data format is either not supported, or has an invalid syntax");
        }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:29,代码来源:DataReaderManager.cs


示例5: UpdateReferences

        /// <summary>
        /// The update references.
        /// </summary>
        /// <param name="maintianable">
        /// The maintianable.
        /// </param>
        /// <param name="updateReferences">
        /// The update references.
        /// </param>
        /// <param name="newVersionNumber">
        /// The new version number.
        /// </param>
        /// <returns>
        /// The <see cref="IDataflowObject"/>.
        /// </returns>
        public IDataflowObject UpdateReferences(IDataflowObject maintianable, IDictionary<IStructureReference, IStructureReference> updateReferences, string newVersionNumber)
        {
            IDataflowMutableObject df = maintianable.MutableInstance;
            df.Version = newVersionNumber;

            IStructureReference newTarget = updateReferences[df.DataStructureRef];

            if (newTarget != null)
            {
                df.DataStructureRef = newTarget;
            }

            return df.ImmutableInstance;
        }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:29,代码来源:DataflowCrossReferenceUpdaterEngine.cs


示例6: Build

 public IDataQuery Build(IDataStructureObject dsd, IDataflowObject dataflowObject)
 {
     IDataQuerySelection dataQuerySelection = new DataQueryDimensionSelectionImpl("FREQ", "M", "A");
     IDataQuerySelectionGroup dataQuerySelectionGroup = new DataQuerySelectionGroupImpl(new HashSet<IDataQuerySelection> { dataQuerySelection }, new SdmxDateCore("2000-01"), new SdmxDateCore("2005-03"));
     return new DataQueryImpl(
         dataStructure: dsd,
         lastUpdated: null,
         dataQueryDetail: DataQueryDetail.GetFromEnum(DataQueryDetailEnumType.Full),
         firstNObs: null,
         lastNObs: null,
         dataProviders: null,
         dataflow: dataflowObject,
         dimensionAtObservation: "TIME_PERIOD",
         selectionGroup: new[] { dataQuerySelectionGroup });
 }
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:15,代码来源:BuildDataQuery.cs


示例7: WriteSampleData

	    public void WriteSampleData(IDataStructureObject dsd, IDataflowObject dataflow, IDataWriterEngine dwe) {
			dwe.StartDataset(dataflow, dsd, null);
			
			dwe.StartSeries();
			dwe.WriteSeriesKeyValue("COUNTRY", "UK");
			dwe.WriteSeriesKeyValue("INDICATOR", "E_P");
			dwe.WriteObservation("2000", "18,22");
			dwe.WriteObservation("2000-02", "17,63");
			
			dwe.StartSeries();
			dwe.WriteSeriesKeyValue("COUNTRY", "FR");
			dwe.WriteSeriesKeyValue("INDICATOR", "E_P");
			dwe.WriteObservation("2000", "22,22");
			dwe.WriteObservation("2000-Q3", "15,63");
			
			dwe.Close();
		}
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:17,代码来源:SampleDataWriter.cs


示例8: writeSampleData

        public void writeSampleData(IDataStructureObject dsd, IDataflowObject dataflow, IDataWriterEngine dwe){
           //Step 1. Writing sample data. 
            //1)	Start the dataset
            dwe.StartDataset(dataflow, dsd, null);

            //2)	Start the dataset series
            dwe.StartSeries();

            //3)	Write dimensions
            dwe.WriteSeriesKeyValue("FREQ", "Q");
            dwe.WriteSeriesKeyValue("REF_AREA","IT");
            dwe.WriteSeriesKeyValue("ADJUSTMENT","W");
            dwe.WriteSeriesKeyValue("STS_INDICATOR","E_P");
            dwe.WriteSeriesKeyValue("STS_ACTIVITY","NS0020");
            dwe.WriteSeriesKeyValue("STS_INSTITUTION","1");
            dwe.WriteSeriesKeyValue("STS_BASE_YEAR","2000");

            //4)	Write Attribute at Series Level
            dwe.WriteAttributeValue("TIME_FORMAT", "P3M");

            //5)	Write the observations
            dwe.WriteObservation("2000-Q1", "18,22");
            dwe.WriteObservation("2000-Q2", "17,63");

            //6)	Write Attribute at Observation Level
            dwe.WriteAttributeValue("OBS_STATUS", "C");

            //7)	Repeat the steps from 2 to 6 to create another dataset series 
            dwe.StartSeries();
            dwe.WriteSeriesKeyValue("FREQ", "M");
            dwe.WriteSeriesKeyValue("REF_AREA", "SP");
            dwe.WriteSeriesKeyValue("ADJUSTMENT", "N");
            dwe.WriteSeriesKeyValue("STS_INDICATOR", "PROD");
            dwe.WriteSeriesKeyValue("STS_ACTIVITY", "NS0030");
            dwe.WriteSeriesKeyValue("STS_INSTITUTION", "1");
            dwe.WriteSeriesKeyValue("STS_BASE_YEAR", "2001");
            dwe.WriteAttributeValue("TIME_FORMAT", "P1M");
            dwe.WriteObservation("2000-01", "18,22");
            dwe.WriteObservation("2000-02", "17,63");
            dwe.WriteAttributeValue("OBS_STATUS", "S");

            //8)	Close the dataset
            dwe.Close();

        }
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:45,代码来源:SampleDataWriter.cs


示例9: GetDefaultLayout

        public static LayoutObj GetDefaultLayout(IDataflowObject df, IDataStructureObject kf)
        {
            LayoutObj lay = FindInConfigFile(df, kf);
            if (lay != null)
                return lay;

            lay = new LayoutObj();
            foreach (var item in kf.DimensionList.Dimensions)
            {
                if (item.TimeDimension)
                    lay.axis_y.Add(item.Id);
                else if (item.FrequencyDimension)
                    lay.axis_z.Add(item.Id);
                else
                    lay.axis_x.Add(item.Id);
            }
            return lay;
        }
开发者ID:alcardac,项目名称:SDMX_DATA_BROWSER,代码行数:18,代码来源:LayoutWidget.cs


示例10: StartDataset

        public void StartDataset(string dsdName, IDataflowObject dataflow, IDataStructureObject dsd, IDatasetHeader header, params IAnnotation[] annotations)
        {

            string appPath = System.Web.HttpRuntime.AppDomainAppPath;
            string giorno = System.Web.HttpContext.Current.Timestamp.Day.ToString();
            string ora = System.Web.HttpContext.Current.Timestamp.Hour.ToString();
            string min = System.Web.HttpContext.Current.Timestamp.Minute.ToString();
            string secondi = System.Web.HttpContext.Current.Timestamp.Second.ToString();
            string ms = System.Web.HttpContext.Current.Timestamp.Millisecond.ToString();
            string namedir = giorno + ora + min + secondi + ms;
            
            dirPath = appPath + namedir;

            DirectoryInfo MyRoot = new DirectoryInfo(@appPath);
            MyRoot.CreateSubdirectory(namedir);

            IList<IDimension> dimensions = dsd.GetDimensions(SdmxStructureEnumType.Dimension);
            string[] ordinamento1 = new string[dimensions.Count];
            string[] ordinamento2 = new string[dsd.Components.Count];


            ordine = new string[dimensions.Count];
            ordineser = new string[dimensions.Count];
            int indord = 0;

            string valoredati = "";

            IList<IDimension> dimensions1 = dsd.GetDimensions(SdmxStructureEnumType.Dimension);
            foreach (IDimension dim in dimensions1)
            {
                _CsvZipDataWriter.WriteValue(dim.Id + "_code,");
                valoredati += dim.Id + "_code,";
                ordine[indord] = dim.Id;
                indord++;
            }

            valoredati += "VALUE,date";
            string newLinedati = string.Format("{0}{1}", valoredati, Environment.NewLine);

            csvdati.Append(newLinedati);

        }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:42,代码来源:CsvZipBaseDataWriter.cs


示例11: VerifyNames

        public List<DsplStructure.Languages> VerifyNames(IDataflowObject dataflow)
        {
            var Languages = new List<DsplStructure.Languages>();
            var Lang = new DsplStructure.Languages();
            bool exists = new bool();

                foreach (var item in dataflow.Names)
                {
                    foreach (var lang in Languages)
                    {
                        if (lang.lang == item.Locale)
                        {
                            exists = true;
                        }
                    }
                    if (!exists)
                    {
                        Lang.lang = item.Locale;
                        Languages.Add(Lang);    
                    }                                 
                }
            return Languages;
            
        }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:24,代码来源:DsplBaseDataWriter.cs


示例12: StartDataset

 /// <summary>
 /// Starts a dataset with the data conforming to the DSD
 /// </summary>
 /// <param name="dataflow">Optional. The dataflow can be provided to give extra information about the dataset.</param>
 /// <param name="dsd">The <see cref="IDataStructureObject" /> for which the dataset will be created</param>
 /// <param name="header">The <see cref="IHeader" /> of the dataset</param>
 /// <param name="annotations">Any additional annotations that are attached to the dataset, can be null if no annotations exist</param>
 /// <exception cref="System.ArgumentNullException">if the <paramref name="dsd" /> is null</exception>
 public override void StartDataset(IDataflowObject dataflow, IDataStructureObject dsd, IDatasetHeader header, params IAnnotation[] annotations)
 {
     base.StartDataset(dataflow, dsd, header, annotations);
     this._primaryMeasureConcept = this.GetComponentId(dsd.PrimaryMeasure);
     this._compactNs = this.TargetSchema.EnumType != SdmxSchemaEnumType.VersionTwoPointOne
                           ? this.Namespaces.DataSetStructureSpecific
                           : NamespacePrefixPair.Empty;
     this._obsConcept = this.IsTwoPointOne
                            ? this.DimensionAtObservation
                            : ConceptRefUtil.GetConceptId(this.KeyFamily.TimeDimension.ConceptRef);
     if (this.IsTwoPointOne)
     {
         this.WriteAnnotations(ElementNameTable.AnnotationType, annotations);
     }
     else
     {
         this._datasetAnnotations = annotations;
     }
 }
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:27,代码来源:CompactDataWriterEngine.cs


示例13: KeyableImpl

        /// <summary>
        /// Initializes a new instance of the <see cref="KeyableImpl" /> class.
        /// </summary>
        /// <param name="dataflowObject">The dataflow object.</param>
        /// <param name="dataStructureObject">The data structure object.</param>
        /// <param name="key">The key .</param>
        /// <param name="attributes">The attributes .</param>
        /// <param name="groupName">The group name .</param>
        /// <param name="timeFormat">The time format .</param>
        /// <param name="annotations">The annotations.</param>
        /// <exception cref="System.ArgumentException">Data Structure can not be null</exception>
        public KeyableImpl(IDataflowObject dataflowObject,
            IDataStructureObject dataStructureObject,
            IList<IKeyValue> key, IList<IKeyValue> attributes, string groupName, TimeFormat timeFormat
            ,params IAnnotation[] annotations)
        {
            this._dataStructure = dataStructureObject;
            this._dataflow = dataflowObject;
            this._attributes = new List<IKeyValue>();
            this._key = new List<IKeyValue>();
            this._attributeMap = new Dictionary<string, IKeyValue>();
            this._keyMap = new Dictionary<string, string>();
            this._annotations = new List<IAnnotation>();
            this._isTimeSeries = true;

            if (_dataStructure == null)
            {
                throw new ArgumentException("Data Structure can not be null");
            }

            this._series = string.IsNullOrWhiteSpace(groupName);

            if (attributes != null)
            {
                this._attributes = new List<IKeyValue>(attributes);

                foreach (IKeyValue currentKv in attributes)
                {
                    this._attributeMap.Add(currentKv.Concept, currentKv);
                }
            }

            if (key != null)
            {
                this._key = new List<IKeyValue>(key);
                foreach (IKeyValue currentKv4 in key)
                {
                    this._keyMap.Add(currentKv4.Concept, currentKv4.Code);
                }
            }

            if(annotations != null)
            {
			   foreach(IAnnotation currentAnnotation in annotations) 
               {
				  this._annotations.Add(currentAnnotation);
			   }
		    }

            this._groupName = groupName;
            this._timeFormat = timeFormat;
        }
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:62,代码来源:KeyableImpl.cs


示例14: AbstractSdmxDataReaderEngine

 /// <summary>
 /// Initializes a new instance of the <see cref="AbstractSdmxDataReaderEngine"/> class.
 /// </summary>
 /// <param name="dataLocation">
 /// The data Location.
 /// </param>
 /// <param name="objectRetrieval">
 /// The SDMX Object Retrieval. giving the ability to retrieve DSDs for the datasets this
 ///     reader engine is reading.  This can be null if there is only one relevant DSD - in which case the
 ///     <paramref name="defaultDsd"/> should be provided.
 /// </param>
 /// <param name="defaultDataflow">
 /// The default Dataflow. (Optional)
 /// </param>
 /// <param name="defaultDsd">
 /// The default DSD. The default DSD to use if the <paramref name="objectRetrieval"/> is null, or
 ///     if the bean retrieval does not return the DSD for the given dataset.
 /// </param>
 /// <exception cref="System.ArgumentException">
 /// AbstractDataReaderEngine expects either a ISdmxObjectRetrievalManager or a
 ///     IDataStructureObject to be able to interpret the structures
 /// </exception>
 protected AbstractSdmxDataReaderEngine(IReadableDataLocation dataLocation, ISdmxObjectRetrievalManager objectRetrieval, IDataflowObject defaultDataflow, IDataStructureObject defaultDsd)
     : base(dataLocation, objectRetrieval, defaultDataflow, defaultDsd)
 {
     this._isTwoPointOne = SdmxMessageUtil.GetSchemaVersion(dataLocation) == SdmxSchemaEnumType.VersionTwoPointOne;
 }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:27,代码来源:AbstractSdmxDataReaderEngine.cs


示例15: CompactDataReaderEngine

 /// <summary>
 /// Initializes a new instance of the <see cref="CompactDataReaderEngine"/> class.
 /// </summary>
 /// <param name="dataLocation">
 /// The data Location.
 /// </param>
 /// <param name="defaultDataflow">
 /// The default Dataflow. (Optional)
 /// </param>
 /// <param name="defaultDsd">
 /// The default DSD. The default DSD to use if the
 ///     <paramref>
 ///         <name>objectRetrieval</name>
 ///     </paramref>
 ///     is null, or
 ///     if the bean retrieval does not return the DSD for the given dataset.
 /// </param>
 /// <exception cref="System.ArgumentException">
 /// AbstractDataReaderEngine expects either a ISdmxObjectRetrievalManager or a
 ///     IDataStructureObject to be able to interpret the structures
 /// </exception>
 public CompactDataReaderEngine(IReadableDataLocation dataLocation, IDataflowObject defaultDataflow, IDataStructureObject defaultDsd)
     : this(dataLocation, null, defaultDataflow, defaultDsd)
 {
 }
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:25,代码来源:CompactDataReaderEngine.cs


示例16: GetProvisions

		public virtual ISet<IProvisionAgreementObject> GetProvisions(IDataflowObject dataflow) {
			return GetByReference(dataflow);
		}
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:3,代码来源:InMemoryProvisionRetrievalManager.cs


示例17: CrossSectionalDataReaderEngine

        /// <summary>
        /// Initializes a new instance of the <see cref="CrossSectionalDataReaderEngine"/> class.
        /// </summary>
        /// <param name="dataLocation">
        /// The data location.
        /// </param>
        /// <param name="objectRetrieval">
        /// The object retrieval.
        /// </param>
        /// <param name="defaultDsd">
        /// The DSD. giving the ability to retrieve DSDs for the datasets this reader engine is reading.  This
        ///     can be null if there is only one relevant DSD - in which case the default DSD should be provided
        /// </param>
        /// <param name="dataflow">
        /// The dataflow.
        /// </param>
        public CrossSectionalDataReaderEngine(IReadableDataLocation dataLocation, ISdmxObjectRetrievalManager objectRetrieval, ICrossSectionalDataStructureObject defaultDsd, IDataflowObject dataflow)
        {
            this._xmlBuilder = new XmlReaderBuilder();
            if (objectRetrieval == null && defaultDsd == null)
            {
                throw new ArgumentException("AbstractDataReaderEngine expects either a ISdmxObjectRetrievalManager or a IDataStructureObject to be able to interpret the structures");
            }

            this._objectRetrieval = objectRetrieval;
            this._dataLocation = dataLocation;
            this._defaultDsd = defaultDsd;
            this._dataflow = dataflow;

            this.Reset();
        }
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:31,代码来源:CrossSectionalDataReaderEngine.cs


示例18: Build

        /// <summary>
        /// Build <see cref="DataflowType"/> from <paramref name="buildFrom"/>.
        /// </summary>
        /// <param name="buildFrom">
        /// The build from.
        /// </param>
        /// <param name="categorisations">
        /// The categorisations 
        /// </param>
        /// <returns>
        /// The <see cref="DataflowType"/> from <paramref name="buildFrom"/> .
        /// </returns>
        public DataflowType Build(IDataflowObject buildFrom, ISet<ICategorisationObject> categorisations)
        {
            var builtObj = new DataflowType();
            string value = buildFrom.AgencyId;
            if (!string.IsNullOrWhiteSpace(value))
            {
                builtObj.agencyID = buildFrom.AgencyId;
            }

            string value1 = buildFrom.Id;
            if (!string.IsNullOrWhiteSpace(value1))
            {
                builtObj.id = buildFrom.Id;
            }

            if (buildFrom.Uri != null)
            {
                builtObj.uri = buildFrom.Uri;
            }
            else if (buildFrom.StructureUrl != null)
            {
                builtObj.uri = buildFrom.StructureUrl;
            }
            else if (buildFrom.ServiceUrl != null)
            {
                builtObj.uri = buildFrom.StructureUrl;
            }

            if (ObjectUtil.ValidString(buildFrom.Urn))
            {
                builtObj.urn = buildFrom.Urn;
            }

            string value2 = buildFrom.Version;
            if (!string.IsNullOrWhiteSpace(value2))
            {
                builtObj.version = buildFrom.Version;
            }

            if (buildFrom.StartDate != null)
            {
                builtObj.validFrom = buildFrom.StartDate.Date;
            }

            if (buildFrom.EndDate != null)
            {
                builtObj.validTo = buildFrom.EndDate.Date;
            }

            IList<ITextTypeWrapper> names = buildFrom.Names;
            if (ObjectUtil.ValidCollection(names))
            {
                builtObj.Name = this.GetTextType(names);
            }

            IList<ITextTypeWrapper> descriptions = buildFrom.Descriptions;
            if (ObjectUtil.ValidCollection(descriptions))
            {
                builtObj.Description = this.GetTextType(descriptions);
            }

            if (this.HasAnnotations(buildFrom))
            {
                builtObj.Annotations = this.GetAnnotationsType(buildFrom);
            }

            if (buildFrom.IsExternalReference.IsSet())
            {
                builtObj.isExternalReference = buildFrom.IsExternalReference.IsTrue;
            }

            if (buildFrom.IsFinal.IsSet())
            {
                builtObj.isFinal = buildFrom.IsFinal.IsTrue;
            }

            if (ObjectUtil.ValidCollection(categorisations))
            {
                /* foreach */
                foreach (ICategorisationObject currentCategoryRef in categorisations)
                {
                    var categoryRefType = new CategoryRefType();
                    builtObj.CategoryRef.Add(categoryRefType);

                    ICrossReference refBean = currentCategoryRef.CategoryReference;
                    if (refBean != null)
                    {
                        IMaintainableRefObject maintainableReference = refBean.MaintainableReference;
//.........这里部分代码省略.........
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:101,代码来源:DataflowXmlBuilder.cs


示例19: DetermineCurrentDataStructure

        /// <summary>
        ///     Determines the current data structure.
        /// </summary>
        /// <exception cref="SdmxNoResultsException">
        ///     Could not read dataset, the data set references dataflow '+errorString+' which could not be resolved
        ///     or
        ///     Could not read dataset, the data set references provision '+errorString+' which could not be resolved
        ///     or
        ///     Could not read dataset, the data set references dataflow '+errorString+' which could not be resolved
        ///     or
        ///     Can not read dataset, the data set references the DSD ' + errorString + ' which could not be resolved
        ///     or
        ///     Can not read dataset, the data set does no reference any data structures, and there was no default data structure
        ///     definition provided
        /// </exception>
        /// <exception cref="SdmxNotImplementedException">Can not write dataset for structure of type:  + sRef</exception>
        private void DetermineCurrentDataStructure()
        {
            // 1. Set the current DSD to null before trying to resolve it
            this._currentDsd = null;
            this._currentDataflow = null;

            IDatasetStructureReference datasetStructureReference = null;
            if (this._datasetHeader != null)
            {
                datasetStructureReference = this._datasetHeader.DataStructureReference;
                if (datasetStructureReference == null && this._headerObject != null && this._headerObject.Structures.Count == 1)
                {
                    datasetStructureReference = this._headerObject.Structures[0];
                }
            }

            if (datasetStructureReference != null)
            {
                var structureReference = datasetStructureReference.StructureReference;

                string errorString = structureReference.MaintainableReference.ToString();

                // Provision, Flow, DSD or MSD
                switch (structureReference.TargetReference.EnumType)
                {
                    case SdmxStructureEnumType.Dsd:
                        if (this._defaultDsd != null && structureReference.IsMatch(this._defaultDsd))
                        {
                            this.SetCurrentDsd(this._defaultDsd);
                        }
                        else if (this._objectRetrieval != null)
                        {
                            this.SetCurrentDsd(structureReference.MaintainableReference);
                        }

                        break;
                    case SdmxStructureEnumType.Dataflow:
                        if (this._objectRetrieval != null)
                        {
                            this._currentDataflow = this._objectRetrieval.GetMaintainableObject<IDataflowObject>(structureReference.MaintainableReference);
                            if (this._currentDataflow == null)
                            {
                                throw new SdmxNoResultsException("Could not read dataset, the data set references dataflow '" + errorString + "' which could not be resolved");
                            }

                            this.SetCurrentDsd(this._currentDataflow.DataStructureRef.MaintainableReference);
                        }
                        else
                        {
                            // Use the "header" values 
                            this.SetCurrentDsd(this._defaultDsd);
                            this._currentDataflow = this._dataflow;
                        }

                        break;
                    default:
                        throw new SdmxNotImplementedException("Can not write dataset for structure of type: " + structureReference);
                }

                if (this._currentDsd == null)
                {
                    throw new SdmxNoResultsException("Can not read dataset, the data set references the DSD '" + errorString + "' which could not be resolved");
                }
            }
            else if (this._defaultDsd == null)
            {
                throw new SdmxNoResultsException("Can not read dataset, the data set does no reference any data structures, and there was no default data structure definition provided");
            }
            else
            {
                if (this._dataflow != null)
                {
                    this.SetCurrentDataflow(this._dataflow);
                }
                else
                {
                    this.SetCurrentDsd(this._defaultDsd);
                }
            }
        }
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:96,代码来源:CrossSectionalDataReaderEngine.cs


示例20: StartDataset

 /// <summary>
 /// Starts a dataset with the data conforming to the DSD
 /// </summary>
 /// <param name="dataflow">Optional. The dataflow can be provided to give extra information about the dataset.</param>
 /// <param name="dsd">The data structure is used to know the dimensionality of the data</param>
 /// <param name="header">Dataset header containing, amongst others, the dataset action, reporting dates,
 /// dimension at observation if null then the dimension at observation is assumed to be TIME_PERIOD and the dataset action is assumed to be INFORMATION</param>
 /// <param name="annotations">Any additional annotations that are attached to the dataset, can be null if no annotations exist</param>
 /// <exception cref="T:System.ArgumentException">if the DSD is null</exception>
 public void StartDataset(IDataflowObject dataflow, IDataStructureObject dsd, IDatasetHeader header, params IAnnotation[] annotations)
 {
     this._actions.Enqueue(() => this._dataWriterEngine.StartDataset(dataflow, dsd, header, annotations));
 }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:13,代码来源:DelayedDataWriterEngine.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IDataset类代码示例发布时间:2022-05-24
下一篇:
C# IDatabaseUnitOfWorkProvider类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap