'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| IBM Cognos Products: BI Dashboard *| (C) Copyright IBM Corp. 2019 *| *| US Government Users Restricted Rights - Use, duplication or disclosure *| restricted by GSA ADP Schedule Contract with IBM Corp. *+------------------------------------------------------------------------+ */ define([], function () { /** * This Class does Query result response post-processing such as processing the original query result * into a data structure that is required by GeoInfo, Data for small multiples visualization etc. **/ var QueryPostProcessor = function () { /* * @Constructor * @param {Object} options * options.queryResultData QueryResultData object that is to be processed */ function QueryPostProcessor(options) { _classCallCheck(this, QueryPostProcessor); /* Process Information, such as now of clipped data rows */ this._processInfo = null; this._queryResultData = options.queryResultData; } QueryPostProcessor.prototype.destroy = function destroy() { for (var prop in this) { // clear everything referenced by this object in case someone is still holding on to it. if (Object.prototype.hasOwnProperty.call(this, prop) && this[prop]) { delete this[prop]; } } }; /** *@return {QueryResultData} * *To be overridden by child class **/ QueryPostProcessor.prototype._processData = function _processData() { this._setProcessInfo(null); /*Set process info depending on the process*/ return this._queryResultData; /*processed data*/ }; QueryPostProcessor.prototype._getProcessInfo = function _getProcessInfo() { return this._processInfo; }; QueryPostProcessor.prototype._setProcessInfo = function _setProcessInfo(info) { this._processInfo = info; }; QueryPostProcessor.prototype.processData = function processData() { return { 'result': this._processData(), 'info': this._getProcessInfo() }; }; return QueryPostProcessor; }(); return QueryPostProcessor; }); //# sourceMappingURL=QueryPostProcessor.js.map