Rename ol.format.XML to ol.format.XMLFeature

This commit is contained in:
Tom Payne
2014-02-28 13:13:11 +01:00
parent 7e32676a9e
commit 56b6913a01
4 changed files with 31 additions and 31 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ goog.require('goog.object');
goog.require('goog.string'); goog.require('goog.string');
goog.require('ol.Feature'); goog.require('ol.Feature');
goog.require('ol.extent'); goog.require('ol.extent');
goog.require('ol.format.XML'); goog.require('ol.format.XMLFeature');
goog.require('ol.geom.LineString'); goog.require('ol.geom.LineString');
goog.require('ol.geom.MultiLineString'); goog.require('ol.geom.MultiLineString');
goog.require('ol.geom.MultiPoint'); goog.require('ol.geom.MultiPoint');
@@ -24,7 +24,7 @@ goog.require('ol.xml');
* @constructor * @constructor
* @param {olx.format.GMLOptions=} opt_options * @param {olx.format.GMLOptions=} opt_options
* Optional configuration object. * Optional configuration object.
* @extends {ol.format.XML} * @extends {ol.format.XMLFeature}
* @todo stability experimental * @todo stability experimental
*/ */
ol.format.GML = function(opt_options) { ol.format.GML = function(opt_options) {
@@ -45,7 +45,7 @@ ol.format.GML = function(opt_options) {
goog.base(this); goog.base(this);
}; };
goog.inherits(ol.format.GML, ol.format.XML); goog.inherits(ol.format.GML, ol.format.XMLFeature);
/** /**
+3 -3
View File
@@ -6,7 +6,7 @@ goog.require('goog.asserts');
goog.require('goog.dom.NodeType'); goog.require('goog.dom.NodeType');
goog.require('goog.object'); goog.require('goog.object');
goog.require('ol.Feature'); goog.require('ol.Feature');
goog.require('ol.format.XML'); goog.require('ol.format.XMLFeature');
goog.require('ol.format.XSD'); goog.require('ol.format.XSD');
goog.require('ol.geom.LineString'); goog.require('ol.geom.LineString');
goog.require('ol.geom.MultiLineString'); goog.require('ol.geom.MultiLineString');
@@ -18,13 +18,13 @@ goog.require('ol.xml');
/** /**
* @constructor * @constructor
* @extends {ol.format.XML} * @extends {ol.format.XMLFeature}
* @todo stability experimental * @todo stability experimental
*/ */
ol.format.GPX = function() { ol.format.GPX = function() {
goog.base(this); goog.base(this);
}; };
goog.inherits(ol.format.GPX, ol.format.XML); goog.inherits(ol.format.GPX, ol.format.XMLFeature);
/** /**
+3 -3
View File
@@ -16,7 +16,7 @@ goog.require('goog.object');
goog.require('goog.string'); goog.require('goog.string');
goog.require('ol.Feature'); goog.require('ol.Feature');
goog.require('ol.feature'); goog.require('ol.feature');
goog.require('ol.format.XML'); goog.require('ol.format.XMLFeature');
goog.require('ol.format.XSD'); goog.require('ol.format.XSD');
goog.require('ol.geom.GeometryCollection'); goog.require('ol.geom.GeometryCollection');
goog.require('ol.geom.GeometryType'); goog.require('ol.geom.GeometryType');
@@ -60,7 +60,7 @@ ol.format.KMLGxTrackObject_;
/** /**
* @constructor * @constructor
* @extends {ol.format.XML} * @extends {ol.format.XMLFeature}
* @param {olx.format.KMLOptions=} opt_options Options. * @param {olx.format.KMLOptions=} opt_options Options.
* @todo stability experimental * @todo stability experimental
*/ */
@@ -130,7 +130,7 @@ ol.format.KML = function(opt_options) {
}; };
}; };
goog.inherits(ol.format.KML, ol.format.XML); goog.inherits(ol.format.KML, ol.format.XMLFeature);
/** /**
@@ -1,4 +1,4 @@
goog.provide('ol.format.XML'); goog.provide('ol.format.XMLFeature');
goog.require('goog.array'); goog.require('goog.array');
goog.require('goog.asserts'); goog.require('goog.asserts');
@@ -13,16 +13,16 @@ goog.require('ol.xml');
* @constructor * @constructor
* @extends {ol.format.Feature} * @extends {ol.format.Feature}
*/ */
ol.format.XML = function() { ol.format.XMLFeature = function() {
goog.base(this); goog.base(this);
}; };
goog.inherits(ol.format.XML, ol.format.Feature); goog.inherits(ol.format.XMLFeature, ol.format.Feature);
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.XML.prototype.getType = function() { ol.format.XMLFeature.prototype.getType = function() {
return ol.format.FormatType.XML; return ol.format.FormatType.XML;
}; };
@@ -30,7 +30,7 @@ ol.format.XML.prototype.getType = function() {
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.XML.prototype.readFeature = function(source) { ol.format.XMLFeature.prototype.readFeature = function(source) {
if (ol.xml.isDocument(source)) { if (ol.xml.isDocument(source)) {
return this.readFeatureFromDocument(/** @type {Document} */ (source)); return this.readFeatureFromDocument(/** @type {Document} */ (source));
} else if (ol.xml.isNode(source)) { } else if (ol.xml.isNode(source)) {
@@ -49,7 +49,7 @@ ol.format.XML.prototype.readFeature = function(source) {
* @param {Document} doc Document. * @param {Document} doc Document.
* @return {ol.Feature} Feature. * @return {ol.Feature} Feature.
*/ */
ol.format.XML.prototype.readFeatureFromDocument = function(doc) { ol.format.XMLFeature.prototype.readFeatureFromDocument = function(doc) {
var features = this.readFeaturesFromDocument(doc); var features = this.readFeaturesFromDocument(doc);
if (features.length > 0) { if (features.length > 0) {
return features[0]; return features[0];
@@ -63,13 +63,13 @@ ol.format.XML.prototype.readFeatureFromDocument = function(doc) {
* @param {Node} node Node. * @param {Node} node Node.
* @return {ol.Feature} Feature. * @return {ol.Feature} Feature.
*/ */
ol.format.XML.prototype.readFeatureFromNode = goog.abstractMethod; ol.format.XMLFeature.prototype.readFeatureFromNode = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.XML.prototype.readFeatures = function(source) { ol.format.XMLFeature.prototype.readFeatures = function(source) {
if (ol.xml.isDocument(source)) { if (ol.xml.isDocument(source)) {
return this.readFeaturesFromDocument(/** @type {Document} */ (source)); return this.readFeaturesFromDocument(/** @type {Document} */ (source));
} else if (ol.xml.isNode(source)) { } else if (ol.xml.isNode(source)) {
@@ -89,7 +89,7 @@ ol.format.XML.prototype.readFeatures = function(source) {
* @protected * @protected
* @return {Array.<ol.Feature>} Features. * @return {Array.<ol.Feature>} Features.
*/ */
ol.format.XML.prototype.readFeaturesFromDocument = function(doc) { ol.format.XMLFeature.prototype.readFeaturesFromDocument = function(doc) {
/** @type {Array.<ol.Feature>} */ /** @type {Array.<ol.Feature>} */
var features = []; var features = [];
var n; var n;
@@ -107,13 +107,13 @@ ol.format.XML.prototype.readFeaturesFromDocument = function(doc) {
* @protected * @protected
* @return {Array.<ol.Feature>} Features. * @return {Array.<ol.Feature>} Features.
*/ */
ol.format.XML.prototype.readFeaturesFromNode = goog.abstractMethod; ol.format.XMLFeature.prototype.readFeaturesFromNode = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.XML.prototype.readGeometry = function(source) { ol.format.XMLFeature.prototype.readGeometry = function(source) {
if (ol.xml.isDocument(source)) { if (ol.xml.isDocument(source)) {
return this.readGeometryFromDocument(/** @type {Document} */ (source)); return this.readGeometryFromDocument(/** @type {Document} */ (source));
} else if (ol.xml.isNode(source)) { } else if (ol.xml.isNode(source)) {
@@ -133,7 +133,7 @@ ol.format.XML.prototype.readGeometry = function(source) {
* @protected * @protected
* @return {ol.geom.Geometry} Geometry. * @return {ol.geom.Geometry} Geometry.
*/ */
ol.format.XML.prototype.readGeometryFromDocument = goog.abstractMethod; ol.format.XMLFeature.prototype.readGeometryFromDocument = goog.abstractMethod;
/** /**
@@ -141,13 +141,13 @@ ol.format.XML.prototype.readGeometryFromDocument = goog.abstractMethod;
* @protected * @protected
* @return {ol.geom.Geometry} Geometry. * @return {ol.geom.Geometry} Geometry.
*/ */
ol.format.XML.prototype.readGeometryFromNode = goog.abstractMethod; ol.format.XMLFeature.prototype.readGeometryFromNode = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.XML.prototype.readProjection = function(source) { ol.format.XMLFeature.prototype.readProjection = function(source) {
if (ol.xml.isDocument(source)) { if (ol.xml.isDocument(source)) {
return this.readProjectionFromDocument(/** @type {Document} */ (source)); return this.readProjectionFromDocument(/** @type {Document} */ (source));
} else if (ol.xml.isNode(source)) { } else if (ol.xml.isNode(source)) {
@@ -167,7 +167,7 @@ ol.format.XML.prototype.readProjection = function(source) {
* @protected * @protected
* @return {ol.proj.Projection} Projection. * @return {ol.proj.Projection} Projection.
*/ */
ol.format.XML.prototype.readProjectionFromDocument = goog.abstractMethod; ol.format.XMLFeature.prototype.readProjectionFromDocument = goog.abstractMethod;
/** /**
@@ -175,13 +175,13 @@ ol.format.XML.prototype.readProjectionFromDocument = goog.abstractMethod;
* @protected * @protected
* @return {ol.proj.Projection} Projection. * @return {ol.proj.Projection} Projection.
*/ */
ol.format.XML.prototype.readProjectionFromNode = goog.abstractMethod; ol.format.XMLFeature.prototype.readProjectionFromNode = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.XML.prototype.writeFeature = function(feature) { ol.format.XMLFeature.prototype.writeFeature = function(feature) {
return this.writeFeatureNode(feature); return this.writeFeatureNode(feature);
}; };
@@ -191,13 +191,13 @@ ol.format.XML.prototype.writeFeature = function(feature) {
* @protected * @protected
* @return {Node} Node. * @return {Node} Node.
*/ */
ol.format.XML.prototype.writeFeatureNode = goog.abstractMethod; ol.format.XMLFeature.prototype.writeFeatureNode = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.XML.prototype.writeFeatures = function(features) { ol.format.XMLFeature.prototype.writeFeatures = function(features) {
return this.writeFeaturesNode(features); return this.writeFeaturesNode(features);
}; };
@@ -207,13 +207,13 @@ ol.format.XML.prototype.writeFeatures = function(features) {
* @protected * @protected
* @return {Node} Node. * @return {Node} Node.
*/ */
ol.format.XML.prototype.writeFeaturesNode = goog.abstractMethod; ol.format.XMLFeature.prototype.writeFeaturesNode = goog.abstractMethod;
/** /**
* @inheritDoc * @inheritDoc
*/ */
ol.format.XML.prototype.writeGeometry = function(geometry) { ol.format.XMLFeature.prototype.writeGeometry = function(geometry) {
return this.writeGeometryNode(geometry); return this.writeGeometryNode(geometry);
}; };
@@ -223,4 +223,4 @@ ol.format.XML.prototype.writeGeometry = function(geometry) {
* @protected * @protected
* @return {Node} Node. * @return {Node} Node.
*/ */
ol.format.XML.prototype.writeGeometryNode = goog.abstractMethod; ol.format.XMLFeature.prototype.writeGeometryNode = goog.abstractMethod;