UnboundedEndRangeParmValueItem.js 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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 UnboundedEndRangeParmValueItem() {
  10. //NOSONAR
  11. this._inclusive = true;
  12. this._start = new SimpleParmValueItem();
  13. }
  14. UnboundedEndRangeParmValueItem.prototype.fromJSON = function (json) {
  15. if (json.inclusive) {
  16. this._inclusive = json.inclusive;
  17. }
  18. if (json.start) {
  19. this._start.fromJSON(json.start);
  20. }
  21. };
  22. UnboundedEndRangeParmValueItem.prototype.toXML = function (nodeName) {
  23. var unboundedEndRangeParmValueItem = '<' + nodeName + ' xsi:type="bus:unboundedEndRangeParmValueItem">' + '<inclusive xsi:type="xsd:boolean">' + this._inclusive + '</inclusive>' + this._start.toXML('start') + '</' + nodeName + '>';
  24. return unboundedEndRangeParmValueItem;
  25. };
  26. return UnboundedEndRangeParmValueItem;
  27. });