/// <summary> /// Parses the reader opened against the stream containing the SDMX-ML Structure message /// and returns a a IMutableObjects object. Internally, this method uses a XmlReader. /// This is the central method of the class /// </summary> /// <exception cref="System.ArgumentNullException"> /// <paramref name="reader"/> is null /// </exception> /// <exception cref="ParseException"> /// SDMX structure message parsing error /// </exception> /// <param name="reader"> /// The text reader opened against the stream for the SDMX-ML Query /// </param> /// <returns> /// The IRegistryInfo object /// </returns> public IRegistryInfo Read(XmlReader reader) { if (reader == null) { throw new ArgumentNullException("reader"); } // initialise fields var registryInfo = new RegistryInfo(); this.Read(registryInfo, reader); return registryInfo; }
/// <summary> /// Writes the sdmxObjects to the output location in the format specified by the implementation /// </summary> /// <param name="sdmxObjects"> /// SDMX objects /// </param> public void WriteStructures(ISdmxObjects sdmxObjects) { IRegistryInfo registry = new RegistryInfo(); registry.QueryStructureResponse = new QueryStructureResponseInfo { Structure = sdmxObjects.MutableObjects, StatusMessage = new StatusMessageInfo { Status = Status.Success } }; this.WriteRegistryInterface(registry); }
/// <summary> /// Writes the <paramref name="maintainableObject"/> out to the output location in the format specified by the implementation /// </summary> /// <param name="maintainableObject"> /// The maintainableObject. /// </param> public void WriteStructure(IMaintainableObject maintainableObject) { IMutableObjects mutableObjects = new MutableObjectsImpl(); mutableObjects.AddIdentifiable(maintainableObject.MutableInstance); IRegistryInfo registry = new RegistryInfo(); registry.QueryStructureResponse = new QueryStructureResponseInfo { Structure = mutableObjects }; this.WriteRegistryInterface(registry); }