Rename ol.format.Binary to ol.format.BinaryFeature

This commit is contained in:
Tom Payne
2014-02-28 13:07:49 +01:00
parent ea8944c755
commit 8ad4b292b7
@@ -1,4 +1,4 @@
goog.provide('ol.format.Binary'); goog.provide('ol.format.BinaryFeature');
goog.require('goog.asserts'); goog.require('goog.asserts');
goog.require('ol.BrowserFeature'); goog.require('ol.BrowserFeature');
@@ -13,10 +13,10 @@ goog.require('ol.proj');
* @constructor * @constructor
* @extends {ol.format.Feature} * @extends {ol.format.Feature}
*/ */
ol.format.Binary = function() { ol.format.BinaryFeature = function() {
goog.base(this); goog.base(this);
}; };
goog.inherits(ol.format.Binary, ol.format.Feature); goog.inherits(ol.format.BinaryFeature, ol.format.Feature);
/** /**
@@ -24,7 +24,7 @@ goog.inherits(ol.format.Binary, ol.format.Feature);
* @private * @private
* @return {ol.binary.Buffer} Buffer. * @return {ol.binary.Buffer} Buffer.
*/ */
ol.format.Binary.getBuffer_ = function(source) { ol.format.BinaryFeature.getBuffer_ = function(source) {
if (ol.BrowserFeature.HAS_ARRAY_BUFFER && source instanceof ArrayBuffer) { if (ol.BrowserFeature.HAS_ARRAY_BUFFER && source instanceof ArrayBuffer) {
return new ol.binary.Buffer(source); return new ol.binary.Buffer(source);
} else if (goog.isString(source)) { } else if (goog.isString(source)) {
@@ -39,7 +39,7 @@ ol.format.Binary.getBuffer_ = function(source) {
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.Binary.prototype.getType = function() { ol.format.BinaryFeature.prototype.getType = function() {
return ol.format.FormatType.BINARY; return ol.format.FormatType.BINARY;
}; };
@@ -47,16 +47,17 @@ ol.format.Binary.prototype.getType = function() {
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.Binary.prototype.readFeature = function(source) { ol.format.BinaryFeature.prototype.readFeature = function(source) {
return this.readFeatureFromBuffer(ol.format.Binary.getBuffer_(source)); return this.readFeatureFromBuffer(ol.format.BinaryFeature.getBuffer_(source));
}; };
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.Binary.prototype.readFeatures = function(source) { ol.format.BinaryFeature.prototype.readFeatures = function(source) {
return this.readFeaturesFromBuffer(ol.format.Binary.getBuffer_(source)); return this.readFeaturesFromBuffer(
ol.format.BinaryFeature.getBuffer_(source));
}; };
@@ -65,7 +66,7 @@ ol.format.Binary.prototype.readFeatures = function(source) {
* @protected * @protected
* @return {ol.Feature} Feature. * @return {ol.Feature} Feature.
*/ */
ol.format.Binary.prototype.readFeatureFromBuffer = goog.abstractMethod; ol.format.BinaryFeature.prototype.readFeatureFromBuffer = goog.abstractMethod;
/** /**
@@ -73,14 +74,15 @@ ol.format.Binary.prototype.readFeatureFromBuffer = goog.abstractMethod;
* @protected * @protected
* @return {Array.<ol.Feature>} Feature. * @return {Array.<ol.Feature>} Feature.
*/ */
ol.format.Binary.prototype.readFeaturesFromBuffer = goog.abstractMethod; ol.format.BinaryFeature.prototype.readFeaturesFromBuffer = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.Binary.prototype.readGeometry = function(source) { ol.format.BinaryFeature.prototype.readGeometry = function(source) {
return this.readGeometryFromBuffer(ol.format.Binary.getBuffer_(source)); return this.readGeometryFromBuffer(
ol.format.BinaryFeature.getBuffer_(source));
}; };
@@ -89,14 +91,15 @@ ol.format.Binary.prototype.readGeometry = function(source) {
* @protected * @protected
* @return {ol.geom.Geometry} Geometry. * @return {ol.geom.Geometry} Geometry.
*/ */
ol.format.Binary.prototype.readGeometryFromBuffer = goog.abstractMethod; ol.format.BinaryFeature.prototype.readGeometryFromBuffer = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.Binary.prototype.readProjection = function(source) { ol.format.BinaryFeature.prototype.readProjection = function(source) {
return this.readProjectionFromBuffer(ol.format.Binary.getBuffer_(source)); return this.readProjectionFromBuffer(
ol.format.BinaryFeature.getBuffer_(source));
}; };
@@ -104,4 +107,5 @@ ol.format.Binary.prototype.readProjection = function(source) {
* @param {ol.binary.Buffer} buffer Buffer. * @param {ol.binary.Buffer} buffer Buffer.
* @return {ol.proj.Projection} Projection. * @return {ol.proj.Projection} Projection.
*/ */
ol.format.Binary.prototype.readProjectionFromBuffer = goog.abstractMethod; ol.format.BinaryFeature.prototype.readProjectionFromBuffer =
goog.abstractMethod;