/** * @typedef {import('ngeo/rule/Rule').RuleOptions|import('ngeo/rule/Geometry').GeometryOptions|import('ngeo/rule/Select').SelectOptions|import('ngeo/rule/Text').TextOptions} AnyOptions */ /** * The options to use when creating a filter using the `ngeo.RuleHelper` * service. * * @typedef {Object} CreateFilterOptions * @property {import('ngeo/datasource/OGC').default} dataSource The data source from which to get * the filterRules that will be used to create the OL filter object. * @property {boolean} [incDimensions] Whether to include the dimensions related filters. Default to `true`. * @property {boolean} [incTime] Whether to include the data source's time values in the filter created. The * property that contains those values is `timeRangeValue`. Defaults to `false`. * When building a filter for WMS, it should not be included as it is given as * the TIME parameter of the query instead. When used for a WFS request, it * should be included in the filter. * @property {import('ol/format/filter/Filter').default} [filter] A filter that is directly given the * method instead of creating one. * Useful to automatically combine the time values. * @property {import('ngeo/rule/Rule').default[]} [filterRules] An alternative list of filter rules * to use instead of those that are defined within the data source. Useful when one wants to get the data * of a given filter without applying it to the data source. * @property {string} [projCode] Projection code. * @property {string} [srsName] The SRS name used with the spatial filters created by the method. */ /** * @hidden */ export class RuleHelper { /** * A service that provides utility methods to create `import('ngeo/rule/Rule').default` * objects. * * @param {angular.gettext.gettextCatalog} gettextCatalog Gettext service. * @param {import('ngeo/misc/FeatureHelper').FeatureHelper} ngeoFeatureHelper Ngeo feature helper * service. * @param {import('ngeo/misc/WMSTime').WMSTime} ngeoWMSTime wms time service. * @ngdoc service * @ngname ngeoRuleHelper */ constructor(gettextCatalog: angular.gettext.gettextCatalog, ngeoFeatureHelper: import("ngeo/misc/FeatureHelper").FeatureHelper, ngeoWMSTime: import("ngeo/misc/WMSTime").WMSTime); /** * @type {angular.gettext.gettextCatalog} * @private */ private gettextCatalog_; /** * @type {import('ngeo/misc/FeatureHelper').FeatureHelper} * @private */ private ngeoFeatureHelper_; /** * @type {import('ngeo/misc/WMSTime').WMSTime} * @private */ private ngeoWMSTime_; /** * @param {import('ngeo/format/Attribute').Attribute[]} attributes Attributes. * @param {boolean} [opt_isCustom] Whether the created rules should be marked * as custom or not. Defaults to `false`. * @returns {import('ngeo/rule/Rule').default[]} Rules. */ createRulesFromAttributes(attributes: import("ngeo/format/Attribute").Attribute[], opt_isCustom?: boolean): import("ngeo/rule/Rule").default[]; /** * @param {import('ngeo/format/Attribute').Attribute} attribute Attribute. * @param {boolean} [opt_isCustom] Whether the created rule should be marked * as custom or not. Defaults to `false`. * @returns {import('ngeo/rule/Rule').default} Rule. */ createRuleFromAttribute(attribute: import("ngeo/format/Attribute").Attribute, opt_isCustom?: boolean): import("ngeo/rule/Rule").default; /** * @param {(import('ngeo/rule/Rule').RuleOptions | import('ngeo/rule/Select').SelectOptions)[]} optionsList * List of options * @returns {import('ngeo/rule/Rule').default[]} Rules. */ createRules(optionsList: (import("ngeo/rule/Rule").RuleOptions | import("ngeo/rule/Select").SelectOptions)[]): import("ngeo/rule/Rule").default[]; /** * @param {import('ngeo/rule/Rule').RuleOptions|import('ngeo/rule/Select').SelectOptions} options * Options * @returns {import('ngeo/rule/Rule').default} Rule. */ createRule(options: import("ngeo/rule/Rule").RuleOptions | import("ngeo/rule/Select").SelectOptions): import("ngeo/rule/Rule").default; /** * Create a new `import('ngeo/rule/Rule').default` object using an other given rule. * * @param {import('ngeo/rule/Rule').default} rule Original rule to clone. * @returns {import('ngeo/rule/Rule').default} A clone rule. */ cloneRule(rule: import("ngeo/rule/Rule").default): import("ngeo/rule/Rule").default; /** * Extend the dynamic properties from a source rule to destination rule. * The source rule remains unchanged, while the destination rule changes. * * @param {import('ngeo/rule/Rule').default} sourceRule Source rule to collect the dynamic * properties from. * @param {import('ngeo/rule/Rule').default} destRule Destination rule where the dynamic * properties are set. */ extendRule(sourceRule: import("ngeo/rule/Rule").default, destRule: import("ngeo/rule/Rule").default): void; /** * @param {import('ngeo/rule/Rule').default[]} rules Rules * @returns {AnyOptions[]} List of serialized rule options. */ serializeRules(rules: import("ngeo/rule/Rule").default[]): AnyOptions[]; /** * Selialize a rule into options to re-create it later. * * @param {import('ngeo/rule/Rule').default} rule Rule to serialize. * @returns {AnyOptions} Serialized rule options. */ serializeRule(rule: import("ngeo/rule/Rule").default): AnyOptions; /** * Create a `ol.format.filter.Filter` object for a given data source. * See the `CreateFilterOptions` to learn more. * * @param {CreateFilterOptions} options Options. * @returns {?import('ol/format/filter/Filter').default} Filter. */ createFilter(options: CreateFilterOptions): import("ol/format/filter/Filter").default | null; /** * @param {CreateFilterOptions} options Options. * @returns {?string} Filter string. */ createFilterString(options: CreateFilterOptions): string | null; /** * Join 2 filters together in an "And" filter, if both are set. * * If only one is set, then no need to create an "And" * filter. Simply return the one that is set. * * If none are set, return null. * * @param {?import('ol/format/filter/Filter').default} filterA * First filter. * @param {?import('ol/format/filter/Filter').default} filterB * Second filter. * @returns {?import('ol/format/filter/Filter').default} Filters * joined together. */ joinFilters(filterA: import("ol/format/filter/Filter").default | null, filterB: import("ol/format/filter/Filter").default | null): import("ol/format/filter/Filter").default | null; /** * @param {import('ngeo/rule/Rule').default} rule Rule. * @param {import('ngeo/datasource/OGC').default} dataSource Data source. * @param {string} [opt_srsName] SRS name. No srsName attribute will be * set on geometries when this is not provided. * @returns {?import('ol/format/filter/Filter').default} filter Filter; * @private */ private createFilterFromRule_; /** * Create and return an OpenLayers filter object using the available * dimensions filters configuration within the data source. * * @param {import('ngeo/datasource/OGC').default} dataSource Data source from which to create the * filter. * @returns {?import('ol/format/filter/Filter').default} Filter * @private */ private createDimensionsFilterFromDataSource_; /** * Create and return an OpenLayers filter object using the available * time properties within the data source. * * @param {import('ngeo/datasource/OGC').default} dataSource Data source from which to * create the filter. * @returns {?import('ol/format/filter/Filter').default} Filter * @private */ private createTimeFilterFromDataSource_; } export namespace RuleHelper { let $inject: string[]; } export default myModule; export type AnyOptions = import("ngeo/rule/Rule").RuleOptions | import("ngeo/rule/Geometry").GeometryOptions | import("ngeo/rule/Select").SelectOptions | import("ngeo/rule/Text").TextOptions; /** * The options to use when creating a filter using the `ngeo.RuleHelper` * service. */ export type CreateFilterOptions = { /** * The data source from which to get * the filterRules that will be used to create the OL filter object. */ dataSource: import("ngeo/datasource/OGC").default; /** * Whether to include the dimensions related filters. Default to `true`. */ incDimensions?: boolean; /** * Whether to include the data source's time values in the filter created. The * property that contains those values is `timeRangeValue`. Defaults to `false`. * When building a filter for WMS, it should not be included as it is given as * the TIME parameter of the query instead. When used for a WFS request, it * should be included in the filter. */ incTime?: boolean; /** * A filter that is directly given the * method instead of creating one. * Useful to automatically combine the time values. */ filter?: import("ol/format/filter/Filter").default; /** * An alternative list of filter rules * to use instead of those that are defined within the data source. Useful when one wants to get the data * of a given filter without applying it to the data source. */ filterRules?: import("ngeo/rule/Rule").default[]; /** * Projection code. */ projCode?: string; /** * The SRS name used with the spatial filters created by the method. */ srsName?: string; }; import angular from 'angular'; /** * @type {angular.IModule} * @hidden */ declare const myModule: angular.IModule;