C_QanLogDoc.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /****************************************************************************************************************************
  2. Licensed Materials - Property of IBM
  3. BI and PM: QFW
  4. © Copyright IBM Corp. 2005, 2010
  5. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6. *****************************************************************************************************************************/
  7. function C_QanLogDoc( sLogText )
  8. {
  9. this.m_sLogText = sLogText;
  10. }
  11. C_QanLogDoc.prototype.F_SetId = function(iId)
  12. {
  13. this.m_iId = iId;
  14. }
  15. C_QanLogDoc.prototype.F_GetId = function()
  16. {
  17. return this.m_iId;
  18. }
  19. C_QanLogDoc.prototype.F_GetHtmlId = function()
  20. {
  21. return "log" + this.m_iId;
  22. }
  23. C_QanLogDoc.prototype.F_Init = function()
  24. {
  25. this.m_docXML = U_XML.F_LoadString( D_XmlError, this.m_sLogText );
  26. this.m_sLogText = ""; // release the string
  27. }
  28. C_QanLogDoc.prototype.F_GetAsXMLDoc = function()
  29. {
  30. return this.m_docXML;
  31. }
  32. C_QanLogDoc.prototype.F_GetAsString = function()
  33. {
  34. if( this.m_docXML )
  35. return this.m_docXML.xml;
  36. return this.m_sLogText;
  37. }
  38. C_QanLogDoc.prototype.F_GetRootQRDNames = function()
  39. {
  40. var v_nlQRDs = this.F_GetAsXMLDoc().selectNodes( "./QFSScript/QFSSession[@method='DoRequest' or @method='DoRequest1' or @method='DoRequest2']/parm[@type='input']/*/*[querySet]/retrieveDataset" );
  41. if( v_nlQRDs.length == 0 )
  42. return "";
  43. var v_sQRDNames = v_nlQRDs[0].getAttribute("value");
  44. for( var i = 1; i < v_nlQRDs.length; ++i )
  45. {
  46. v_sQRDNames += ", " + v_nlQRDs[0].getAttribute("value");
  47. }
  48. return v_sQRDNames;
  49. }