private void readDataSourceComponents( MetaModel.Builder builder ) {
// Read DataSource Components from each DataSourceProvider
DataSourcesObjectReaderFactory dsFactory = new DataSourcesObjectReaderFactory();
DataSourcesModelReader dsModelReader = dsFactory.getModelReader();
IDataSourceManager dataSourceManager = CdeEnvironment.getDataSourceManager();
for ( IDataSourceProvider dsProvider : dataSourceManager.getProviders() ) {
String providerId = dsProvider.getId();
JSON jsDef = dataSourceManager.getProviderJsDefinition( providerId );
try {
// id is apparently a source
dsModelReader.read( builder, jsDef, providerId );
} catch ( ThingReadException ex ) {
logger.error( "Error while reading model from data source definitions in '" + providerId + "'.", ex );