Merge pull request #5614 from probins/abstract

Replace goog.abstractMethod
This commit is contained in:
Andreas Hocevar
2016-07-19 19:52:53 +02:00
committed by GitHub
21 changed files with 176 additions and 101 deletions

View File

@@ -28,9 +28,10 @@ ol.format.Feature = function() {
/**
* @abstract
* @return {Array.<string>} Extensions.
*/
ol.format.Feature.prototype.getExtensions = goog.abstractMethod;
ol.format.Feature.prototype.getExtensions = function() {};
/**
@@ -80,78 +81,86 @@ ol.format.Feature.prototype.adaptOptions = function(options) {
/**
* @abstract
* @return {ol.format.FormatType} Format.
*/
ol.format.Feature.prototype.getType = goog.abstractMethod;
ol.format.Feature.prototype.getType = function() {};
/**
* Read a single feature from a source.
*
* @abstract
* @param {Document|Node|Object|string} source Source.
* @param {olx.format.ReadOptions=} opt_options Read options.
* @return {ol.Feature} Feature.
*/
ol.format.Feature.prototype.readFeature = goog.abstractMethod;
ol.format.Feature.prototype.readFeature = function(source, opt_options) {};
/**
* Read all features from a source.
*
* @abstract
* @param {Document|Node|ArrayBuffer|Object|string} source Source.
* @param {olx.format.ReadOptions=} opt_options Read options.
* @return {Array.<ol.Feature>} Features.
*/
ol.format.Feature.prototype.readFeatures = goog.abstractMethod;
ol.format.Feature.prototype.readFeatures = function(source, opt_options) {};
/**
* Read a single geometry from a source.
*
* @abstract
* @param {Document|Node|Object|string} source Source.
* @param {olx.format.ReadOptions=} opt_options Read options.
* @return {ol.geom.Geometry} Geometry.
*/
ol.format.Feature.prototype.readGeometry = goog.abstractMethod;
ol.format.Feature.prototype.readGeometry = function(source, opt_options) {};
/**
* Read the projection from a source.
*
* @abstract
* @param {Document|Node|Object|string} source Source.
* @return {ol.proj.Projection} Projection.
*/
ol.format.Feature.prototype.readProjection = goog.abstractMethod;
ol.format.Feature.prototype.readProjection = function(source) {};
/**
* Encode a feature in this format.
*
* @abstract
* @param {ol.Feature} feature Feature.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @return {string} Result.
*/
ol.format.Feature.prototype.writeFeature = goog.abstractMethod;
ol.format.Feature.prototype.writeFeature = function(feature, opt_options) {};
/**
* Encode an array of features in this format.
*
* @abstract
* @param {Array.<ol.Feature>} features Features.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @return {string} Result.
*/
ol.format.Feature.prototype.writeFeatures = goog.abstractMethod;
ol.format.Feature.prototype.writeFeatures = function(features, opt_options) {};
/**
* Write a single geometry in this format.
*
* @abstract
* @param {ol.geom.Geometry} geometry Geometry.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @return {string} Result.
*/
ol.format.Feature.prototype.writeGeometry = goog.abstractMethod;
ol.format.Feature.prototype.writeGeometry = function(geometry, opt_options) {};
/**

View File

@@ -65,21 +65,23 @@ ol.format.JSONFeature.prototype.readFeatures = function(source, opt_options) {
/**
* @abstract
* @param {Object} object Object.
* @param {olx.format.ReadOptions=} opt_options Read options.
* @protected
* @return {ol.Feature} Feature.
*/
ol.format.JSONFeature.prototype.readFeatureFromObject = goog.abstractMethod;
ol.format.JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
/**
* @abstract
* @param {Object} object Object.
* @param {olx.format.ReadOptions=} opt_options Read options.
* @protected
* @return {Array.<ol.Feature>} Features.
*/
ol.format.JSONFeature.prototype.readFeaturesFromObject = goog.abstractMethod;
ol.format.JSONFeature.prototype.readFeaturesFromObject = function(object, opt_options) {};
/**
@@ -92,12 +94,13 @@ ol.format.JSONFeature.prototype.readGeometry = function(source, opt_options) {
/**
* @abstract
* @param {Object} object Object.
* @param {olx.format.ReadOptions=} opt_options Read options.
* @protected
* @return {ol.geom.Geometry} Geometry.
*/
ol.format.JSONFeature.prototype.readGeometryFromObject = goog.abstractMethod;
ol.format.JSONFeature.prototype.readGeometryFromObject = function(object, opt_options) {};
/**
@@ -109,11 +112,12 @@ ol.format.JSONFeature.prototype.readProjection = function(source) {
/**
* @abstract
* @param {Object} object Object.
* @protected
* @return {ol.proj.Projection} Projection.
*/
ol.format.JSONFeature.prototype.readProjectionFromObject = goog.abstractMethod;
ol.format.JSONFeature.prototype.readProjectionFromObject = function(object) {};
/**
@@ -125,11 +129,12 @@ ol.format.JSONFeature.prototype.writeFeature = function(feature, opt_options) {
/**
* @abstract
* @param {ol.Feature} feature Feature.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @return {Object} Object.
*/
ol.format.JSONFeature.prototype.writeFeatureObject = goog.abstractMethod;
ol.format.JSONFeature.prototype.writeFeatureObject = function(feature, opt_options) {};
/**
@@ -141,11 +146,12 @@ ol.format.JSONFeature.prototype.writeFeatures = function(features, opt_options)
/**
* @abstract
* @param {Array.<ol.Feature>} features Features.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @return {Object} Object.
*/
ol.format.JSONFeature.prototype.writeFeaturesObject = goog.abstractMethod;
ol.format.JSONFeature.prototype.writeFeaturesObject = function(features, opt_options) {};
/**
@@ -157,8 +163,9 @@ ol.format.JSONFeature.prototype.writeGeometry = function(geometry, opt_options)
/**
* @abstract
* @param {ol.geom.Geometry} geometry Geometry.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @return {Object} Object.
*/
ol.format.JSONFeature.prototype.writeGeometryObject = goog.abstractMethod;
ol.format.JSONFeature.prototype.writeGeometryObject = function(geometry, opt_options) {};

View File

@@ -53,12 +53,13 @@ ol.format.TextFeature.prototype.readFeature = function(source, opt_options) {
/**
* @abstract
* @param {string} text Text.
* @param {olx.format.ReadOptions=} opt_options Read options.
* @protected
* @return {ol.Feature} Feature.
*/
ol.format.TextFeature.prototype.readFeatureFromText = goog.abstractMethod;
ol.format.TextFeature.prototype.readFeatureFromText = function(text, opt_options) {};
/**
@@ -71,12 +72,13 @@ ol.format.TextFeature.prototype.readFeatures = function(source, opt_options) {
/**
* @abstract
* @param {string} text Text.
* @param {olx.format.ReadOptions=} opt_options Read options.
* @protected
* @return {Array.<ol.Feature>} Features.
*/
ol.format.TextFeature.prototype.readFeaturesFromText = goog.abstractMethod;
ol.format.TextFeature.prototype.readFeaturesFromText = function(text, opt_options) {};
/**
@@ -89,12 +91,13 @@ ol.format.TextFeature.prototype.readGeometry = function(source, opt_options) {
/**
* @abstract
* @param {string} text Text.
* @param {olx.format.ReadOptions=} opt_options Read options.
* @protected
* @return {ol.geom.Geometry} Geometry.
*/
ol.format.TextFeature.prototype.readGeometryFromText = goog.abstractMethod;
ol.format.TextFeature.prototype.readGeometryFromText = function(text, opt_options) {};
/**
@@ -124,12 +127,13 @@ ol.format.TextFeature.prototype.writeFeature = function(feature, opt_options) {
/**
* @abstract
* @param {ol.Feature} feature Features.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @protected
* @return {string} Text.
*/
ol.format.TextFeature.prototype.writeFeatureText = goog.abstractMethod;
ol.format.TextFeature.prototype.writeFeatureText = function(feature, opt_options) {};
/**
@@ -142,12 +146,13 @@ ol.format.TextFeature.prototype.writeFeatures = function(
/**
* @abstract
* @param {Array.<ol.Feature>} features Features.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @protected
* @return {string} Text.
*/
ol.format.TextFeature.prototype.writeFeaturesText = goog.abstractMethod;
ol.format.TextFeature.prototype.writeFeaturesText = function(features, opt_options) {};
/**
@@ -160,9 +165,10 @@ ol.format.TextFeature.prototype.writeGeometry = function(
/**
* @abstract
* @param {ol.geom.Geometry} geometry Geometry.
* @param {olx.format.WriteOptions=} opt_options Write options.
* @protected
* @return {string} Text.
*/
ol.format.TextFeature.prototype.writeGeometryText = goog.abstractMethod;
ol.format.TextFeature.prototype.writeGeometryText = function(geometry, opt_options) {};

View File

@@ -74,11 +74,12 @@ ol.format.XMLFeature.prototype.readFeatureFromDocument = function(
/**
* @abstract
* @param {Node} node Node.
* @param {olx.format.ReadOptions=} opt_options Options.
* @return {ol.Feature} Feature.
*/
ol.format.XMLFeature.prototype.readFeatureFromNode = goog.abstractMethod;
ol.format.XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) {};
/**
@@ -121,12 +122,13 @@ ol.format.XMLFeature.prototype.readFeaturesFromDocument = function(
/**
* @abstract
* @param {Node} node Node.
* @param {olx.format.ReadOptions=} opt_options Options.
* @protected
* @return {Array.<ol.Feature>} Features.
*/
ol.format.XMLFeature.prototype.readFeaturesFromNode = goog.abstractMethod;
ol.format.XMLFeature.prototype.readFeaturesFromNode = function(node, opt_options) {};
/**
@@ -149,21 +151,23 @@ ol.format.XMLFeature.prototype.readGeometry = function(source, opt_options) {
/**
* @abstract
* @param {Document} doc Document.
* @param {olx.format.ReadOptions=} opt_options Options.
* @protected
* @return {ol.geom.Geometry} Geometry.
*/
ol.format.XMLFeature.prototype.readGeometryFromDocument = goog.abstractMethod;
ol.format.XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {};
/**
* @abstract
* @param {Node} node Node.
* @param {olx.format.ReadOptions=} opt_options Options.
* @protected
* @return {ol.geom.Geometry} Geometry.
*/
ol.format.XMLFeature.prototype.readGeometryFromNode = goog.abstractMethod;
ol.format.XMLFeature.prototype.readGeometryFromNode = function(node, opt_options) {};
/**
@@ -216,12 +220,13 @@ ol.format.XMLFeature.prototype.writeFeature = function(feature, opt_options) {
/**
* @abstract
* @param {ol.Feature} feature Feature.
* @param {olx.format.WriteOptions=} opt_options Options.
* @protected
* @return {Node} Node.
*/
ol.format.XMLFeature.prototype.writeFeatureNode = goog.abstractMethod;
ol.format.XMLFeature.prototype.writeFeatureNode = function(feature, opt_options) {};
/**
@@ -236,11 +241,12 @@ ol.format.XMLFeature.prototype.writeFeatures = function(features, opt_options) {
/**
* @abstract
* @param {Array.<ol.Feature>} features Features.
* @param {olx.format.WriteOptions=} opt_options Options.
* @return {Node} Node.
*/
ol.format.XMLFeature.prototype.writeFeaturesNode = goog.abstractMethod;
ol.format.XMLFeature.prototype.writeFeaturesNode = function(features, opt_options) {};
/**
@@ -255,8 +261,9 @@ ol.format.XMLFeature.prototype.writeGeometry = function(geometry, opt_options) {
/**
* @abstract
* @param {ol.geom.Geometry} geometry Geometry.
* @param {olx.format.WriteOptions=} opt_options Options.
* @return {Node} Node.
*/
ol.format.XMLFeature.prototype.writeGeometryNode = goog.abstractMethod;
ol.format.XMLFeature.prototype.writeGeometryNode = function(geometry, opt_options) {};

View File

@@ -35,14 +35,16 @@ ol.format.XML.prototype.read = function(source) {
/**
* @abstract
* @param {Document} doc Document.
* @return {Object}
* @return {Object} Object
*/
ol.format.XML.prototype.readFromDocument = goog.abstractMethod;
ol.format.XML.prototype.readFromDocument = function(doc) {};
/**
* @abstract
* @param {Node} node Node.
* @return {Object}
* @return {Object} Object
*/
ol.format.XML.prototype.readFromNode = goog.abstractMethod;
ol.format.XML.prototype.readFromNode = function(node) {};