Clean up filters

This commit is contained in:
Tim Schaub
2017-12-12 19:36:35 -07:00
parent 72ff21e01f
commit d04b25403d
5 changed files with 27 additions and 38 deletions
+5 -8
View File
@@ -2,25 +2,22 @@
* @module ol/format/filter/And * @module ol/format/filter/And
*/ */
import {inherits} from '../../index.js'; import {inherits} from '../../index.js';
import _ol_format_filter_LogicalNary_ from '../filter/LogicalNary.js'; import LogicalNary from '../filter/LogicalNary.js';
/** /**
* @classdesc * @classdesc
* Represents a logical `<And>` operator between two or more filter conditions. * Represents a logical `<And>` operator between two or more filter conditions.
* *
* deprecated: This class will no longer be exported starting from the next major version.
*
* @constructor * @constructor
* @abstract * @abstract
* @param {...ol.format.filter.Filter} conditions Conditions. * @param {...ol.format.filter.Filter} conditions Conditions.
* @extends {ol.format.filter.LogicalNary} * @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)); 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;
+5 -8
View File
@@ -2,25 +2,22 @@
* @module ol/format/filter/Comparison * @module ol/format/filter/Comparison
*/ */
import {inherits} from '../../index.js'; import {inherits} from '../../index.js';
import _ol_format_filter_Filter_ from '../filter/Filter.js'; import Filter from '../filter/Filter.js';
/** /**
* @classdesc * @classdesc
* Abstract class; normally only used for creating subclasses and not instantiated in apps. * Abstract class; normally only used for creating subclasses and not instantiated in apps.
* Base class for WFS GetFeature property comparison filters. * Base class for WFS GetFeature property comparison filters.
* *
* deprecated: This class will no longer be exported starting from the next major version.
*
* @constructor * @constructor
* @abstract * @abstract
* @param {!string} tagName The XML tag name for this filter. * @param {!string} tagName The XML tag name for this filter.
* @param {!string} propertyName Name of the context property to compare. * @param {!string} propertyName Name of the context property to compare.
* @extends {ol.format.filter.Filter} * @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 * @public
@@ -29,6 +26,6 @@ var _ol_format_filter_Comparison_ = function(tagName, propertyName) {
this.propertyName = 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;
+5 -8
View File
@@ -2,15 +2,13 @@
* @module ol/format/filter/ComparisonBinary * @module ol/format/filter/ComparisonBinary
*/ */
import {inherits} from '../../index.js'; import {inherits} from '../../index.js';
import _ol_format_filter_Comparison_ from '../filter/Comparison.js'; import Comparison from '../filter/Comparison.js';
/** /**
* @classdesc * @classdesc
* Abstract class; normally only used for creating subclasses and not instantiated in apps. * Abstract class; normally only used for creating subclasses and not instantiated in apps.
* Base class for WFS GetFeature property binary comparison filters. * Base class for WFS GetFeature property binary comparison filters.
* *
* deprecated: This class will no longer be exported starting from the next major version.
*
* @constructor * @constructor
* @abstract * @abstract
* @param {!string} tagName The XML tag name for this filter. * @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 {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive? * @param {boolean=} opt_matchCase Case-sensitive?
* @extends {ol.format.filter.Comparison} * @extends {ol.format.filter.Comparison}
* @api
*/ */
var _ol_format_filter_ComparisonBinary_ = function( var ComparisonBinary = function(
tagName, propertyName, expression, opt_matchCase) { tagName, propertyName, expression, opt_matchCase) {
_ol_format_filter_Comparison_.call(this, tagName, propertyName); Comparison.call(this, tagName, propertyName);
/** /**
* @public * @public
@@ -38,5 +35,5 @@ var _ol_format_filter_ComparisonBinary_ = function(
this.matchCase = opt_matchCase; this.matchCase = opt_matchCase;
}; };
inherits(_ol_format_filter_ComparisonBinary_, _ol_format_filter_Comparison_); inherits(ComparisonBinary, Comparison);
export default _ol_format_filter_ComparisonBinary_; export default ComparisonBinary;
+6 -6
View File
@@ -1,20 +1,19 @@
/** /**
* @module ol/format/filter/Filter * @module ol/format/filter/Filter
*/ */
/** /**
* @classdesc * @classdesc
* Abstract class; normally only used for creating subclasses and not instantiated in apps. * Abstract class; normally only used for creating subclasses and not instantiated in apps.
* Base class for WFS GetFeature filters. * Base class for WFS GetFeature filters.
* *
* deprecated: This class will no longer be exported starting from the next major version.
*
* @constructor * @constructor
* @abstract * @abstract
* @param {!string} tagName The XML tag name for this filter. * @param {!string} tagName The XML tag name for this filter.
* @struct * @struct
* @api
*/ */
var _ol_format_filter_Filter_ = function(tagName) { var Filter = function(tagName) {
/** /**
* @private * @private
@@ -27,7 +26,8 @@ var _ol_format_filter_Filter_ = function(tagName) {
* The XML tag name for a filter. * The XML tag name for a filter.
* @returns {!string} Name. * @returns {!string} Name.
*/ */
_ol_format_filter_Filter_.prototype.getTagName = function() { Filter.prototype.getTagName = function() {
return this.tagName_; return this.tagName_;
}; };
export default _ol_format_filter_Filter_;
export default Filter;
+6 -8
View File
@@ -2,7 +2,7 @@
* @module ol/format/filter/Spatial * @module ol/format/filter/Spatial
*/ */
import {inherits} from '../../index.js'; import {inherits} from '../../index.js';
import _ol_format_filter_Filter_ from '../filter/Filter.js'; import Filter from '../filter/Filter.js';
/** /**
* @classdesc * @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 * Represents a spatial operator to test whether a geometry-valued property
* relates to a given geometry. * relates to a given geometry.
* *
* deprecated: This class will no longer be exported starting from the next major version.
*
* @constructor * @constructor
* @abstract * @abstract
* @param {!string} tagName The XML tag name for this filter. * @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 * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @extends {ol.format.filter.Filter} * @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 * @public
@@ -45,5 +42,6 @@ var _ol_format_filter_Spatial_ = function(tagName, geometryName, geometry, opt_s
this.srsName = opt_srsName; this.srsName = opt_srsName;
}; };
inherits(_ol_format_filter_Spatial_, _ol_format_filter_Filter_); inherits(Spatial, Filter);
export default _ol_format_filter_Spatial_;
export default Spatial;