diff --git a/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js b/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js index 2193c6510f..253db5c8b9 100644 --- a/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js +++ b/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js @@ -26,8 +26,8 @@ */ define([ "./TimelineTraverser", - "./TimelineCSVExporter" -], function (TimelineTraverser, TimelineCSVExporter) { + "./TimelineColumnizer" +], function (TimelineTraverser, TimelineColumnizer) { "use strict"; /** @@ -54,7 +54,7 @@ define([ var exportService = this.exportService; function doExport(objects) { - var exporter = new TimelineCSVExporter(objects), + var exporter = new TimelineColumnizer(objects), options = { headers: exporter.headers() }; return exporter.rows().then(function (rows) { return exportService.exportCSV(rows, options); diff --git a/platform/features/timeline/src/actions/TimelineCSVExporter.js b/platform/features/timeline/src/actions/TimelineColumnizer.js similarity index 96% rename from platform/features/timeline/src/actions/TimelineCSVExporter.js rename to platform/features/timeline/src/actions/TimelineColumnizer.js index edf06bec7b..3069bd8b96 100644 --- a/platform/features/timeline/src/actions/TimelineCSVExporter.js +++ b/platform/features/timeline/src/actions/TimelineColumnizer.js @@ -68,7 +68,7 @@ define([ * @constructor * @memberof {platform/features/timeline} */ - function TimelineCSVExporter(domainObjects) { + function TimelineColumnizer(domainObjects) { var maxComposition = 0, maxRelationships = 0, columnNames = {}, @@ -134,7 +134,7 @@ define([ * the `headers`, correlated by index. * @returns {Promise.} domain object data */ - TimelineCSVExporter.prototype.rows = function () { + TimelineColumnizer.prototype.rows = function () { var columns = this.columns; function toRow(domainObject) { @@ -151,11 +151,11 @@ define([ * representation of objects. * @returns {string[]} column headers */ - TimelineCSVExporter.prototype.headers = function () { + TimelineColumnizer.prototype.headers = function () { return this.columns.map(function (column) { return column.name(); }); }; - return TimelineCSVExporter; + return TimelineColumnizer; }); diff --git a/platform/features/timeline/test/actions/TimelineCSVExporterSpec.js b/platform/features/timeline/test/actions/TimelineColumnizerSpec.js similarity index 95% rename from platform/features/timeline/test/actions/TimelineCSVExporterSpec.js rename to platform/features/timeline/test/actions/TimelineColumnizerSpec.js index 4267f95a1b..9eacf4f3b3 100644 --- a/platform/features/timeline/test/actions/TimelineCSVExporterSpec.js +++ b/platform/features/timeline/test/actions/TimelineColumnizerSpec.js @@ -22,9 +22,9 @@ /*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/ define( - ['../../src/actions/TimelineCSVExporter'], - function (TimelineCSVExporter) { - describe("TimelineCSVExporter", function () { + ['../../src/actions/TimelineColumnizer'], + function (TimelineColumnizer) { + describe("TimelineColumnizer", function () { var mockDomainObjects, testMetadata, exporter; @@ -76,7 +76,7 @@ define( return c === 'metadata' && testMetadata; }); - exporter = new TimelineCSVExporter(mockDomainObjects); + exporter = new TimelineColumnizer(mockDomainObjects); }); describe("rows", function () { @@ -126,4 +126,4 @@ define( }); } -); \ No newline at end of file +);