Extend BROWSER show-linksExtend BROWSER show-linksRE: Extend BROWSER show-linksIoanna Ramoutsakihttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=5726502016-05-31T04:01:45Z2016-05-31T04:01:45ZThank you so much for your help!!!Ioanna Ramoutsaki2016-05-31T04:01:45ZRE: Extend BROWSER show-linksMehmet Albayrakhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=5706692016-05-27T13:05:59Z2016-05-27T13:03:57ZDear Ioanna,<br />The content that should be displayed in a browser window should be configured/defined before you call the BROWSER command as follows:<br /><br /><div class="code"><span class="code-lines"> 1</span>CC "AdoScript" FREAD file: ("D:\\newresultsquery1.txt") binary:0 base64:0<br /><span class="code-lines"> 2</span>SET sResultQuery: (text)<br /><span class="code-lines"> 3</span>SET sSepLine: "\n"<br /><span class="code-lines"> 4</span>SET actArray: (array(0))<br /><span class="code-lines"> 5</span>SET sBrowserContent: ("")<br /><span class="code-lines"> 6</span>FOR sQueryInfo in: (sResultQuery) sep: (sSepLine) { <br /><span class="code-lines"> 7</span> ## In the variable 'param1' we get the results that concern the activities of the models. <br /><span class="code-lines"> 8</span> SET param1: (search(sQueryInfo, "activity:", 0)) <br /><span class="code-lines"> 9</span> SET param2: (search(sQueryInfo, ";", 9)) <br /><span class="code-lines">10</span> SET param3: (search(sQueryInfo, ":",param2)) <br /><span class="code-lines">11</span> #CC "AdoScript" INFOBOX (param2) <br /><span class="code-lines">12</span> IF(param1 = 0) {<br /><span class="code-lines">13</span> SET act: (copy(sQueryInfo, 9, (param2-9)))<br /><span class="code-lines">14</span> SET sptype: (copy(sQueryInfo, param2+1, (param3-param2-1)))<br /><span class="code-lines">15</span> SET smodel: (copy(sQueryInfo, param3+1, (LEN sQueryInfo)-1))<br /><span class="code-lines">16</span><br /><span class="code-lines">17</span> # replace underlines within the names <br /><span class="code-lines">18</span> #!!!!!!!!!!NOTE: if there exists underlines in the modelling name than the name is not valid anymore!!!!!!!!!!!! <br /><span class="code-lines">19</span> SET act: (replall(act, "_", " "))<br /><span class="code-lines">20</span> SET smodel: (replall(smodel, "annotated_", ""))<br /><span class="code-lines">21</span> SET smodel: (replall(smodel, "_", " "))<br /><span class="code-lines">22</span> SET smodel: ("annotated_"+smodel)<br /><span class="code-lines">23</span><br /><span class="code-lines">24</span> SET dummy: (aappend(actArray, act))<br /><span class="code-lines">25</span> #CC "AdoScript" INFOBOX ("act is: " + act) <br /><span class="code-lines">26</span> IF (sBrowserContent="") { <br /><span class="code-lines">27</span> SET sBrowserContent: (";Activitytype;Processtype;Reference\n;Activity;"+sptype+";REF mt:\"Business process diagram (BPMN 2.0)\" m:\""+smodel+"\" c:\"Task\" o:\"" +act+ "\"\n") <br /><span class="code-lines">28</span> } ELSE { <br /><span class="code-lines">29</span> SET sBrowserContent: (sBrowserContent + ";Activity;"+sptype+";REF mt:\"Business process diagram (BPMN 2.0)\" m:\""+smodel+"\" c:\"Task\" o:\"" +act+ "\"\n")<br /><span class="code-lines">30</span> }<br /><span class="code-lines">31</span> }<br /><span class="code-lines">32</span>}<br /><span class="code-lines">33</span>#delete the last linebreak<br /><span class="code-lines">34</span>SET sBrowserContent: (copy(sBrowserContent, 0, ((LEN sBrowserContent)-1)))<br /><span class="code-lines">35</span>CC "AdoScript" EDITBOX text: (sBrowserContent)<br /><span class="code-lines">36</span><br /><span class="code-lines">37</span>CC "AdoScript" BROWSER show-links<br /><span class="code-lines">38</span> objref-format:"%c: %o (of model %m [%mt])"linesep: "\n"<br /><span class="code-lines">39</span> modref-format:"Model %m of type %mt"<br /><span class="code-lines">40</span> title:"My Query Results"<br /><span class="code-lines">41</span> content: (sBrowserContent)<br /><span class="code-lines">42</span> with-handlecolumn header:"Save\nthis header" print-header:"Print\nthis header"<br /></div><br />Note that:<br /><strong>1)</strong> If you want to read also the modelname and the processtype from your results and display it in the BROWSER (as above), then take another seperator between the activity and the process than each result (see e.g. newresultsquery1.txt)<br /><strong>2)</strong> It is not allowed to reference to relations -like in your resultsquery2.txt<br /><strong>3)</strong> You can also work with maps instead of lines 8-10 and 13-15 (see <a href="https://www.adoxx.org/live/faq/-/message_boards/message/139305">https://www.adoxx.org/live/faq/-/message_boards/message/139305</a>)<br /><strong>4)</strong> Names should not be changed during the whole process either in the sparql query nor in AdoScript (See line 17 ff) as they are the identifier of the reference. <br /><br />.Mehmet Albayrak2016-05-27T13:03:57ZRE: Extend BROWSER show-linksIoanna Ramoutsakihttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=5678652016-05-25T16:20:11Z2016-05-25T16:20:11ZHello,<br /><br />Thank you for your advice as far as virtuoso sparql endpoint is concerned. I indeed must take it into consideration. <br />I attach 3 txt files, one for each query of the followings:<br />1. Give me all the activities which have semantic annotation with the class ... (e.g. to_search_for_product), as well as the process which belong in.<br />2. Give me all distinct activities inside a subprocess and the subprocess.<br />3. Get all activities which is connected with the activity ... (e.g. choose a product)with the relation ... (e.g. subsequent)<br /><br />thank you in advance.<br /><br />With regards,<br />IoannaIoanna Ramoutsaki2016-05-25T16:20:11ZRE: Extend BROWSER show-linksMehmet Albayrakhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=5664882016-05-25T07:56:32Z2016-05-25T07:56:12Z<span style="font-size: 16px">Hello Ioanna,<br />Because of the lack of Virtuoso on localhost your VirtuosoSparqlQueries.jar file return a connection error, and we were not able to recunstruct your scenario/functionality (consider this also if you want to hand on your application library/modelling tool and avoid additional tool installations). Can you please attach a 'resultQueries'-file as an output from the line<br /><br /></span><div class="code"><span class="code-lines">1</span>SYSTEM ("cmd /c java -jar "+jarFile+" "+myOwlPath+" "+resultsQueries)</div>Mehmet Albayrak2016-05-25T07:56:12ZRE: Extend BROWSER show-linksIoanna Ramoutsakihttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=5642582016-05-23T18:33:20Z2016-05-23T18:28:02ZHello,<br /><br />In 'Analysis' menu, i have made a sub-menu called 'sparql queries' which execute the 'sparql.asc' file. This file gets all the annotated BPMN models of the explorer and the 'basicBPMN_Ontology' model of the explorer too and creates an owl file in which the annotated BPMN models are instances of the basicBPMN_Ontology.<br />After that, this owl file is uploaded in virtuoso and makes some standardised queries on it. The user has the opportunity to select which query to be executed and with which parameters. <br />The result of the selected query i want to be displayed on the user as a table with links. <br />For example on the query: 'Give me all the activities which have semantic annotation with the class ... (e.g. to_search_for_product)'<br />I want to get the table with the results as it seems in the attach icon.<br />I also attach my library.<br /><br />I'll appreciate any help.<br /><br />With regards,<br />IoannaIoanna Ramoutsaki2016-05-23T18:28:02ZRE: Extend BROWSER show-linksMehmet Albayrakhttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=5630452016-05-23T06:42:55Z2016-05-23T06:42:55Z<span style="font-size: 16px">Hello Ioanna,<br />How is this functionality triggered? And I would also kindly ask you to attach also the library with your AdoScript in order to find an appropriate solution for you. </span>Mehmet Albayrak2016-05-23T06:42:55ZExtend BROWSER show-linksIoanna Ramoutsakihttps://www.adoxx.org/live/c/message_boards/find_message?p_l_id=&messageId=5623452016-05-22T13:54:24Z2016-05-22T13:53:37ZHello,<br />I have made some standardised sparql queries and i want to return the results in SeMFIS using CC "AdoScript" BROWSER show-links command.<br />For this reason i have made a jar file which i call in my adoscript asc file and return the results in a txt file. <br />Then, i put the results in an array and i want to show them via BROWSER show-links to user.<br />But i realised that i can't use the content of browser dynamically e.g. it couldn't create as many rows as the results are anytime a query is done and set in the variables o:, c: m: the values of variables instead of static values.<br />Here is a snippet of my adoscript code:<br /><em><em>...<br /></em></em><div class="code"><span class="code-lines"> 1</span><br /><span class="code-lines"> 2</span>SYSTEM ("cmd /c java -jar "+jarFile+" "+myOwlPath+" "+resultsQueries)<br /><span class="code-lines"> 3</span>CC "AdoScript" FREAD file: (resultsQueries) binary:0 base64:0<br /><span class="code-lines"> 4</span>SET sResultQuery: (text)<br /><span class="code-lines"> 5</span>SET sSepLine: "\n"<br /><span class="code-lines"> 6</span>SET actArray: (array(0))<br /><span class="code-lines"> 7</span>FOR sQueryInfo in: (sResultQuery) sep: (sSepLine)<br /><span class="code-lines"> 8</span>{<br /><span class="code-lines"> 9</span> #CC "AdoScript" INFOBOX ("sQueryInfo is: " + sQueryInfo)<br /><span class="code-lines">10</span> SET param1: (search(sQueryInfo, "activity:", 0))<br /><span class="code-lines">11</span> #CC "AdoScript" INFOBOX ("param1 is: " + STR param1)<br /><span class="code-lines">12</span> IF(param1 = 0)<br /><span class="code-lines">13</span> {<br /><span class="code-lines">14</span> SET act: (copy(sQueryInfo, 9, LEN sQueryInfo))<br /><span class="code-lines">15</span> SET act: (replall(act, "_", " "))<br /><span class="code-lines">16</span> SET dummy: (aappend(actArray, act))<br /><span class="code-lines">17</span> #CC "AdoScript" INFOBOX ("act is: " + act)<br /><span class="code-lines">18</span> }<br /><span class="code-lines">19</span>}<br /><span class="code-lines">20</span><br /><span class="code-lines">21</span> #SET actParam: (actArray[i])<br /><span class="code-lines">22</span> CC "AdoScript" BROWSER show-links<br /><span class="code-lines">23</span> objref-format:"%c: %o (of model %m [%t])"<br /><span class="code-lines">24</span> title:"My Query Results"<br /><span class="code-lines">25</span> content:";Type;Reference\t<br /><span class="code-lines">26</span> FOR i from:0 to: (actArray.length-1)<br /><span class="code-lines">27</span> {<br /><span class="code-lines">28</span> SET j: i+1<br /><span class="code-lines">29</span> j;Activity;REF mt:\"Business process diagram (BPMN 2.0)\" m:\"annotated_onLineShop 1.0\" c:\"Task\" o: (actArray[i])\t<br /><span class="code-lines">30</span> }"<br /><span class="code-lines">31</span> linesep: "\t"<br /><span class="code-lines">32</span> with-handlecolumn header:"Save\nthis header" print-header:"Print\nthis header"<br /></div><br /><br />Of course nothing happens because of FOR loop inside the 'content' of BROWSER.<br />Is there a way to make the CC "AdoScript" BROWSER show-links dynamically? <br />If not, is there another way to show the results dynamically as a table with links?<br /><br />Thank you in advance,<br />IoannaIoanna Ramoutsaki2016-05-22T13:53:37Z