チェンジセット 231 : SPARQLBuilderWWW/web/dist.html
- 更新日時:
- 2015/02/03 16:06:56 (10 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/web/dist.html
r230 r231 12 12 <script> 13 13 <!-- 14 15 var ep; 16 var st; 17 var en; 18 19 $(window).load(function() { 20 var param = getParameter(); 21 ep = param['ep']; 22 st = param['st']; 23 en = param['en']; 24 25 if(ep!=undefined && st!=undefined && en!=undefined){ 26 if(ep!="" && st!="" && en!=""){ 27 openSPARQLBuilder(ep,st,en); 28 } 29 } 30 }); 31 32 function startSPARQLBuilder(){ 33 /* if(ep!=undefined && st!=undefined && en!=undefined){ 34 if(ep!="" && st!="" && en!=""){ 35 openSPARQLBuilder(ep,st,en); 36 } 37 } 38 else{*/ 39 var sb = new SPARQLBuilder('sparql'); 40 sb.loadSamplePathList(); 41 return false; 42 //} 43 } 44 14 45 function sendSPARQL(){ 15 varep = $("*[name=selectendpoint]").val();46 ep = $("*[name=selectendpoint]").val(); 16 47 17 48 if(ep == "input"){ … … 29 60 30 61 function trySample(sparql){ 62 openSPARQLBuilder('http://www.ebi.ac.uk/rdf/services/reactome/sparql', 63 'http://www.biopax.org/release/biopax-level3.owl#Protein', 64 'http://www.biopax.org/release/biopax-level3.owl#Pathway'); 65 /* 31 66 var sb = new SPARQLBuilder('sparql'); 32 sb.loadSamplePathList( );67 sb.loadSamplePathList('http://www.ebi.ac.uk/rdf/services/reactome/sparql')); 33 68 34 69 $('#seclass').on('epcomplete', function(){ … … 40 75 $('#StartClassSelect').val('http://www.biopax.org/release/biopax-level3.owl#Protein'); 41 76 $('#EndClassSelect').val('http://www.biopax.org/release/biopax-level3.owl#Pathway'); 77 });*/ 78 } 79 80 function openSPARQLBuilder(ep,st,en){ 81 var sb = new SPARQLBuilder('sparql'); 82 sb.loadSamplePathList(); 83 84 $('#seclass').on('epcomplete', function(){ 85 $('#EndPointSelect').val(ep); 86 sb.changeEndPoint(); 87 }); 88 89 $('#seclass').on('secomplete', function(){ 90 $('#StartClassSelect').val(st); 91 $('#EndClassSelect').val(en); 42 92 }); 43 93 } 94 44 95 45 96 function sendSPARQL2(){ … … 104 155 }; 105 156 157 function getParameter() 158 { 159 var result = {}; 160 if( 1 < window.location.search.length ) 161 { 162 var query = window.location.search.substring( 1 ); 163 var parameters = query.split( '&' ); 164 165 for( var i = 0; i < parameters.length; i++ ) 166 { 167 var element = parameters[ i ].split( '=' ); 168 var paramName = decodeURIComponent( element[ 0 ] ); 169 var paramValue = decodeURIComponent( element[ 1 ] ); 170 result[ paramName ] = paramValue; 171 } 172 } 173 return result; 174 } 106 175 107 176 --> … … 114 183 <div> 115 184 <form> 116 <input type="button" id="create" value="Start SPARQLBuilder" onclick="new SPARQLBuilder('sparql'); return false;"/> 185 <input type="button" id="create" value="Start SPARQLBuilder" onclick="startSPARQLBuilder()"/> 186 <!--<input type="button" id="create" value="Start SPARQLBuilder" onclick="new SPARQLBuilder('sparql'); return false;"/> --> 117 187 <input type="button" id="create" value="Try with Sample" onclick="trySample('sparql'); return false;" /> 118 188 <br/>