123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- 'use strict';
- /*
- *+------------------------------------------------------------------------+
- *| Licensed Materials - Property of IBM
- *| IBM Cognos Products: BI Dashboard
- *| (C) Copyright IBM Corp. 2018
- *|
- *| US Government Users Restricted Rights - Use, duplication or disclosure
- *| restricted by GSA ADP Schedule Contract with IBM Corp.
- *+------------------------------------------------------------------------+
- */
- /**
- * This Class encapsulates result object which contains the
- * 1. Annotated result data returned from annotation execution service
- * 2. Annotation status (error/warning/message) including the overall predict title
- **/
- define(['./QueryResultObject'], function (BaseClass) {
- 'use strict';
- var QueryResultObject = BaseClass.extend({
- _predictStatus: null,
- _predictDeco: null,
- init: function init(renderContext, resultData) {
- QueryResultObject.inherited('init', this, [renderContext]);
- this._predictStatus = resultData.predictStatus;
- this._predictDeco = resultData.deco;
- this._predictResults = resultData.predictResults;
- },
- getStatus: function getStatus() {
- return this._predictStatus ? this._predictStatus.state : null;
- },
- getErrors: function getErrors() {
- return this._predictStatus ? this._predictStatus.errors : null;
- },
- getWarnings: function getWarnings() {
- return this._predictStatus ? this._predictStatus.warnings : null;
- },
- getMessages: function getMessages() {
- return this._predictStatus ? this._predictStatus.messages : null;
- },
- getPredictTitle: function getPredictTitle() {
- return this._predictStatus ? this._predictStatus.title : null;
- },
- getStatisticalDetails: function getStatisticalDetails() {
- return this._predictResults && this._predictResults.statisticalDetails || [];
- },
- isDataReordered: function isDataReordered() {
- return this._predictStatus && this._predictStatus.reordered;
- }
- });
- return QueryResultObject;
- });
- //# sourceMappingURL=QueryResultAnnotatedObject.js.map
|