Example #1
0
        /// <summary>
        /// The set header.
        /// </summary>
        /// <param name="header">
        /// The header.
        /// </param>
        /// <param name="sdmxObjects">
        /// The sdmxObjects.
        /// </param>
        public static void SetHeader(HeaderType header, ISdmxObjects sdmxObjects)
        {
            header.ID = "IDREF" + referenceNo;
            referenceNo++;
            header.Test = false;
            header.Prepared = DateTime.Now;

            string senderId;
            if (sdmxObjects != null && sdmxObjects.Header != null && sdmxObjects.Header.Sender != null)
            {
                // Get header information from the supplied sdmxObjects
                senderId = sdmxObjects.Header.Sender.Id;
            }
            else
            {
                // Get header info from HeaderHelper
                senderId = HeaderHelper.Instance.SenderId;
            }

            header.Sender.id = senderId;
        }
Example #2
0
 private void SetInnerType(HeaderType ContentField) {
     this.ContentField = ((HeaderType)(XTypedServices.GetCloneIfRooted(ContentField)));
     XTypedServices.SetName(this, this.ContentField);
 }
Example #3
0
 /// <summary>
 /// <para>
 /// HeaderType defines the header fields used for all messages. ID identifies a data flow definition, which, when combined with time, uniquely identifies the data set. Test indicates whather the message is for test purposes or not. Truncated is used in data messages which are responding to Query messages, and is set to true only if the response has been truncated to meet size limits suggested by the defaultLimit attribute in the Query mesage.  Name provides a name for the transmission. Prepared is the date prepared. Sender is information about the sender, and Receiver is information about the receiver. Agency provides the code identifier/abbreviation for the maintenance agency of a data set. Data set id provides an identifier for a contained data set. Action code provides a code for determining whether the enclosed message is an Update or Delete message (not to be used with the UtilityData message). KeyFamilyRef is used to reference a key family for a contained data set, using its id. (This information is required at the DataSet level for some messages, but is provided here as a convenience for those messages which do not require it.) KeyFamilyAgency specifies the agency of the key family using its coded id.  Fields which refer to a contained data set need not be used if the message contains a query or structural information - these messages provide specific fields for holding this information. The ones here are not to be used as defaults. Extracted is a time-stamp from the system rendering the data; ReportingBegin and ReportingEnd provide the time period covered by the message (in the case of data). Source provides human-readable information about the source of the data.
 /// </para>
 /// </summary>
 public Header(HeaderType content) {
     SetInnerType(content);
 }