Merge pull request #5903 from fredj/ol.format.filter

Rename ol.format.ogc.filter namespace to ol.format.filter
This commit is contained in:
Frédéric Junod
2016-09-26 08:38:30 +02:00
committed by GitHub
41 changed files with 594 additions and 589 deletions

View File

@@ -4,6 +4,11 @@
As last step in the removal of the dependency on Google Closure Library, the `goog.DEBUG` compiler define was renamed to `ol.DEBUG`. Please change accordingly in your custom build configuration json files.
#### `ol.format.ogc.filter` namespace was renamed to `ol.format.filter`
`ol.format.ogc.filter` was simplified to `ol.format.filter`; to upgrade your code, simply remove the `ogc` string from the name.
For example: `ol.format.ogc.filter.and` to `ol.format.filter.and`.
#### Changes only relevant to those who compile their applications together with the Closure Compiler
A number of internal types have been renamed. This will not affect those who use the API provided by the library, but if you are compiling your application together with OpenLayers and using type names, you'll need to do the following:

View File

@@ -1,6 +1,6 @@
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.format.ogc.filter');
goog.require('ol.format.filter');
goog.require('ol.format.WFS');
goog.require('ol.format.GeoJSON');
goog.require('ol.layer.Tile');
@@ -46,9 +46,9 @@ var featureRequest = new ol.format.WFS().writeGetFeature({
featurePrefix: 'osm',
featureTypes: ['water_areas'],
outputFormat: 'application/json',
filter: ol.format.ogc.filter.and(
ol.format.ogc.filter.like('name', 'Mississippi*'),
ol.format.ogc.filter.equalTo('waterway', 'riverbank')
filter: ol.format.filter.and(
ol.format.filter.like('name', 'Mississippi*'),
ol.format.filter.equalTo('waterway', 'riverbank')
)
});

View File

@@ -2014,7 +2014,7 @@ olx.format.WFSOptions.prototype.schemaLocation;
* startIndex: (number|undefined),
* count: (number|undefined),
* bbox: (ol.Extent|undefined),
* filter: (ol.format.ogc.filter.Filter|undefined),
* filter: (ol.format.filter.Filter|undefined),
* resultType: (string|undefined)}}
*/
olx.format.WFSWriteGetFeatureOptions;
@@ -2121,8 +2121,8 @@ olx.format.WFSWriteGetFeatureOptions.prototype.bbox;
/**
* OGC filter condition. See {@link ol.format.ogc.filter} for more information.
* @type {ol.format.ogc.filter.Filter|undefined}
* Filter condition. See {@link ol.format.filter} for more information.
* @type {ol.format.filter.Filter|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.filter;

View File

@@ -0,0 +1,19 @@
goog.provide('ol.format.filter.And');
goog.require('ol');
goog.require('ol.format.filter.LogicalBinary');
/**
* @classdesc
* Represents a logical `<And>` operator between two filter conditions.
*
* @constructor
* @param {!ol.format.filter.Filter} conditionA First filter condition.
* @param {!ol.format.filter.Filter} conditionB Second filter condition.
* @extends {ol.format.filter.LogicalBinary}
* @api
*/
ol.format.filter.And = function(conditionA, conditionB) {
ol.format.filter.LogicalBinary.call(this, 'And', conditionA, conditionB);
};
ol.inherits(ol.format.filter.And, ol.format.filter.LogicalBinary);

View File

@@ -1,7 +1,7 @@
goog.provide('ol.format.ogc.filter.Bbox');
goog.provide('ol.format.filter.Bbox');
goog.require('ol');
goog.require('ol.format.ogc.filter.Filter');
goog.require('ol.format.filter.Filter');
/**
@@ -14,12 +14,12 @@ goog.require('ol.format.ogc.filter.Filter');
* @param {!ol.Extent} extent Extent.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @extends {ol.format.ogc.filter.Filter}
* @extends {ol.format.filter.Filter}
* @api
*/
ol.format.ogc.filter.Bbox = function(geometryName, extent, opt_srsName) {
ol.format.filter.Bbox = function(geometryName, extent, opt_srsName) {
ol.format.ogc.filter.Filter.call(this, 'BBOX');
ol.format.filter.Filter.call(this, 'BBOX');
/**
* @public
@@ -39,4 +39,4 @@ ol.format.ogc.filter.Bbox = function(geometryName, extent, opt_srsName) {
*/
this.srsName = opt_srsName;
};
ol.inherits(ol.format.ogc.filter.Bbox, ol.format.ogc.filter.Filter);
ol.inherits(ol.format.filter.Bbox, ol.format.filter.Filter);

View File

@@ -1,7 +1,7 @@
goog.provide('ol.format.ogc.filter.Comparison');
goog.provide('ol.format.filter.Comparison');
goog.require('ol');
goog.require('ol.format.ogc.filter.Filter');
goog.require('ol.format.filter.Filter');
/**
@@ -12,12 +12,12 @@ goog.require('ol.format.ogc.filter.Filter');
* @constructor
* @param {!string} tagName The XML tag name for this filter.
* @param {!string} propertyName Name of the context property to compare.
* @extends {ol.format.ogc.filter.Filter}
* @extends {ol.format.filter.Filter}
* @api
*/
ol.format.ogc.filter.Comparison = function(tagName, propertyName) {
ol.format.filter.Comparison = function(tagName, propertyName) {
ol.format.ogc.filter.Filter.call(this, tagName);
ol.format.filter.Filter.call(this, tagName);
/**
* @public
@@ -25,4 +25,4 @@ ol.format.ogc.filter.Comparison = function(tagName, propertyName) {
*/
this.propertyName = propertyName;
};
ol.inherits(ol.format.ogc.filter.Comparison, ol.format.ogc.filter.Filter);
ol.inherits(ol.format.filter.Comparison, ol.format.filter.Filter);

View File

@@ -1,7 +1,7 @@
goog.provide('ol.format.ogc.filter.ComparisonBinary');
goog.provide('ol.format.filter.ComparisonBinary');
goog.require('ol');
goog.require('ol.format.ogc.filter.Comparison');
goog.require('ol.format.filter.Comparison');
/**
@@ -14,13 +14,13 @@ goog.require('ol.format.ogc.filter.Comparison');
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @extends {ol.format.ogc.filter.Comparison}
* @extends {ol.format.filter.Comparison}
* @api
*/
ol.format.ogc.filter.ComparisonBinary = function(
ol.format.filter.ComparisonBinary = function(
tagName, propertyName, expression, opt_matchCase) {
ol.format.ogc.filter.Comparison.call(this, tagName, propertyName);
ol.format.filter.Comparison.call(this, tagName, propertyName);
/**
* @public
@@ -34,4 +34,4 @@ ol.format.ogc.filter.ComparisonBinary = function(
*/
this.matchCase = opt_matchCase;
};
ol.inherits(ol.format.ogc.filter.ComparisonBinary, ol.format.ogc.filter.Comparison);
ol.inherits(ol.format.filter.ComparisonBinary, ol.format.filter.Comparison);

View File

@@ -0,0 +1,21 @@
goog.provide('ol.format.filter.EqualTo');
goog.require('ol');
goog.require('ol.format.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsEqualTo>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @extends {ol.format.filter.ComparisonBinary}
* @api
*/
ol.format.filter.EqualTo = function(propertyName, expression, opt_matchCase) {
ol.format.filter.ComparisonBinary.call(this, 'PropertyIsEqualTo', propertyName, expression, opt_matchCase);
};
ol.inherits(ol.format.filter.EqualTo, ol.format.filter.ComparisonBinary);

View File

@@ -1,4 +1,4 @@
goog.provide('ol.format.ogc.filter.Filter');
goog.provide('ol.format.filter.Filter');
goog.require('ol');
@@ -13,7 +13,7 @@ goog.require('ol');
* @struct
* @api
*/
ol.format.ogc.filter.Filter = function(tagName) {
ol.format.filter.Filter = function(tagName) {
/**
* @private
@@ -26,6 +26,6 @@ ol.format.ogc.filter.Filter = function(tagName) {
* The XML tag name for a filter.
* @returns {!string} Name.
*/
ol.format.ogc.filter.Filter.prototype.getTagName = function() {
ol.format.filter.Filter.prototype.getTagName = function() {
return this.tagName_;
};

View File

@@ -0,0 +1,20 @@
goog.provide('ol.format.filter.GreaterThan');
goog.require('ol');
goog.require('ol.format.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsGreaterThan>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {ol.format.filter.ComparisonBinary}
* @api
*/
ol.format.filter.GreaterThan = function(propertyName, expression) {
ol.format.filter.ComparisonBinary.call(this, 'PropertyIsGreaterThan', propertyName, expression);
};
ol.inherits(ol.format.filter.GreaterThan, ol.format.filter.ComparisonBinary);

View File

@@ -0,0 +1,20 @@
goog.provide('ol.format.filter.GreaterThanOrEqualTo');
goog.require('ol');
goog.require('ol.format.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {ol.format.filter.ComparisonBinary}
* @api
*/
ol.format.filter.GreaterThanOrEqualTo = function(propertyName, expression) {
ol.format.filter.ComparisonBinary.call(this, 'PropertyIsGreaterThanOrEqualTo', propertyName, expression);
};
ol.inherits(ol.format.filter.GreaterThanOrEqualTo, ol.format.filter.ComparisonBinary);

View File

@@ -0,0 +1,233 @@
goog.provide('ol.format.filter');
goog.require('ol');
goog.require('ol.format.filter.And');
goog.require('ol.format.filter.Bbox');
goog.require('ol.format.filter.EqualTo');
goog.require('ol.format.filter.GreaterThan');
goog.require('ol.format.filter.GreaterThanOrEqualTo');
goog.require('ol.format.filter.Intersects');
goog.require('ol.format.filter.IsBetween');
goog.require('ol.format.filter.IsLike');
goog.require('ol.format.filter.IsNull');
goog.require('ol.format.filter.LessThan');
goog.require('ol.format.filter.LessThanOrEqualTo');
goog.require('ol.format.filter.Not');
goog.require('ol.format.filter.NotEqualTo');
goog.require('ol.format.filter.Or');
goog.require('ol.format.filter.Within');
/**
* Create a logical `<And>` operator between two filter conditions.
*
* @param {!ol.format.filter.Filter} conditionA First filter condition.
* @param {!ol.format.filter.Filter} conditionB Second filter condition.
* @returns {!ol.format.filter.And} `<And>` operator.
* @api
*/
ol.format.filter.and = function(conditionA, conditionB) {
return new ol.format.filter.And(conditionA, conditionB);
};
/**
* Create a logical `<Or>` operator between two filter conditions.
*
* @param {!ol.format.filter.Filter} conditionA First filter condition.
* @param {!ol.format.filter.Filter} conditionB Second filter condition.
* @returns {!ol.format.filter.Or} `<Or>` operator.
* @api
*/
ol.format.filter.or = function(conditionA, conditionB) {
return new ol.format.filter.Or(conditionA, conditionB);
};
/**
* Represents a logical `<Not>` operator for a filter condition.
*
* @param {!ol.format.filter.Filter} condition Filter condition.
* @returns {!ol.format.filter.Not} `<Not>` operator.
* @api
*/
ol.format.filter.not = function(condition) {
return new ol.format.filter.Not(condition);
};
/**
* Create a `<BBOX>` operator to test whether a geometry-valued property
* intersects a fixed bounding box
*
* @param {!string} geometryName Geometry name to use.
* @param {!ol.Extent} extent Extent.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @returns {!ol.format.filter.Bbox} `<BBOX>` operator.
* @api
*/
ol.format.filter.bbox = function(geometryName, extent, opt_srsName) {
return new ol.format.filter.Bbox(geometryName, extent, opt_srsName);
};
/**
* Create a `<Intersects>` operator to test whether a geometry-valued property
* intersects a given geometry.
*
* @param {!string} geometryName Geometry name to use.
* @param {!ol.geom.Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @returns {!ol.format.filter.Intersects} `<Intersects>` operator.
* @api
*/
ol.format.filter.intersects = function(geometryName, geometry, opt_srsName) {
return new ol.format.filter.Intersects(geometryName, geometry, opt_srsName);
};
/**
* Create a `<Within>` operator to test whether a geometry-valued property
* is within a given geometry.
*
* @param {!string} geometryName Geometry name to use.
* @param {!ol.geom.Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @returns {!ol.format.filter.Within} `<Within>` operator.
* @api
*/
ol.format.filter.within = function(geometryName, geometry, opt_srsName) {
return new ol.format.filter.Within(geometryName, geometry, opt_srsName);
};
/**
* Creates a `<PropertyIsEqualTo>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!ol.format.filter.EqualTo} `<PropertyIsEqualTo>` operator.
* @api
*/
ol.format.filter.equalTo = function(propertyName, expression, opt_matchCase) {
return new ol.format.filter.EqualTo(propertyName, expression, opt_matchCase);
};
/**
* Creates a `<PropertyIsNotEqualTo>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!ol.format.filter.NotEqualTo} `<PropertyIsNotEqualTo>` operator.
* @api
*/
ol.format.filter.notEqualTo = function(propertyName, expression, opt_matchCase) {
return new ol.format.filter.NotEqualTo(propertyName, expression, opt_matchCase);
};
/**
* Creates a `<PropertyIsLessThan>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!ol.format.filter.LessThan} `<PropertyIsLessThan>` operator.
* @api
*/
ol.format.filter.lessThan = function(propertyName, expression) {
return new ol.format.filter.LessThan(propertyName, expression);
};
/**
* Creates a `<PropertyIsLessThanOrEqualTo>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!ol.format.filter.LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.
* @api
*/
ol.format.filter.lessThanOrEqualTo = function(propertyName, expression) {
return new ol.format.filter.LessThanOrEqualTo(propertyName, expression);
};
/**
* Creates a `<PropertyIsGreaterThan>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!ol.format.filter.GreaterThan} `<PropertyIsGreaterThan>` operator.
* @api
*/
ol.format.filter.greaterThan = function(propertyName, expression) {
return new ol.format.filter.GreaterThan(propertyName, expression);
};
/**
* Creates a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!ol.format.filter.GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.
* @api
*/
ol.format.filter.greaterThanOrEqualTo = function(propertyName, expression) {
return new ol.format.filter.GreaterThanOrEqualTo(propertyName, expression);
};
/**
* Creates a `<PropertyIsNull>` comparison operator to test whether a property value
* is null.
*
* @param {!string} propertyName Name of the context property to compare.
* @returns {!ol.format.filter.IsNull} `<PropertyIsNull>` operator.
* @api
*/
ol.format.filter.isNull = function(propertyName) {
return new ol.format.filter.IsNull(propertyName);
};
/**
* Creates a `<PropertyIsBetween>` comparison operator to test whether an expression
* value lies within a range given by a lower and upper bound (inclusive).
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} lowerBoundary The lower bound of the range.
* @param {!number} upperBoundary The upper bound of the range.
* @returns {!ol.format.filter.IsBetween} `<PropertyIsBetween>` operator.
* @api
*/
ol.format.filter.between = function(propertyName, lowerBoundary, upperBoundary) {
return new ol.format.filter.IsBetween(propertyName, lowerBoundary, upperBoundary);
};
/**
* Represents a `<PropertyIsLike>` comparison operator that matches a string property
* value against a text pattern.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!string} pattern Text pattern.
* @param {string=} opt_wildCard Pattern character which matches any sequence of
* zero or more string characters. Default is '*'.
* @param {string=} opt_singleChar pattern character which matches any single
* string character. Default is '.'.
* @param {string=} opt_escapeChar Escape character which can be used to escape
* the pattern characters. Default is '!'.
* @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!ol.format.filter.IsLike} `<PropertyIsLike>` operator.
* @api
*/
ol.format.filter.like = function(propertyName, pattern,
opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {
return new ol.format.filter.IsLike(propertyName, pattern,
opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase);
};

View File

@@ -9,12 +9,12 @@
* featureNS: 'http://www.openplans.org/topp',
* featurePrefix: 'topp',
* featureTypes: ['states'],
* filter: ol.format.ogc.filter.equalTo('name', 'New York')
* filter: ol.format.filter.equalTo('name', 'New York')
* });
*
* Or to combine a `BBOX` filter with a `PropertyIsLike` filter:
*
* var f = ol.format.ogc.filter;
* var f = ol.format.filter;
* var request = new ol.format.WFS().writeGetFeature({
* srsName: 'urn:ogc:def:crs:EPSG::4326',
* featureNS: 'http://www.openplans.org/topp',
@@ -25,5 +25,5 @@
* f.like('name', 'New*')
* )
* });
* @namespace ol.format.ogc.filter
* @namespace ol.format.filter
*/

View File

@@ -1,7 +1,7 @@
goog.provide('ol.format.ogc.filter.Intersects');
goog.provide('ol.format.filter.Intersects');
goog.require('ol');
goog.require('ol.format.ogc.filter.Spatial');
goog.require('ol.format.filter.Spatial');
/**
@@ -14,12 +14,12 @@ goog.require('ol.format.ogc.filter.Spatial');
* @param {!ol.geom.Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @extends {ol.format.ogc.filter.Spatial}
* @extends {ol.format.filter.Spatial}
* @api
*/
ol.format.ogc.filter.Intersects = function(geometryName, geometry, opt_srsName) {
ol.format.filter.Intersects = function(geometryName, geometry, opt_srsName) {
ol.format.ogc.filter.Spatial.call(this, 'Intersects', geometryName, geometry, opt_srsName);
ol.format.filter.Spatial.call(this, 'Intersects', geometryName, geometry, opt_srsName);
};
ol.inherits(ol.format.ogc.filter.Intersects, ol.format.ogc.filter.Spatial);
ol.inherits(ol.format.filter.Intersects, ol.format.filter.Spatial);

View File

@@ -1,7 +1,7 @@
goog.provide('ol.format.ogc.filter.IsBetween');
goog.provide('ol.format.filter.IsBetween');
goog.require('ol');
goog.require('ol.format.ogc.filter.Comparison');
goog.require('ol.format.filter.Comparison');
/**
@@ -12,11 +12,11 @@ goog.require('ol.format.ogc.filter.Comparison');
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} lowerBoundary The lower bound of the range.
* @param {!number} upperBoundary The upper bound of the range.
* @extends {ol.format.ogc.filter.Comparison}
* @extends {ol.format.filter.Comparison}
* @api
*/
ol.format.ogc.filter.IsBetween = function(propertyName, lowerBoundary, upperBoundary) {
ol.format.ogc.filter.Comparison.call(this, 'PropertyIsBetween', propertyName);
ol.format.filter.IsBetween = function(propertyName, lowerBoundary, upperBoundary) {
ol.format.filter.Comparison.call(this, 'PropertyIsBetween', propertyName);
/**
* @public
@@ -30,4 +30,4 @@ ol.format.ogc.filter.IsBetween = function(propertyName, lowerBoundary, upperBoun
*/
this.upperBoundary = upperBoundary;
};
ol.inherits(ol.format.ogc.filter.IsBetween, ol.format.ogc.filter.Comparison);
ol.inherits(ol.format.filter.IsBetween, ol.format.filter.Comparison);

View File

@@ -1,7 +1,7 @@
goog.provide('ol.format.ogc.filter.IsLike');
goog.provide('ol.format.filter.IsLike');
goog.require('ol');
goog.require('ol.format.ogc.filter.Comparison');
goog.require('ol.format.filter.Comparison');
/**
@@ -18,12 +18,12 @@ goog.require('ol.format.ogc.filter.Comparison');
* @param {string=} opt_escapeChar Escape character which can be used to escape
* the pattern characters. Default is '!'.
* @param {boolean=} opt_matchCase Case-sensitive?
* @extends {ol.format.ogc.filter.Comparison}
* @extends {ol.format.filter.Comparison}
* @api
*/
ol.format.ogc.filter.IsLike = function(propertyName, pattern,
ol.format.filter.IsLike = function(propertyName, pattern,
opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {
ol.format.ogc.filter.Comparison.call(this, 'PropertyIsLike', propertyName);
ol.format.filter.Comparison.call(this, 'PropertyIsLike', propertyName);
/**
* @public
@@ -55,4 +55,4 @@ ol.format.ogc.filter.IsLike = function(propertyName, pattern,
*/
this.matchCase = opt_matchCase;
};
ol.inherits(ol.format.ogc.filter.IsLike, ol.format.ogc.filter.Comparison);
ol.inherits(ol.format.filter.IsLike, ol.format.filter.Comparison);

View File

@@ -0,0 +1,19 @@
goog.provide('ol.format.filter.IsNull');
goog.require('ol');
goog.require('ol.format.filter.Comparison');
/**
* @classdesc
* Represents a `<PropertyIsNull>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @extends {ol.format.filter.Comparison}
* @api
*/
ol.format.filter.IsNull = function(propertyName) {
ol.format.filter.Comparison.call(this, 'PropertyIsNull', propertyName);
};
ol.inherits(ol.format.filter.IsNull, ol.format.filter.Comparison);

View File

@@ -0,0 +1,20 @@
goog.provide('ol.format.filter.LessThan');
goog.require('ol');
goog.require('ol.format.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsLessThan>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {ol.format.filter.ComparisonBinary}
* @api
*/
ol.format.filter.LessThan = function(propertyName, expression) {
ol.format.filter.ComparisonBinary.call(this, 'PropertyIsLessThan', propertyName, expression);
};
ol.inherits(ol.format.filter.LessThan, ol.format.filter.ComparisonBinary);

View File

@@ -0,0 +1,20 @@
goog.provide('ol.format.filter.LessThanOrEqualTo');
goog.require('ol');
goog.require('ol.format.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsLessThanOrEqualTo>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {ol.format.filter.ComparisonBinary}
* @api
*/
ol.format.filter.LessThanOrEqualTo = function(propertyName, expression) {
ol.format.filter.ComparisonBinary.call(this, 'PropertyIsLessThanOrEqualTo', propertyName, expression);
};
ol.inherits(ol.format.filter.LessThanOrEqualTo, ol.format.filter.ComparisonBinary);

View File

@@ -0,0 +1,19 @@
goog.provide('ol.format.filter.Logical');
goog.require('ol');
goog.require('ol.format.filter.Filter');
/**
* @classdesc
* Abstract class; normally only used for creating subclasses and not instantiated in apps.
* Base class for WFS GetFeature logical filters.
*
* @constructor
* @param {!string} tagName The XML tag name for this filter.
* @extends {ol.format.filter.Filter}
*/
ol.format.filter.Logical = function(tagName) {
ol.format.filter.Filter.call(this, tagName);
};
ol.inherits(ol.format.filter.Logical, ol.format.filter.Filter);

View File

@@ -0,0 +1,35 @@
goog.provide('ol.format.filter.LogicalBinary');
goog.require('ol');
goog.require('ol.format.filter.Logical');
/**
* @classdesc
* Abstract class; normally only used for creating subclasses and not instantiated in apps.
* Base class for WFS GetFeature binary logical filters.
*
* @constructor
* @param {!string} tagName The XML tag name for this filter.
* @param {!ol.format.filter.Filter} conditionA First filter condition.
* @param {!ol.format.filter.Filter} conditionB Second filter condition.
* @extends {ol.format.filter.Logical}
*/
ol.format.filter.LogicalBinary = function(tagName, conditionA, conditionB) {
ol.format.filter.Logical.call(this, tagName);
/**
* @public
* @type {!ol.format.filter.Filter}
*/
this.conditionA = conditionA;
/**
* @public
* @type {!ol.format.filter.Filter}
*/
this.conditionB = conditionB;
};
ol.inherits(ol.format.filter.LogicalBinary, ol.format.filter.Logical);

View File

@@ -0,0 +1,26 @@
goog.provide('ol.format.filter.Not');
goog.require('ol');
goog.require('ol.format.filter.Logical');
/**
* @classdesc
* Represents a logical `<Not>` operator for a filter condition.
*
* @constructor
* @param {!ol.format.filter.Filter} condition Filter condition.
* @extends {ol.format.filter.Logical}
* @api
*/
ol.format.filter.Not = function(condition) {
ol.format.filter.Logical.call(this, 'Not');
/**
* @public
* @type {!ol.format.filter.Filter}
*/
this.condition = condition;
};
ol.inherits(ol.format.filter.Not, ol.format.filter.Logical);

View File

@@ -0,0 +1,21 @@
goog.provide('ol.format.filter.NotEqualTo');
goog.require('ol');
goog.require('ol.format.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsNotEqualTo>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @extends {ol.format.filter.ComparisonBinary}
* @api
*/
ol.format.filter.NotEqualTo = function(propertyName, expression, opt_matchCase) {
ol.format.filter.ComparisonBinary.call(this, 'PropertyIsNotEqualTo', propertyName, expression, opt_matchCase);
};
ol.inherits(ol.format.filter.NotEqualTo, ol.format.filter.ComparisonBinary);

View File

@@ -0,0 +1,20 @@
goog.provide('ol.format.filter.Or');
goog.require('ol');
goog.require('ol.format.filter.LogicalBinary');
/**
* @classdesc
* Represents a logical `<Or>` operator between two filter conditions.
*
* @constructor
* @param {!ol.format.filter.Filter} conditionA First filter condition.
* @param {!ol.format.filter.Filter} conditionB Second filter condition.
* @extends {ol.format.filter.LogicalBinary}
* @api
*/
ol.format.filter.Or = function(conditionA, conditionB) {
ol.format.filter.LogicalBinary.call(this, 'Or', conditionA, conditionB);
};
ol.inherits(ol.format.filter.Or, ol.format.filter.LogicalBinary);

View File

@@ -1,7 +1,7 @@
goog.provide('ol.format.ogc.filter.Spatial');
goog.provide('ol.format.filter.Spatial');
goog.require('ol');
goog.require('ol.format.ogc.filter.Filter');
goog.require('ol.format.filter.Filter');
/**
@@ -15,12 +15,12 @@ goog.require('ol.format.ogc.filter.Filter');
* @param {!ol.geom.Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @extends {ol.format.ogc.filter.Filter}
* @extends {ol.format.filter.Filter}
* @api
*/
ol.format.ogc.filter.Spatial = function(tagName, geometryName, geometry, opt_srsName) {
ol.format.filter.Spatial = function(tagName, geometryName, geometry, opt_srsName) {
ol.format.ogc.filter.Filter.call(this, tagName);
ol.format.filter.Filter.call(this, tagName);
/**
* @public
@@ -40,4 +40,4 @@ ol.format.ogc.filter.Spatial = function(tagName, geometryName, geometry, opt_srs
*/
this.srsName = opt_srsName;
};
ol.inherits(ol.format.ogc.filter.Spatial, ol.format.ogc.filter.Filter);
ol.inherits(ol.format.filter.Spatial, ol.format.filter.Filter);

View File

@@ -1,7 +1,7 @@
goog.provide('ol.format.ogc.filter.Within');
goog.provide('ol.format.filter.Within');
goog.require('ol');
goog.require('ol.format.ogc.filter.Spatial');
goog.require('ol.format.filter.Spatial');
/**
@@ -14,12 +14,12 @@ goog.require('ol.format.ogc.filter.Spatial');
* @param {!ol.geom.Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @extends {ol.format.ogc.filter.Spatial}
* @extends {ol.format.filter.Spatial}
* @api
*/
ol.format.ogc.filter.Within = function(geometryName, geometry, opt_srsName) {
ol.format.filter.Within = function(geometryName, geometry, opt_srsName) {
ol.format.ogc.filter.Spatial.call(this, 'Within', geometryName, geometry, opt_srsName);
ol.format.filter.Spatial.call(this, 'Within', geometryName, geometry, opt_srsName);
};
ol.inherits(ol.format.ogc.filter.Within, ol.format.ogc.filter.Spatial);
ol.inherits(ol.format.filter.Within, ol.format.filter.Spatial);

View File

@@ -1,19 +0,0 @@
goog.provide('ol.format.ogc.filter.And');
goog.require('ol');
goog.require('ol.format.ogc.filter.LogicalBinary');
/**
* @classdesc
* Represents a logical `<And>` operator between two filter conditions.
*
* @constructor
* @param {!ol.format.ogc.filter.Filter} conditionA First filter condition.
* @param {!ol.format.ogc.filter.Filter} conditionB Second filter condition.
* @extends {ol.format.ogc.filter.LogicalBinary}
* @api
*/
ol.format.ogc.filter.And = function(conditionA, conditionB) {
ol.format.ogc.filter.LogicalBinary.call(this, 'And', conditionA, conditionB);
};
ol.inherits(ol.format.ogc.filter.And, ol.format.ogc.filter.LogicalBinary);

View File

@@ -1,21 +0,0 @@
goog.provide('ol.format.ogc.filter.EqualTo');
goog.require('ol');
goog.require('ol.format.ogc.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsEqualTo>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @extends {ol.format.ogc.filter.ComparisonBinary}
* @api
*/
ol.format.ogc.filter.EqualTo = function(propertyName, expression, opt_matchCase) {
ol.format.ogc.filter.ComparisonBinary.call(this, 'PropertyIsEqualTo', propertyName, expression, opt_matchCase);
};
ol.inherits(ol.format.ogc.filter.EqualTo, ol.format.ogc.filter.ComparisonBinary);

View File

@@ -1,20 +0,0 @@
goog.provide('ol.format.ogc.filter.GreaterThan');
goog.require('ol');
goog.require('ol.format.ogc.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsGreaterThan>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {ol.format.ogc.filter.ComparisonBinary}
* @api
*/
ol.format.ogc.filter.GreaterThan = function(propertyName, expression) {
ol.format.ogc.filter.ComparisonBinary.call(this, 'PropertyIsGreaterThan', propertyName, expression);
};
ol.inherits(ol.format.ogc.filter.GreaterThan, ol.format.ogc.filter.ComparisonBinary);

View File

@@ -1,20 +0,0 @@
goog.provide('ol.format.ogc.filter.GreaterThanOrEqualTo');
goog.require('ol');
goog.require('ol.format.ogc.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {ol.format.ogc.filter.ComparisonBinary}
* @api
*/
ol.format.ogc.filter.GreaterThanOrEqualTo = function(propertyName, expression) {
ol.format.ogc.filter.ComparisonBinary.call(this, 'PropertyIsGreaterThanOrEqualTo', propertyName, expression);
};
ol.inherits(ol.format.ogc.filter.GreaterThanOrEqualTo, ol.format.ogc.filter.ComparisonBinary);

View File

@@ -1,233 +0,0 @@
goog.provide('ol.format.ogc.filter');
goog.require('ol');
goog.require('ol.format.ogc.filter.And');
goog.require('ol.format.ogc.filter.Bbox');
goog.require('ol.format.ogc.filter.EqualTo');
goog.require('ol.format.ogc.filter.GreaterThan');
goog.require('ol.format.ogc.filter.GreaterThanOrEqualTo');
goog.require('ol.format.ogc.filter.Intersects');
goog.require('ol.format.ogc.filter.IsBetween');
goog.require('ol.format.ogc.filter.IsLike');
goog.require('ol.format.ogc.filter.IsNull');
goog.require('ol.format.ogc.filter.LessThan');
goog.require('ol.format.ogc.filter.LessThanOrEqualTo');
goog.require('ol.format.ogc.filter.Not');
goog.require('ol.format.ogc.filter.NotEqualTo');
goog.require('ol.format.ogc.filter.Or');
goog.require('ol.format.ogc.filter.Within');
/**
* Create a logical `<And>` operator between two filter conditions.
*
* @param {!ol.format.ogc.filter.Filter} conditionA First filter condition.
* @param {!ol.format.ogc.filter.Filter} conditionB Second filter condition.
* @returns {!ol.format.ogc.filter.And} `<And>` operator.
* @api
*/
ol.format.ogc.filter.and = function(conditionA, conditionB) {
return new ol.format.ogc.filter.And(conditionA, conditionB);
};
/**
* Create a logical `<Or>` operator between two filter conditions.
*
* @param {!ol.format.ogc.filter.Filter} conditionA First filter condition.
* @param {!ol.format.ogc.filter.Filter} conditionB Second filter condition.
* @returns {!ol.format.ogc.filter.Or} `<Or>` operator.
* @api
*/
ol.format.ogc.filter.or = function(conditionA, conditionB) {
return new ol.format.ogc.filter.Or(conditionA, conditionB);
};
/**
* Represents a logical `<Not>` operator for a filter condition.
*
* @param {!ol.format.ogc.filter.Filter} condition Filter condition.
* @returns {!ol.format.ogc.filter.Not} `<Not>` operator.
* @api
*/
ol.format.ogc.filter.not = function(condition) {
return new ol.format.ogc.filter.Not(condition);
};
/**
* Create a `<BBOX>` operator to test whether a geometry-valued property
* intersects a fixed bounding box
*
* @param {!string} geometryName Geometry name to use.
* @param {!ol.Extent} extent Extent.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @returns {!ol.format.ogc.filter.Bbox} `<BBOX>` operator.
* @api
*/
ol.format.ogc.filter.bbox = function(geometryName, extent, opt_srsName) {
return new ol.format.ogc.filter.Bbox(geometryName, extent, opt_srsName);
};
/**
* Create a `<Intersects>` operator to test whether a geometry-valued property
* intersects a given geometry.
*
* @param {!string} geometryName Geometry name to use.
* @param {!ol.geom.Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @returns {!ol.format.ogc.filter.Intersects} `<Intersects>` operator.
* @api
*/
ol.format.ogc.filter.intersects = function(geometryName, geometry, opt_srsName) {
return new ol.format.ogc.filter.Intersects(geometryName, geometry, opt_srsName);
};
/**
* Create a `<Within>` operator to test whether a geometry-valued property
* is within a given geometry.
*
* @param {!string} geometryName Geometry name to use.
* @param {!ol.geom.Geometry} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided.
* @returns {!ol.format.ogc.filter.Within} `<Within>` operator.
* @api
*/
ol.format.ogc.filter.within = function(geometryName, geometry, opt_srsName) {
return new ol.format.ogc.filter.Within(geometryName, geometry, opt_srsName);
};
/**
* Creates a `<PropertyIsEqualTo>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!ol.format.ogc.filter.EqualTo} `<PropertyIsEqualTo>` operator.
* @api
*/
ol.format.ogc.filter.equalTo = function(propertyName, expression, opt_matchCase) {
return new ol.format.ogc.filter.EqualTo(propertyName, expression, opt_matchCase);
};
/**
* Creates a `<PropertyIsNotEqualTo>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!ol.format.ogc.filter.NotEqualTo} `<PropertyIsNotEqualTo>` operator.
* @api
*/
ol.format.ogc.filter.notEqualTo = function(propertyName, expression, opt_matchCase) {
return new ol.format.ogc.filter.NotEqualTo(propertyName, expression, opt_matchCase);
};
/**
* Creates a `<PropertyIsLessThan>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!ol.format.ogc.filter.LessThan} `<PropertyIsLessThan>` operator.
* @api
*/
ol.format.ogc.filter.lessThan = function(propertyName, expression) {
return new ol.format.ogc.filter.LessThan(propertyName, expression);
};
/**
* Creates a `<PropertyIsLessThanOrEqualTo>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!ol.format.ogc.filter.LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.
* @api
*/
ol.format.ogc.filter.lessThanOrEqualTo = function(propertyName, expression) {
return new ol.format.ogc.filter.LessThanOrEqualTo(propertyName, expression);
};
/**
* Creates a `<PropertyIsGreaterThan>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!ol.format.ogc.filter.GreaterThan} `<PropertyIsGreaterThan>` operator.
* @api
*/
ol.format.ogc.filter.greaterThan = function(propertyName, expression) {
return new ol.format.ogc.filter.GreaterThan(propertyName, expression);
};
/**
* Creates a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @returns {!ol.format.ogc.filter.GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.
* @api
*/
ol.format.ogc.filter.greaterThanOrEqualTo = function(propertyName, expression) {
return new ol.format.ogc.filter.GreaterThanOrEqualTo(propertyName, expression);
};
/**
* Creates a `<PropertyIsNull>` comparison operator to test whether a property value
* is null.
*
* @param {!string} propertyName Name of the context property to compare.
* @returns {!ol.format.ogc.filter.IsNull} `<PropertyIsNull>` operator.
* @api
*/
ol.format.ogc.filter.isNull = function(propertyName) {
return new ol.format.ogc.filter.IsNull(propertyName);
};
/**
* Creates a `<PropertyIsBetween>` comparison operator to test whether an expression
* value lies within a range given by a lower and upper bound (inclusive).
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} lowerBoundary The lower bound of the range.
* @param {!number} upperBoundary The upper bound of the range.
* @returns {!ol.format.ogc.filter.IsBetween} `<PropertyIsBetween>` operator.
* @api
*/
ol.format.ogc.filter.between = function(propertyName, lowerBoundary, upperBoundary) {
return new ol.format.ogc.filter.IsBetween(propertyName, lowerBoundary, upperBoundary);
};
/**
* Represents a `<PropertyIsLike>` comparison operator that matches a string property
* value against a text pattern.
*
* @param {!string} propertyName Name of the context property to compare.
* @param {!string} pattern Text pattern.
* @param {string=} opt_wildCard Pattern character which matches any sequence of
* zero or more string characters. Default is '*'.
* @param {string=} opt_singleChar pattern character which matches any single
* string character. Default is '.'.
* @param {string=} opt_escapeChar Escape character which can be used to escape
* the pattern characters. Default is '!'.
* @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!ol.format.ogc.filter.IsLike} `<PropertyIsLike>` operator.
* @api
*/
ol.format.ogc.filter.like = function(propertyName, pattern,
opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {
return new ol.format.ogc.filter.IsLike(propertyName, pattern,
opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase);
};

View File

@@ -1,19 +0,0 @@
goog.provide('ol.format.ogc.filter.IsNull');
goog.require('ol');
goog.require('ol.format.ogc.filter.Comparison');
/**
* @classdesc
* Represents a `<PropertyIsNull>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @extends {ol.format.ogc.filter.Comparison}
* @api
*/
ol.format.ogc.filter.IsNull = function(propertyName) {
ol.format.ogc.filter.Comparison.call(this, 'PropertyIsNull', propertyName);
};
ol.inherits(ol.format.ogc.filter.IsNull, ol.format.ogc.filter.Comparison);

View File

@@ -1,20 +0,0 @@
goog.provide('ol.format.ogc.filter.LessThan');
goog.require('ol');
goog.require('ol.format.ogc.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsLessThan>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {ol.format.ogc.filter.ComparisonBinary}
* @api
*/
ol.format.ogc.filter.LessThan = function(propertyName, expression) {
ol.format.ogc.filter.ComparisonBinary.call(this, 'PropertyIsLessThan', propertyName, expression);
};
ol.inherits(ol.format.ogc.filter.LessThan, ol.format.ogc.filter.ComparisonBinary);

View File

@@ -1,20 +0,0 @@
goog.provide('ol.format.ogc.filter.LessThanOrEqualTo');
goog.require('ol');
goog.require('ol.format.ogc.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsLessThanOrEqualTo>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare.
* @extends {ol.format.ogc.filter.ComparisonBinary}
* @api
*/
ol.format.ogc.filter.LessThanOrEqualTo = function(propertyName, expression) {
ol.format.ogc.filter.ComparisonBinary.call(this, 'PropertyIsLessThanOrEqualTo', propertyName, expression);
};
ol.inherits(ol.format.ogc.filter.LessThanOrEqualTo, ol.format.ogc.filter.ComparisonBinary);

View File

@@ -1,19 +0,0 @@
goog.provide('ol.format.ogc.filter.Logical');
goog.require('ol');
goog.require('ol.format.ogc.filter.Filter');
/**
* @classdesc
* Abstract class; normally only used for creating subclasses and not instantiated in apps.
* Base class for WFS GetFeature logical filters.
*
* @constructor
* @param {!string} tagName The XML tag name for this filter.
* @extends {ol.format.ogc.filter.Filter}
*/
ol.format.ogc.filter.Logical = function(tagName) {
ol.format.ogc.filter.Filter.call(this, tagName);
};
ol.inherits(ol.format.ogc.filter.Logical, ol.format.ogc.filter.Filter);

View File

@@ -1,35 +0,0 @@
goog.provide('ol.format.ogc.filter.LogicalBinary');
goog.require('ol');
goog.require('ol.format.ogc.filter.Logical');
/**
* @classdesc
* Abstract class; normally only used for creating subclasses and not instantiated in apps.
* Base class for WFS GetFeature binary logical filters.
*
* @constructor
* @param {!string} tagName The XML tag name for this filter.
* @param {!ol.format.ogc.filter.Filter} conditionA First filter condition.
* @param {!ol.format.ogc.filter.Filter} conditionB Second filter condition.
* @extends {ol.format.ogc.filter.Logical}
*/
ol.format.ogc.filter.LogicalBinary = function(tagName, conditionA, conditionB) {
ol.format.ogc.filter.Logical.call(this, tagName);
/**
* @public
* @type {!ol.format.ogc.filter.Filter}
*/
this.conditionA = conditionA;
/**
* @public
* @type {!ol.format.ogc.filter.Filter}
*/
this.conditionB = conditionB;
};
ol.inherits(ol.format.ogc.filter.LogicalBinary, ol.format.ogc.filter.Logical);

View File

@@ -1,26 +0,0 @@
goog.provide('ol.format.ogc.filter.Not');
goog.require('ol');
goog.require('ol.format.ogc.filter.Logical');
/**
* @classdesc
* Represents a logical `<Not>` operator for a filter condition.
*
* @constructor
* @param {!ol.format.ogc.filter.Filter} condition Filter condition.
* @extends {ol.format.ogc.filter.Logical}
* @api
*/
ol.format.ogc.filter.Not = function(condition) {
ol.format.ogc.filter.Logical.call(this, 'Not');
/**
* @public
* @type {!ol.format.ogc.filter.Filter}
*/
this.condition = condition;
};
ol.inherits(ol.format.ogc.filter.Not, ol.format.ogc.filter.Logical);

View File

@@ -1,21 +0,0 @@
goog.provide('ol.format.ogc.filter.NotEqualTo');
goog.require('ol');
goog.require('ol.format.ogc.filter.ComparisonBinary');
/**
* @classdesc
* Represents a `<PropertyIsNotEqualTo>` comparison operator.
*
* @constructor
* @param {!string} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive?
* @extends {ol.format.ogc.filter.ComparisonBinary}
* @api
*/
ol.format.ogc.filter.NotEqualTo = function(propertyName, expression, opt_matchCase) {
ol.format.ogc.filter.ComparisonBinary.call(this, 'PropertyIsNotEqualTo', propertyName, expression, opt_matchCase);
};
ol.inherits(ol.format.ogc.filter.NotEqualTo, ol.format.ogc.filter.ComparisonBinary);

View File

@@ -1,20 +0,0 @@
goog.provide('ol.format.ogc.filter.Or');
goog.require('ol');
goog.require('ol.format.ogc.filter.LogicalBinary');
/**
* @classdesc
* Represents a logical `<Or>` operator between two filter conditions.
*
* @constructor
* @param {!ol.format.ogc.filter.Filter} conditionA First filter condition.
* @param {!ol.format.ogc.filter.Filter} conditionB Second filter condition.
* @extends {ol.format.ogc.filter.LogicalBinary}
* @api
*/
ol.format.ogc.filter.Or = function(conditionA, conditionB) {
ol.format.ogc.filter.LogicalBinary.call(this, 'Or', conditionA, conditionB);
};
ol.inherits(ol.format.ogc.filter.Or, ol.format.ogc.filter.LogicalBinary);

View File

@@ -4,7 +4,7 @@ goog.require('ol');
goog.require('ol.asserts');
goog.require('ol.format.GML3');
goog.require('ol.format.GMLBase');
goog.require('ol.format.ogc.filter');
goog.require('ol.format.filter');
goog.require('ol.format.XMLFeature');
goog.require('ol.format.XSD');
goog.require('ol.geom.Geometry');
@@ -550,7 +550,7 @@ ol.format.WFS.writeQuery_ = function(node, featureType, objectStack) {
/**
* @param {Node} node Node.
* @param {ol.format.ogc.filter.Filter} filter Filter.
* @param {ol.format.filter.Filter} filter Filter.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -566,7 +566,7 @@ ol.format.WFS.writeFilterCondition_ = function(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {ol.format.ogc.filter.Bbox} filter Filter.
* @param {ol.format.filter.Bbox} filter Filter.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -581,7 +581,7 @@ ol.format.WFS.writeBboxFilter_ = function(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {ol.format.ogc.filter.Intersects} filter Filter.
* @param {ol.format.filter.Intersects} filter Filter.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -596,7 +596,7 @@ ol.format.WFS.writeIntersectsFilter_ = function(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {ol.format.ogc.filter.Within} filter Filter.
* @param {ol.format.filter.Within} filter Filter.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -611,7 +611,7 @@ ol.format.WFS.writeWithinFilter_ = function(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {ol.format.ogc.filter.LogicalBinary} filter Filter.
* @param {ol.format.filter.LogicalBinary} filter Filter.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -633,7 +633,7 @@ ol.format.WFS.writeLogicalFilter_ = function(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {ol.format.ogc.filter.Not} filter Filter.
* @param {ol.format.filter.Not} filter Filter.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -650,7 +650,7 @@ ol.format.WFS.writeNotFilter_ = function(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {ol.format.ogc.filter.ComparisonBinary} filter Filter.
* @param {ol.format.filter.ComparisonBinary} filter Filter.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -665,7 +665,7 @@ ol.format.WFS.writeComparisonFilter_ = function(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {ol.format.ogc.filter.IsNull} filter Filter.
* @param {ol.format.filter.IsNull} filter Filter.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -676,7 +676,7 @@ ol.format.WFS.writeIsNullFilter_ = function(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {ol.format.ogc.filter.IsBetween} filter Filter.
* @param {ol.format.filter.IsBetween} filter Filter.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -695,7 +695,7 @@ ol.format.WFS.writeIsBetweenFilter_ = function(node, filter, objectStack) {
/**
* @param {Node} node Node.
* @param {ol.format.ogc.filter.IsLike} filter Filter.
* @param {ol.format.filter.IsLike} filter Filter.
* @param {Array.<*>} objectStack Node stack.
* @private
*/
@@ -824,11 +824,11 @@ ol.format.WFS.prototype.writeGetFeature = function(options) {
if (options.bbox) {
ol.asserts.assert(options.geometryName,
12); // `options.geometryName` must also be provided when `options.bbox` is set
var bbox = ol.format.ogc.filter.bbox(
var bbox = ol.format.filter.bbox(
/** @type {string} */ (options.geometryName), options.bbox, options.srsName);
if (filter) {
// if bbox and filter are both set, combine the two into a single filter
filter = ol.format.ogc.filter.and(filter, bbox);
filter = ol.format.filter.and(filter, bbox);
} else {
filter = bbox;
}

View File

@@ -3,7 +3,7 @@ goog.provide('ol.test.format.WFS');
goog.require('ol.Feature');
goog.require('ol.format.GML2');
goog.require('ol.format.WFS');
goog.require('ol.format.ogc.filter');
goog.require('ol.format.filter');
goog.require('ol.geom.MultiLineString');
goog.require('ol.geom.MultiPoint');
goog.require('ol.geom.MultiPolygon');
@@ -277,7 +277,7 @@ describe('ol.format.WFS', function() {
featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp',
featureTypes: ['states'],
filter: ol.format.ogc.filter.equalTo('name', 'New York', false)
filter: ol.format.filter.equalTo('name', 'New York', false)
});
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
});
@@ -305,9 +305,9 @@ describe('ol.format.WFS', function() {
featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp',
featureTypes: ['states'],
filter: ol.format.ogc.filter.or(
ol.format.ogc.filter.equalTo('name', 'New York'),
ol.format.ogc.filter.equalTo('area', 1234))
filter: ol.format.filter.or(
ol.format.filter.equalTo('name', 'New York'),
ol.format.filter.equalTo('area', 1234))
});
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
});
@@ -347,14 +347,14 @@ describe('ol.format.WFS', function() {
featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp',
featureTypes: ['states'],
filter: ol.format.ogc.filter.or(
ol.format.ogc.filter.and(
ol.format.ogc.filter.greaterThan('area', 100),
ol.format.ogc.filter.greaterThanOrEqualTo('pop', 20000)
filter: ol.format.filter.or(
ol.format.filter.and(
ol.format.filter.greaterThan('area', 100),
ol.format.filter.greaterThanOrEqualTo('pop', 20000)
),
ol.format.ogc.filter.and(
ol.format.ogc.filter.lessThan('area', 100),
ol.format.ogc.filter.lessThanOrEqualTo('pop', 20000)
ol.format.filter.and(
ol.format.filter.lessThan('area', 100),
ol.format.filter.lessThanOrEqualTo('pop', 20000)
)
)
});
@@ -379,7 +379,7 @@ describe('ol.format.WFS', function() {
featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp',
featureTypes: ['states'],
filter: ol.format.ogc.filter.between('area', 100, 1000)
filter: ol.format.filter.between('area', 100, 1000)
});
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
});
@@ -400,7 +400,7 @@ describe('ol.format.WFS', function() {
featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp',
featureTypes: ['states'],
filter: ol.format.ogc.filter.isNull('area')
filter: ol.format.filter.isNull('area')
});
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
});
@@ -422,7 +422,7 @@ describe('ol.format.WFS', function() {
featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp',
featureTypes: ['states'],
filter: ol.format.ogc.filter.like('name', 'New*')
filter: ol.format.filter.like('name', 'New*')
});
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
});
@@ -444,7 +444,7 @@ describe('ol.format.WFS', function() {
featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp',
featureTypes: ['states'],
filter: ol.format.ogc.filter.like('name', 'New*', '*', '.', '!', false)
filter: ol.format.filter.like('name', 'New*', '*', '.', '!', false)
});
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
});
@@ -468,7 +468,7 @@ describe('ol.format.WFS', function() {
featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp',
featureTypes: ['states'],
filter: ol.format.ogc.filter.not(ol.format.ogc.filter.equalTo('name', 'New York'))
filter: ol.format.filter.not(ol.format.filter.equalTo('name', 'New York'))
});
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
});
@@ -500,9 +500,9 @@ describe('ol.format.WFS', function() {
featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp',
featureTypes: ['states'],
filter: ol.format.ogc.filter.and(
ol.format.ogc.filter.equalTo('name', 'New York'),
ol.format.ogc.filter.bbox('the_geom', [1, 2, 3, 4], 'urn:ogc:def:crs:EPSG::4326')
filter: ol.format.filter.and(
ol.format.filter.equalTo('name', 'New York'),
ol.format.filter.bbox('the_geom', [1, 2, 3, 4], 'urn:ogc:def:crs:EPSG::4326')
)
});
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
@@ -531,7 +531,7 @@ describe('ol.format.WFS', function() {
var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'EPSG:4326',
featureTypes: ['area'],
filter: ol.format.ogc.filter.intersects(
filter: ol.format.filter.intersects(
'the_geom',
new ol.geom.Polygon([[
[10, 20],
@@ -568,7 +568,7 @@ describe('ol.format.WFS', function() {
var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'EPSG:4326',
featureTypes: ['area'],
filter: ol.format.ogc.filter.within(
filter: ol.format.filter.within(
'the_geom',
new ol.geom.Polygon([[
[10, 20],