Use extends and super for format/WFS

This commit is contained in:
ahocevar
2018-07-17 17:42:25 +02:00
parent 788f932550
commit 942a219c30
4 changed files with 526 additions and 553 deletions
+86 -87
View File
@@ -127,93 +127,6 @@ class GMLBase extends XMLFeature {
'featureMembers': makeReplacer(this.readFeaturesInternal)
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
this.MULTIPOINT_PARSERS_ = {
'http://www.opengis.net/gml': {
'pointMember': makeArrayPusher(this.pointMemberParser_),
'pointMembers': makeArrayPusher(this.pointMemberParser_)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
this.MULTILINESTRING_PARSERS_ = {
'http://www.opengis.net/gml': {
'lineStringMember': makeArrayPusher(this.lineStringMemberParser_),
'lineStringMembers': makeArrayPusher(this.lineStringMemberParser_)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
this.MULTIPOLYGON_PARSERS_ = {
'http://www.opengis.net/gml': {
'polygonMember': makeArrayPusher(this.polygonMemberParser_),
'polygonMembers': makeArrayPusher(this.polygonMemberParser_)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
this.POINTMEMBER_PARSERS_ = {
'http://www.opengis.net/gml': {
'Point': makeArrayPusher(this.readFlatCoordinatesFromNode_)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
this.LINESTRINGMEMBER_PARSERS_ = {
'http://www.opengis.net/gml': {
'LineString': makeArrayPusher(this.readLineString)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
this.POLYGONMEMBER_PARSERS_ = {
'http://www.opengis.net/gml': {
'Polygon': makeArrayPusher(this.readPolygon)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @protected
*/
this.RING_PARSERS = {
'http://www.opengis.net/gml': {
'LinearRing': makeReplacer(this.readFlatLinearRing_)
}
};
}
/**
@@ -556,4 +469,90 @@ class GMLBase extends XMLFeature {
}
}
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
GMLBase.prototype.MULTIPOINT_PARSERS_ = {
'http://www.opengis.net/gml': {
'pointMember': makeArrayPusher(GMLBase.prototype.pointMemberParser_),
'pointMembers': makeArrayPusher(GMLBase.prototype.pointMemberParser_)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
GMLBase.prototype.MULTILINESTRING_PARSERS_ = {
'http://www.opengis.net/gml': {
'lineStringMember': makeArrayPusher(GMLBase.prototype.lineStringMemberParser_),
'lineStringMembers': makeArrayPusher(GMLBase.prototype.lineStringMemberParser_)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
GMLBase.prototype.MULTIPOLYGON_PARSERS_ = {
'http://www.opengis.net/gml': {
'polygonMember': makeArrayPusher(GMLBase.prototype.polygonMemberParser_),
'polygonMembers': makeArrayPusher(GMLBase.prototype.polygonMemberParser_)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
GMLBase.prototype.POINTMEMBER_PARSERS_ = {
'http://www.opengis.net/gml': {
'Point': makeArrayPusher(GMLBase.prototype.readFlatCoordinatesFromNode_)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = {
'http://www.opengis.net/gml': {
'LineString': makeArrayPusher(GMLBase.prototype.readLineString)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @private
*/
GMLBase.prototype.POLYGONMEMBER_PARSERS_ = {
'http://www.opengis.net/gml': {
'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon)
}
};
/**
* @const
* @type {Object.<string, Object.<string, module:ol/xml~Parser>>}
* @protected
*/
GMLBase.prototype.RING_PARSERS = {
'http://www.opengis.net/gml': {
'LinearRing': makeReplacer(GMLBase.prototype.readFlatLinearRing_)
}
};
export default GMLBase;