/** * @hidden */ export class DatasourceHelper { /** * A service that provides utility methods to manipulate or get data sources. * * @param {angular.IQService} $q The Angular $q service. * @param {import('ngeo/datasource/DataSources').DataSource} ngeoDataSources Ngeo data source * service. * @param {import('ngeo/query/Querent').Querent} ngeoQuerent Ngeo querent service. * @ngdoc service * @ngname ngeoDataSourcesHelper * @param {import('gmf/editing/EnumerateAttribute').EditingEnumerateAttributeService} gmfEnumerateAttribute * The Gmf enumerate attribute service. */ constructor($q: angular.IQService, ngeoDataSources: import("ngeo/datasource/DataSources").DataSource, ngeoQuerent: import("ngeo/query/Querent").Querent, gmfEnumerateAttribute: import("gmf/editing/EnumerateAttribute").EditingEnumerateAttributeService); /** * @type {angular.IQService} * @private */ private q_; /** * @type {import('ngeo/datasource/DataSource').DataSources} * @private */ private collection_; /** * @type {import('ngeo/query/Querent').Querent} * @private */ private ngeoQuerent_; /** * @type {import('gmf/editing/EnumerateAttribute').EditingEnumerateAttributeService} * @private */ private gmfEnumerateAttribute_; /** * @type {Object} * @private */ private cache_; /** * @returns {import('ngeo/datasource/DataSource').DataSources} Data sources collection. */ get collection(): import("ngeo/datasource/DataSource").DataSources; /** * Return a data source using its id. * * @param {number} id Data source id. * @returns {?import('ngeo/datasource/DataSource').default} Data source. */ getDataSource(id: number): import("ngeo/datasource/DataSource").default | null; /** * Get the attributes of a data source. If they are not set, they are obtained * from the querent service using a WFS DescribeFeatureType request, then set * in the data source. * * Please, note that in order to be dynamically set, the data source must * only have 1 ogcLayer set and be queryable. * * @param {import('gmf/datasource/OGC').default} dataSource Filtrable data source. * @returns {angular.IPromise} Promise. */ getDataSourceAttributes(dataSource: import("gmf/datasource/OGC").default): angular.IPromise; /** * Register a data source, adding it to the cache. * * @param {ngeoDatasourceDataSource} dataSource An ngeo data source * @private */ private registerDataSource_; /** * Unregister a data source, removing it to from cache. * * @param {ngeoDatasourceDataSource} dataSource An ngeo data source * @private */ private unregisterDataSource_; /** * Called when a new data source is added to the ngeo collection. Add it * to the cache. * * @param {Event|import('ol/events/Event').default} evt Event * @private */ private handleDataSourcesAdd_; /** * Called when a data source is removed from the ngeo collection. Remove it * from the cache. * * @param {Event|import('ol/events/Event').default} evt Event * @private */ private handleDataSourcesRemove_; /** * Create and return a list of attributes for a data source using * the ones that are defined in the `ogcAttributes` property of that * data source. The list is build using the ogcAttributes that are * supported by the data source, i.e. by those having a WFS layer * defined in it. * * If there are no WFS layer in the data source that are in the * ogcAttributes list, then `null` is returned. * * @param {import('ngeo/datasource/OGC').default} dataSource Filtrable data source. * @returns {import('ngeo/format/Attribute').Attribute[]} attributes Attributes */ createDataSourceAttributesFromOGCAttributes_(dataSource: import("ngeo/datasource/OGC").default): import("ngeo/format/Attribute").Attribute[]; /** * @param {import('gmf/datasource/OGC').default} dataSource Filtrable data source. * @returns {angular.IPromise} Promise. */ prepareFiltrableDataSource(dataSource: import("gmf/datasource/OGC").default): angular.IPromise; } export namespace DatasourceHelper { let $inject: string[]; } export default myModule; import angular from 'angular'; /** * @type {angular.IModule} * @hidden */ declare const myModule: angular.IModule;