123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- 'use strict';
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * Licensed Materials - Property of IBM
- * IBM Watson Analytics (C) Copyright IBM Corp. 2018
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- *
- */
- define([], function () {
- var ConverterInterface = function () {
- function ConverterInterface(definition) {
- _classCallCheck(this, ConverterInterface);
- if (definition == undefined || !definition.src || !definition.target) {
- throw new Error('ConverterInterface constructor expects object of type {src: "...", target: "..."} for configuration');
- }
- this._src = definition.src;
- this._target = definition.target;
- }
- _createClass(ConverterInterface, [{
- key: 'convert',
- value: function convert() /* src, target, spec */{
- // Needs to be implemented by provider in client
- return Promise.resolve();
- }
- }, {
- key: 'validate',
- value: function validate() /* spec, type */{
- // Needs to be implemented by provider in client
- return true;
- }
- }, {
- key: 'src',
- get: function get() {
- return this._src;
- }
- }, {
- key: 'target',
- get: function get() {
- return this._target;
- }
- }]);
- return ConverterInterface;
- }();
- return ConverterInterface;
- });
- //# sourceMappingURL=ConverterInterface.js.map
|