From d04b25403d2a199e947eb828044cb005af7a1607 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 12 Dec 2017 19:36:35 -0700 Subject: [PATCH] Clean up filters --- src/ol/format/filter/And.js | 13 +++++-------- src/ol/format/filter/Comparison.js | 13 +++++-------- src/ol/format/filter/ComparisonBinary.js | 13 +++++-------- src/ol/format/filter/Filter.js | 12 ++++++------ src/ol/format/filter/Spatial.js | 14 ++++++-------- 5 files changed, 27 insertions(+), 38 deletions(-) diff --git a/src/ol/format/filter/And.js b/src/ol/format/filter/And.js index 07667202cb..13c5c46a48 100644 --- a/src/ol/format/filter/And.js +++ b/src/ol/format/filter/And.js @@ -2,25 +2,22 @@ * @module ol/format/filter/And */ import {inherits} from '../../index.js'; -import _ol_format_filter_LogicalNary_ from '../filter/LogicalNary.js'; +import LogicalNary from '../filter/LogicalNary.js'; /** * @classdesc * Represents a logical `` operator between two or more filter conditions. * - * deprecated: This class will no longer be exported starting from the next major version. - * * @constructor * @abstract * @param {...ol.format.filter.Filter} conditions Conditions. * @extends {ol.format.filter.LogicalNary} - * @api */ -var _ol_format_filter_And_ = function(conditions) { +var And = function(conditions) { var params = ['And'].concat(Array.prototype.slice.call(arguments)); - _ol_format_filter_LogicalNary_.apply(this, params); + LogicalNary.apply(this, params); }; -inherits(_ol_format_filter_And_, _ol_format_filter_LogicalNary_); +inherits(And, LogicalNary); -export default _ol_format_filter_And_; +export default And; diff --git a/src/ol/format/filter/Comparison.js b/src/ol/format/filter/Comparison.js index f62c31bc82..b30f1df5e7 100644 --- a/src/ol/format/filter/Comparison.js +++ b/src/ol/format/filter/Comparison.js @@ -2,25 +2,22 @@ * @module ol/format/filter/Comparison */ import {inherits} from '../../index.js'; -import _ol_format_filter_Filter_ from '../filter/Filter.js'; +import Filter from '../filter/Filter.js'; /** * @classdesc * Abstract class; normally only used for creating subclasses and not instantiated in apps. * Base class for WFS GetFeature property comparison filters. * - * deprecated: This class will no longer be exported starting from the next major version. - * * @constructor * @abstract * @param {!string} tagName The XML tag name for this filter. * @param {!string} propertyName Name of the context property to compare. * @extends {ol.format.filter.Filter} - * @api */ -var _ol_format_filter_Comparison_ = function(tagName, propertyName) { +var Comparison = function(tagName, propertyName) { - _ol_format_filter_Filter_.call(this, tagName); + Filter.call(this, tagName); /** * @public @@ -29,6 +26,6 @@ var _ol_format_filter_Comparison_ = function(tagName, propertyName) { this.propertyName = propertyName; }; -inherits(_ol_format_filter_Comparison_, _ol_format_filter_Filter_); +inherits(Comparison, Filter); -export default _ol_format_filter_Comparison_; +export default Comparison; diff --git a/src/ol/format/filter/ComparisonBinary.js b/src/ol/format/filter/ComparisonBinary.js index 8b4e0b0731..9c2e7bf958 100644 --- a/src/ol/format/filter/ComparisonBinary.js +++ b/src/ol/format/filter/ComparisonBinary.js @@ -2,15 +2,13 @@ * @module ol/format/filter/ComparisonBinary */ import {inherits} from '../../index.js'; -import _ol_format_filter_Comparison_ from '../filter/Comparison.js'; +import Comparison from '../filter/Comparison.js'; /** * @classdesc * Abstract class; normally only used for creating subclasses and not instantiated in apps. * Base class for WFS GetFeature property binary comparison filters. * - * deprecated: This class will no longer be exported starting from the next major version. - * * @constructor * @abstract * @param {!string} tagName The XML tag name for this filter. @@ -18,12 +16,11 @@ import _ol_format_filter_Comparison_ from '../filter/Comparison.js'; * @param {!(string|number)} expression The value to compare. * @param {boolean=} opt_matchCase Case-sensitive? * @extends {ol.format.filter.Comparison} - * @api */ -var _ol_format_filter_ComparisonBinary_ = function( +var ComparisonBinary = function( tagName, propertyName, expression, opt_matchCase) { - _ol_format_filter_Comparison_.call(this, tagName, propertyName); + Comparison.call(this, tagName, propertyName); /** * @public @@ -38,5 +35,5 @@ var _ol_format_filter_ComparisonBinary_ = function( this.matchCase = opt_matchCase; }; -inherits(_ol_format_filter_ComparisonBinary_, _ol_format_filter_Comparison_); -export default _ol_format_filter_ComparisonBinary_; +inherits(ComparisonBinary, Comparison); +export default ComparisonBinary; diff --git a/src/ol/format/filter/Filter.js b/src/ol/format/filter/Filter.js index 717fdc92be..336fe29631 100644 --- a/src/ol/format/filter/Filter.js +++ b/src/ol/format/filter/Filter.js @@ -1,20 +1,19 @@ /** * @module ol/format/filter/Filter */ + + /** * @classdesc * Abstract class; normally only used for creating subclasses and not instantiated in apps. * Base class for WFS GetFeature filters. * - * deprecated: This class will no longer be exported starting from the next major version. - * * @constructor * @abstract * @param {!string} tagName The XML tag name for this filter. * @struct - * @api */ -var _ol_format_filter_Filter_ = function(tagName) { +var Filter = function(tagName) { /** * @private @@ -27,7 +26,8 @@ var _ol_format_filter_Filter_ = function(tagName) { * The XML tag name for a filter. * @returns {!string} Name. */ -_ol_format_filter_Filter_.prototype.getTagName = function() { +Filter.prototype.getTagName = function() { return this.tagName_; }; -export default _ol_format_filter_Filter_; + +export default Filter; diff --git a/src/ol/format/filter/Spatial.js b/src/ol/format/filter/Spatial.js index 95efa3a1c5..ac838f838c 100644 --- a/src/ol/format/filter/Spatial.js +++ b/src/ol/format/filter/Spatial.js @@ -2,7 +2,7 @@ * @module ol/format/filter/Spatial */ import {inherits} from '../../index.js'; -import _ol_format_filter_Filter_ from '../filter/Filter.js'; +import Filter from '../filter/Filter.js'; /** * @classdesc @@ -10,8 +10,6 @@ import _ol_format_filter_Filter_ from '../filter/Filter.js'; * Represents a spatial operator to test whether a geometry-valued property * relates to a given geometry. * - * deprecated: This class will no longer be exported starting from the next major version. - * * @constructor * @abstract * @param {!string} tagName The XML tag name for this filter. @@ -20,11 +18,10 @@ import _ol_format_filter_Filter_ from '../filter/Filter.js'; * @param {string=} opt_srsName SRS name. No srsName attribute will be * set on geometries when this is not provided. * @extends {ol.format.filter.Filter} - * @api */ -var _ol_format_filter_Spatial_ = function(tagName, geometryName, geometry, opt_srsName) { +var Spatial = function(tagName, geometryName, geometry, opt_srsName) { - _ol_format_filter_Filter_.call(this, tagName); + Filter.call(this, tagName); /** * @public @@ -45,5 +42,6 @@ var _ol_format_filter_Spatial_ = function(tagName, geometryName, geometry, opt_s this.srsName = opt_srsName; }; -inherits(_ol_format_filter_Spatial_, _ol_format_filter_Filter_); -export default _ol_format_filter_Spatial_; +inherits(Spatial, Filter); + +export default Spatial;