/// <summary> /// Initializes a new instance of the <see cref="SubmitStructureController"/> class. /// </summary> /// <param name="connectionStringSettings">The connection string settings.</param> public SubmitStructureController() { MappingStoreSettingsManager SettingsManager = new MappingStoreSettingsManager(); this._connectionStringSettings = SettingsManager.MappingStoreConnectionSettings; }
/// <summary> /// Initializes a new instance of the <see cref="SriRetrieverFactory" /> class. /// </summary> /// <exception cref="StructureRetrieverException">Could not establish a connection to the mapping store DB /// <see cref="P:Estat.Nsi.StructureRetriever.StructureRetrieverException.ErrorType" /> /// is set to <see cref="F:Estat.Nsi.StructureRetriever.StructureRetrieverErrorTypes.MappingStoreConnectionError" /></exception> public SriRetrieverFactory() { var defaultHeader = SettingsManager.Header; var settingsManager = new MappingStoreSettingsManager(); var mappingStoreConnectionSettings = settingsManager.MappingStoreConnectionSettings; if (mappingStoreConnectionSettings != null) { // Data Retriever initialization var dataRetrieverSdmxv20Behaviour = new DataRetrieverCore(defaultHeader, mappingStoreConnectionSettings, SdmxSchemaEnumType.VersionTwo); var dataRetrieverSdmxV21Behaviour = new DataRetrieverCore(defaultHeader, mappingStoreConnectionSettings, SdmxSchemaEnumType.VersionTwoPointOne); // SDMX v2.0 WS Soap for SDMX v2.0 CrossSectional data (does not throw No Results when no data is found). this._sdmxv20XSDataRetrievalForWs20 = dataRetrieverSdmxv20Behaviour; // SDMX v2.1 WS REST for SDMX v2.0 CrossSectional data (throws No Results when no data is found). this._sdmxV20XSDataRetrieverForRest = dataRetrieverSdmxV21Behaviour; this._dataRetrievalForWs20 = dataRetrieverSdmxv20Behaviour; this._dataRetrievalForRest = dataRetrieverSdmxV21Behaviour; this._dataRetrieverForWs21 = dataRetrieverSdmxV21Behaviour; // advanced structure search managers (SDMX v2.1 SOAP) SdmxSchema sdmxSchemaV21 = SdmxSchema.GetFromEnum(SdmxSchemaEnumType.VersionTwoPointOne); this._structureRetrievalForWs21 = new Estat.Nsi.StructureRetriever.Manager.AdvancedStructureRetriever(mappingStoreConnectionSettings); this._authStructureRetrievalForWs21 = new AuthAdvancedStructureRetriever(mappingStoreConnectionSettings); // simple structure search managers (SDMX v2.0 SOAP) SdmxSchema sdmxSchemaV20 = SdmxSchema.GetFromEnum(SdmxSchemaEnumType.VersionTwo); this._structureRetrievalForWs20 = new StructureRetrieverAvailableData(mappingStoreConnectionSettings, sdmxSchemaV20); this._authStructureRetrievalForWs20 = new AuthStructureRetrieverAvailableData(mappingStoreConnectionSettings, sdmxSchemaV20); // structure search manager (SDMX v2.1 REST) this._structureRetrievalForRest = new StructureRetrieverAvailableData(mappingStoreConnectionSettings, sdmxSchemaV21); this._authStructureRetrievalForRest = new AuthStructureRetrieverAvailableData(mappingStoreConnectionSettings, sdmxSchemaV21); this._mappingStoreSdmxObjectRetrievalManager = new MappingStoreSdmxObjectRetrievalManager(mappingStoreConnectionSettings); } }