java파일에 주석달기Ver2.xrw 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  3. <xhtml:head>
  4. <xhtml:title>Untitle</xhtml:title>
  5. <model id="model1">
  6. <instance id="instance1">
  7. <root xmlns="">
  8. <source>
  9. <source/>
  10. </source>
  11. <destination>
  12. <destination/>
  13. </destination>
  14. </root>
  15. </instance>
  16. <script type="javascript">
  17. <![CDATA[
  18. //Replace
  19. function fReplace(strStep1, strDelete)
  20. {
  21. var t1, t2;
  22. var flag1 = 0;
  23. var flag2 = 0;
  24. t1=strStep1.replace(strDelete, "");
  25. for (var i=0;i<=900;i++){
  26. if ((i%2)== 0){
  27. t2=t1.replace(strDelete, "");
  28. flag1 = 0;
  29. flag2 = 1;
  30. }else{
  31. t1=t2.replace(strDelete, "");
  32. flag1 = 1;
  33. flag2 = 0;
  34. }
  35. }
  36. if (flag1==1){return t1;}
  37. if (flag2==1){return t2;}
  38. }
  39. ]]>
  40. </script>
  41. </model>
  42. </xhtml:head>
  43. <xhtml:body>
  44. <button id="button1" style="left:25px; top:480px; width:110px; height:40px; ">
  45. <caption>실행</caption>
  46. <script type="javascript" ev:event="onclick">
  47. <![CDATA[
  48. var xmlArray, temp, strSource, strStep1;
  49. var xmlTypeArr, strXmlType;
  50. temp=model.getValue("/root/source/source");
  51. xmlTypeArr=temp.split("submit id=");
  52. temp=fReplace(xmlTypeArr[1], '"');
  53. strXmlType=temp.substr(0, 2);
  54. temp=model.getValue("/root/source/source");
  55. strSource=temp.replace('\"', '');
  56. xmlArray=strSource.split("--");
  57. strStep1 = "/** \n";
  58. strStep1 = strStep1 + " * <p>"+xmlArray[1]+"</p>\n";
  59. strStep1 = strStep1 + " * "+xmlArray[1]+"\n";
  60. strStep1 = strStep1 + " * \n";
  61. strStep1 = strStep1 + " * @param pVOs ValueObjectAssembler\n";
  62. var strSource=model.getValue("/root/source/source");
  63. var xmlArray=strSource.split("table id=");
  64. var xmlArray2 = xmlArray[1].split("count_ref");
  65. strStep1 = strStep1 + " * <p>"+xmlArray2[0]+" : 입력데이터\n";
  66. strStep1 = strStep1 + " * <ul>\n";
  67. var xmlArray=xmlArray2[1];
  68. var xmlArray2=xmlArray.split("column id=");
  69. for (var i=1;i<xmlArray2.length;i++){
  70. xmlArray = xmlArray2[i].split("desc=");
  71. var temp = xmlArray[1].split("ref=");
  72. strStep1 = strStep1 + " * <li>"+xmlArray[0]+" "+temp[0]+"\n";
  73. }
  74. strStep1 = strStep1 + " * </ul>\n";
  75. if ((strXmlType=="TR") || (strXmlType=="tr")){
  76. strStep1 = strStep1 + " * @return ValueObjectAssembler\n";
  77. temp=model.getValue("/root/source/source");
  78. strSource=temp.replace('\"', '');
  79. xmlArray=strSource.split("output path");
  80. xmlArray2=xmlArray[1].split("table id=");
  81. xmlArray=xmlArray2[1].split("count_ref");
  82. strStep1 = strStep1 + " * <p>"+xmlArray[0]+" : 출력데이터\n";
  83. strStep1 = strStep1 + " * <ul>\n";
  84. var xmlArray=xmlArray2[1];
  85. var xmlArray2=xmlArray.split("column id=");
  86. for (var i=1;i<xmlArray2.length;i++){
  87. xmlArray = xmlArray2[i].split("desc=");
  88. var temp = xmlArray[1].split("ref=");
  89. strStep1 = strStep1 + " * <li>"+xmlArray[0]+" "+temp[0]+"\n";
  90. }
  91. var strStep2;
  92. strStep2=fReplace(strStep1, '"string"');
  93. strStep1=fReplace(strStep2, '"CDATA"');
  94. strStep2=fReplace(strStep1, 'type=');
  95. strStep1=fReplace(strStep2, "=");
  96. strStep2=fReplace(strStep1, '"int"');
  97. strStep1=fReplace(strStep2, '"cdata"');
  98. strStep2=fReplace(strStep1, '"STRING"');
  99. strStep1=fReplace(strStep2, '"');
  100. strStep1 = strStep1 + " * </ul>\n";
  101. strStep1 = strStep1 + " * @throws LiveException\n";
  102. strStep1 = strStep1 + " */\n";
  103. }else{
  104. var strStep2;
  105. strStep2=fReplace(strStep1, '"string"');
  106. strStep1=fReplace(strStep2, '"CDATA"');
  107. strStep2=fReplace(strStep1, 'type=');
  108. strStep1=fReplace(strStep2, "=");
  109. strStep2=fReplace(strStep1, '"int"');
  110. strStep1=fReplace(strStep2, '"cdata"');
  111. strStep2=fReplace(strStep1, '"STRING"');
  112. strStep1=fReplace(strStep2, '"');
  113. strStep1 = strStep1 + " * @return int\n";
  114. strStep1 = strStep1 + " * @throws LiveException\n";
  115. strStep1 = strStep1 + " */\n";
  116. }
  117. model.setValue("/root/destination/destination", strStep1);
  118. model.refresh();
  119. ]]>
  120. </script>
  121. </button>
  122. <textarea id="textarea1" ref="/root/source/source" style="left:10px; top:60px; width:415px; height:400px; "/>
  123. <textarea id="textarea2" ref="/root/destination/destination" style="left:455px; top:60px; width:430px; height:400px; "/>
  124. <button id="button2" style="left:150px; top:480px; width:110px; height:40px; ">
  125. <caption>지우기</caption>
  126. <script type="javascript" ev:event="onclick">
  127. <![CDATA[
  128. model.setValue("/root/source/source", "");
  129. model.setValue("/root/destination/destination", "");
  130. model.refresh();
  131. ]]>
  132. </script>
  133. </button>
  134. <caption id="caption4" class="tit_2" style="left:15px; top:20px; width:179px; height:25px; ">map 파일을 붙여 넣어 주세요.</caption>
  135. <caption id="caption1" class="tit_2" style="left:455px; top:20px; width:179px; height:25px; ">처리된 내용입니다.</caption>
  136. </xhtml:body>
  137. </xhtml:html>