BoundRangeParmValueItem.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. "use strict";
  2. /**
  3. * Licensed Materials - Property of IBM
  4. * IBM Cognos Products: Cognos Analytics
  5. * Copyright IBM Corp. 2015, 2017
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. define(['bi/admin/common/utils/parameters/SimpleParmValueItem'], function (SimpleParmValueItem) {
  9. function BoundRangeParmValueItem() {
  10. //NOSONAR
  11. this._inclusive = true;
  12. this._start = new SimpleParmValueItem();
  13. this._end = new SimpleParmValueItem();
  14. }
  15. BoundRangeParmValueItem.prototype.fromJSON = function (json) {
  16. if (json.inclusive) {
  17. this._inclusive = json.inclusive;
  18. }
  19. if (json.start) {
  20. this._start.fromJSON(json.start);
  21. }
  22. if (json.end) {
  23. this._end.fromJSON(json.end);
  24. }
  25. };
  26. BoundRangeParmValueItem.prototype.toXML = function (nodeName) {
  27. var boundRangeParmValueItem = '<' + nodeName + ' xsi:type="bus:boundRangeParmValueItem">' + '<inclusive xsi:type="xsd:boolean">' + this._inclusive + '</inclusive>' + this._start.toXML('start') + this._end.toXML('end') + '</' + nodeName + '>';
  28. return boundRangeParmValueItem;
  29. };
  30. return BoundRangeParmValueItem;
  31. });