Move WriteGetFeatureOptions to ol/format/WFS

This commit is contained in:
Tim Schaub
2018-03-11 22:26:22 -06:00
parent 4c78642ae2
commit ca46c4dd07
3 changed files with 26 additions and 161 deletions

View File

@@ -5,142 +5,6 @@
let olx; let olx;
/**
* @typedef {{featureNS: string,
* featurePrefix: string,
* featureTypes: Array.<string>,
* srsName: (string|undefined),
* handle: (string|undefined),
* outputFormat: (string|undefined),
* maxFeatures: (number|undefined),
* geometryName: (string|undefined),
* propertyNames: (Array.<string>|undefined),
* startIndex: (number|undefined),
* count: (number|undefined),
* bbox: (ol.Extent|undefined),
* filter: (ol.format.filter.Filter|undefined),
* resultType: (string|undefined)}}
*/
olx.format.WFSWriteGetFeatureOptions;
/**
* The namespace URI used for features.
* @type {string}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.featureNS;
/**
* The prefix for the feature namespace.
* @type {string}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.featurePrefix;
/**
* The feature type names.
* @type {Array.<string>}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.featureTypes;
/**
* SRS name. No srsName attribute will be set on geometries when this is not
* provided.
* @type {string|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.srsName;
/**
* Handle.
* @type {string|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.handle;
/**
* Output format.
* @type {string|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.outputFormat;
/**
* Maximum number of features to fetch.
* @type {number|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.maxFeatures;
/**
* Geometry name to use in a BBOX filter.
* @type {string|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.geometryName;
/**
* Optional list of property names to serialize.
* @type {Array.<string>|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.propertyNames;
/**
* Start index to use for WFS paging. This is a WFS 2.0 feature backported to
* WFS 1.1.0 by some Web Feature Services.
* @type {number|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.startIndex;
/**
* Number of features to retrieve when paging. This is a WFS 2.0 feature
* backported to WFS 1.1.0 by some Web Feature Services. Please note that some
* Web Feature Services have repurposed `maxfeatures` instead.
* @type {number|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.count;
/**
* Extent to use for the BBOX filter.
* @type {ol.Extent|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.bbox;
/**
* Filter condition. See {@link ol.format.filter} for more information.
* @type {ol.format.filter.Filter|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.filter;
/**
* Indicates what response should be returned, E.g. `hits` only includes the
* `numberOfFeatures` attribute in the response and no features.
* @type {string|undefined}
* @api
*/
olx.format.WFSWriteGetFeatureOptions.prototype.resultType;
/** /**
* @typedef {{featureNS: string, * @typedef {{featureNS: string,
* featurePrefix: string, * featurePrefix: string,

View File

@@ -1,28 +1,4 @@
/**
* @typedef {Object} format_WFSWriteGetFeatureOptions
* @property {string} featureNS The namespace URI used for features.
* @property {string} featurePrefix The prefix for the feature namespace.
* @property {Array.<string>} featureTypes The feature type names.
* @property {string|undefined} srsName SRS name. No srsName attribute will be set on geometries when this is not
* provided.
* @property {string|undefined} handle Handle.
* @property {string|undefined} outputFormat Output format.
* @property {number|undefined} maxFeatures Maximum number of features to fetch.
* @property {string|undefined} geometryName Geometry name to use in a BBOX filter.
* @property {Array.<string>|undefined} propertyNames Optional list of property names to serialize.
* @property {number|undefined} startIndex Start index to use for WFS paging. This is a WFS 2.0 feature backported to
* WFS 1.1.0 by some Web Feature Services.
* @property {number|undefined} count Number of features to retrieve when paging. This is a WFS 2.0 feature
* backported to WFS 1.1.0 by some Web Feature Services. Please note that some
* Web Feature Services have repurposed `maxfeatures` instead.
* @property {ol.Extent|undefined} bbox Extent to use for the BBOX filter.
* @property {ol.format.filter.Filter|undefined} filter Filter condition. See {@link ol.format.filter} for more information.
* @property {string|undefined} resultType Indicates what response should be returned, E.g. `hits` only includes the
* `numberOfFeatures` attribute in the response and no features.
*/
/** /**
* @typedef {Object} format_WFSWriteTransactionOptions * @typedef {Object} format_WFSWriteTransactionOptions
* @property {string} featureNS The namespace URI used for features. * @property {string} featureNS The namespace URI used for features.

View File

@@ -30,6 +30,31 @@ import {createElementNS, isDocument, isNode, makeArrayPusher, makeChildAppender,
*/ */
/**
* @typedef {Object} WriteGetFeatureOptions
* @property {string} featureNS The namespace URI used for features.
* @property {string} featurePrefix The prefix for the feature namespace.
* @property {Array.<string>} featureTypes The feature type names.
* @property {string|undefined} srsName SRS name. No srsName attribute will be set on
* geometries when this is not provided.
* @property {string|undefined} handle Handle.
* @property {string|undefined} outputFormat Output format.
* @property {number|undefined} maxFeatures Maximum number of features to fetch.
* @property {string|undefined} geometryName Geometry name to use in a BBOX filter.
* @property {Array.<string>|undefined} propertyNames Optional list of property names to serialize.
* @property {number|undefined} startIndex Start index to use for WFS paging. This is a
* WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services.
* @property {number|undefined} count Number of features to retrieve when paging. This is a
* WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services. Please note that some
* Web Feature Services have repurposed `maxfeatures` instead.
* @property {ol.Extent|undefined} bbox Extent to use for the BBOX filter.
* @property {ol.format.filter.Filter|undefined} filter Filter condition. See
* {@link ol.format.filter} for more information.
* @property {string|undefined} resultType Indicates what response should be returned,
* E.g. `hits` only includes the `numberOfFeatures` attribute in the response and no features.
*/
/** /**
* @type {string} * @type {string}
*/ */
@@ -890,7 +915,7 @@ function writeGetFeature(node, featureTypes, objectStack) {
/** /**
* Encode format as WFS `GetFeature` and return the Node. * Encode format as WFS `GetFeature` and return the Node.
* *
* @param {olx.format.WFSWriteGetFeatureOptions} options Options. * @param {module:ol/format/WFS~WriteGetFeatureOptions} options Options.
* @return {Node} Result. * @return {Node} Result.
* @api * @api
*/ */