チェンジセット 292
- 更新日時:
- 2016/12/14 17:01:35 (8 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/web/newsparqlbuilder.js
r290 r292 1 1 2 // API逕ィ繝励Ξ繝輔ぅ繝�け繧ケ謖�ョ� 3 var prefix = 'http://www.sparqlbuilder.org/api'; 4 5 6 // 謠冗判邉サ螳壽焚 2 7 var PATHNUM = 0; 3 8 var MAXDEPTH = 0; … … 6 11 var DRAWHEIGHT = 0; 7 12 13 // 繝代せ謗「邏「縺ォ菴ソ縺�お繝ウ繝峨�繧、繝ウ繝医�繧ケ繧ソ繝シ繝医け繝ゥ繧ケ繝サ繧ィ繝ウ繝峨け繝ゥ繧ケ 8 14 var endpoint = ""; 9 15 var startclass= ""; 10 16 var endclass = ""; 11 17 18 // GET繝。繧ス繝�ラ縺ァ謖�ョ壹&繧後※縺�◆蝣エ蜷医�蛟、蜿門セ礼畑 12 19 var defendpoint = ""; 13 20 var defstartclass= ""; 14 21 var defendclass = ""; 15 22 23 // 蜿門セ励@縺殍son菫晏ュ倡畑 16 24 var jsontext = ""; 25 // 謠冗判縺ォ蛻ゥ逕ィ縺吶k繧ェ繝悶ず繧ァ繧ッ繝� 17 26 var pathobj = ""; 18 27 28 // 蛻昴a縺ォ陦ィ遉コ縺吶k繝代せ謨ー縺ョ荳企剞 19 29 var pathlimit = 10; 20 30 … … 26 36 initparts(); 27 37 38 // GET繝。繧ス繝�ラ縺ァ謖�ョ壹&繧後◆蛟、縺後≠繧後�蜿門セ� 28 39 getParameter(); 29 40 41 // 謖�ョ壹′縺ゅl縺ー 30 42 if(defendpoint != "" && defstartclass != "" && defendclass != ""){ 43 // 謖�ョ壹&繧後◆蜀�ョケ繧剃スソ縺ТPARQLbuilder繧帝幕縺� 31 44 openSPARQLBuilder(); 32 45 } … … 34 47 }); 35 48 49 // 繝代�繝��蛻晄悄蛹� 36 50 function initparts(){ 51 // SPARQLbuilder逕ィ隕∫エ繧貞叙蠕� 37 52 var sbdiv = $('div#SPARQLBUILDER'); 53 // 荳ュ縺ォdiv隕∫エ縺後↑縺代l縺ー 38 54 if(sbdiv.find('div').length == 0){ 55 // 繝医ャ繝励�SPARQLbuilder逕サ髱「繧剃ス懈� 39 56 var sbtop = '<div class="SBTopItems"><input type="button" class="SBTopButton" value="Open SPARQLBuilder" onclick="openSPARQLBuilder()"><input type="button" class="SBTopButton" value="Try with Sample" onclick="openSample(\'http://www.ebi.ac.uk/rdf/services/reactome/sparql\', \'http://www.biopax.org/release/biopax-level3.owl#Protein\', \'http://www.biopax.org/release/biopax-level3.owl#Pathway\')"><br><textarea class="SBSparqlArea" rows="10"></textarea><br><input type="button" class="SBTopButton" value="Send SPARQL" onclick="sendSPARQL()"><input type="button" class="SBTopButton" value="Download Result" onclick="downloadResult()"></div><div class="SBTutorialLink">Tutorial for SPARQL Builder GUI is <a href="http://www.sparqlbuilder.org/doc/how-to-use-sparql-builder-gui/" target="_blank">here</a>.</div>'; 57 // 繝代せ陦ィ遉コ逕サ髱「縺ョ繝「繝シ繝繝ォ繧剃ス懈� 40 58 var sbmodal = '<div class="SBModalView"><div class="SBModalContents"><div class="SBForms"><div class="SBSelects"><select class="SBEndPointSelect"></select><select class="SBStartClassSelect"></select><select class="SBEndClassSelect"></select></div><div class="SBPermaLink"><input type="button" class="SBPermaLinkButton" value="Permalink" onclick="openPermalink()" disabled="disabled"></div></div><div class="SBMessage"><div class="SBResult"><span class="SBPathnum"></span> Path<span class="SBPlural"></span> found.</div><input type="button" class="SBViewAll" value="View All Path" onclick="viewAll()"></div><div class="SBGraph"><div class="SBAjaxLoad" style="display: none;"><div class="SBLoadIcon"><img src="images/ajax-loader.gif"></div></div></div><div class="SBPath"><div class="SBSelectedPath"></div></div><div class="SBModalButtons"><input type="button" class="SBModalButton" value="Close" onclick="closeSPARQLBuilder()"></div></div></div>'; 41 59 60 // SPARQLbuilder逕ィ隕∫エ縺ォ繝医ャ繝礼畑逕サ髱「繧定ソス蜉 42 61 sbdiv.html(sbtop); 62 // body隕∫エ譛ォ蟆セ縺ォ繝「繝シ繝繝ォ逕サ髱「繧定ソス蜉 43 63 $('body').append(sbmodal); 44 64 } 45 65 66 // 繝「繝シ繝繝ォ逕サ髱「縺ョ繧ッ繝ェ繝�け繧、繝吶Φ繝� 46 67 $('.SBModalView').click(function(){ 68 // 繝「繝シ繝繝ォ逕サ髱「繧偵ヵ繧ァ繝シ繝峨い繧ヲ繝医@髱櫁。ィ遉コ縺ォ 47 69 $(this).fadeOut(700); 48 70 }); 49 71 72 // 繝「繝シ繝繝ォ蜀��繧ウ繝ウ繝�Φ繝�Κ蛻��繧ッ繝ェ繝�け繧、繝吶Φ繝� 50 73 $('.SBModalContents').click(function(event){ 74 // 繝励Ο繝代ご繝シ繧キ繝ァ繝ウ繧呈ュ「繧√さ繝ウ繝�Φ繝�Κ蛻��繧ッ繝ェ繝�け縺ァ縺ッ繝輔ぉ繝シ繝峨い繧ヲ繝医@縺ェ縺�h縺�↓縺吶k 51 75 event.stopPropagation(); 52 76 }); 53 77 78 // 繧ィ繝ウ繝峨�繧、繝ウ繝医Μ繧ケ繝医�蜿門セ� 54 79 loadEndPointList(); 55 80 81 // 繧ィ繝ウ繝峨�繧、繝ウ繝医′螟画峩縺輔l縺溘i 56 82 $(".SBEndPointSelect").change(function() { 57 changeEndPoint(); 83 // 繝�ヵ繧ゥ繝ォ繝医〒縺ェ縺代l縺ー 84 if($(".SBEndPointSelect").val() != "SBDefault"){ 85 // 驕ク謚槭&繧後※縺�k繧ィ繝ウ繝峨�繧、繝ウ繝医�URL繧貞叙蠕� 86 endpoint = $(".SBEndPointSelect").val(); 87 // 繧ケ繧ソ繝シ繝医け繝ゥ繧ケ繧貞�隱ュ縺ソ霎シ縺ソ 88 loadStartClassList(); 89 } 58 90 }); 59 91 92 // 繧ケ繧ソ繝シ繝医け繝ゥ繧ケ縺悟、画峩縺輔l縺溘i 60 93 $(".SBStartClassSelect").change(function() { 61 startClass = $(".SBStartClassSelect").val(); 62 loadEndClassList(); 94 // 繝�ヵ繧ゥ繝ォ繝医〒縺ェ縺代l縺ー 95 if($(".SBStartClassSelect").val() != "SBDefault"){ 96 // 驕ク謚槭&繧後※縺�k繧ケ繧ソ繝シ繝医け繝ゥ繧ケ縺ョURI繧貞叙蠕� 97 startClass = $(".SBStartClassSelect").val(); 98 // 繧ィ繝ウ繝峨け繝ゥ繧ケ繧貞�隱ュ縺ソ霎シ縺ソ 99 loadEndClassList(); 100 } 63 101 }); 102 103 // 繧ィ繝ウ繝峨け繝ゥ繧ケ縺悟、画峩縺輔l縺溘i 64 104 $(".SBEndClassSelect").change(function() { 65 endClass = $(".SBEndClassSelect").val(); 66 loadPathList(); 105 // 繝�ヵ繧ゥ繝ォ繝医〒縺ェ縺代l縺ー 106 if($(".SBEndClassSelect").val() != "SBDefault"){ 107 // 驕ク謚槭&繧後※縺�k繧ィ繝ウ繝峨け繝ゥ繧ケ縺ョURI繧貞叙蠕� 108 endClass = $(".SBEndClassSelect").val(); 109 // 蜿門セ励@縺滓ュ蝣ア繧帝√j繝代せ繧貞�隱ュ縺ソ霎シ縺ソ 110 loadPathList(); 111 } 67 112 }); 68 113 69 114 } 70 115 71 72 function getParameter() 73 { 74 if( 1 < window.location.search.length ) 75 { 76 var query = window.location.search.substring( 1 ); 77 var parameters = query.split( '&' ); 78 79 for( var i = 0; i < parameters.length; i++ ) 80 { 81 var element = parameters[ i ].split( '=' ); 82 if(decodeURIComponent( element[ 0 ] ) == "ep"){ 83 defendpoint = decodeURIComponent( element[ 1 ] ) 84 }else if(decodeURIComponent( element[ 0 ] ) == "st"){ 85 defstartclass = decodeURIComponent( element[ 1 ] ) 86 }else if(decodeURIComponent( element[ 0 ] ) == "en"){ 87 defendclass = decodeURIComponent( element[ 1 ] ) 88 } 89 } 90 } 116 // GET繝。繧ス繝�ラ縺ァ騾√i繧後◆繝代Λ繝。繝シ繧ソ縺ョ繝√ぉ繝�け 117 function getParameter(){ 118 if( 1 < window.location.search.length ){ 119 var query = window.location.search.substring( 1 ); 120 var parameters = query.split( '&' ); 121 122 for( var i = 0; i < parameters.length; i++ ){ 123 var element = parameters[ i ].split( '=' ); 124 if(decodeURIComponent( element[ 0 ] ) == "ep"){ 125 defendpoint = decodeURIComponent( element[ 1 ] ) 126 }else if(decodeURIComponent( element[ 0 ] ) == "st"){ 127 defstartclass = decodeURIComponent( element[ 1 ] ) 128 }else if(decodeURIComponent( element[ 0 ] ) == "en"){ 129 defendclass = decodeURIComponent( element[ 1 ] ) 130 } 131 } 132 } 91 133 } 92 134 … … 204 246 }; 205 247 248 249 // 繧ィ繝ウ繝峨�繧、繝ウ繝医Μ繧ケ繝医�蜿門セ� 206 250 function loadEndPointList(){ 251 // 繝代�繝槭Μ繝ウ繧ッ繝懊ち繝ウ繧堤┌蜉ケ蛹� 207 252 $('.SBPermaLinkButton').attr('disabled', true); 208 var url = 'http://www.sparqlbuilder.org/api/eplist?ds=true'; 253 // 諠�ア蜿門セ礼畑API縺ョURL繧剃ス懈��医�繝ャ繝輔ぅ繝�け繧ケ�菊plist�� 254 // ds=true縺ォ繧医▲縺ヲ繝��繧ソ繧サ繝�ヨ繝「繝シ繝峨↓縺ェ繧翫お繝ウ繝峨�繧、繝ウ繝医�繧ソ繧、繝医Ν縺ィURL縺檎オ�〒蜿門セ励&繧後k 255 var url = prefix + '/eplist?ds=true'; 256 257 // 繧ィ繝ウ繝峨�繧、繝ウ繝医�繧ケ繧ソ繝シ繝医け繝ゥ繧ケ繝サ繧ィ繝ウ繝峨け繝ゥ繧ケ繧偵◎繧後◇繧檎ゥコ縺ォ縺礼┌蜉ケ蛹� 209 258 $(".SBEndPointSelect").empty(); 210 259 $(".SBEndPointSelect").attr("disabled", "disabled"); … … 213 262 $(".SBEndClassSelect").empty(); 214 263 $(".SBEndClassSelect").attr("disabled", "disabled"); 264 265 // ajax縺ァ諠�ア蜿門セ� 215 266 $.ajax({ 267 // url繧偵そ繝�ヨ 216 268 url: url, 269 // 諠�ア縺悟叙蠕励〒縺阪◆繧� 217 270 success: function(data) { 271 // 蜿門セ励@縺殍son縺ョ繝�く繧ケ繝医r繧ェ繝悶ず繧ァ繧ッ繝医↓螟画鋤 218 272 var list = eval(data); 273 // 繧ィ繝ウ繝峨�繧、繝ウ繝医Μ繧ケ繝医r遨コ縺ォ 219 274 $(".SBEndPointSelect").empty(); 275 // 繝�ヵ繧ゥ繝ォ繝医r霑ス蜉 220 276 $(".SBEndPointSelect").append('<option value="SBDefault">SELECT Endpoint</option>'); 277 // 蜿門セ励@縺溘Μ繧ケ繝医�謨ー縺縺醍ケー繧願ソ斐@ 221 278 for (var i = 0; i < list.length; ++i) { 279 // 蜿門セ励@縺殷rl縺ィ繝ゥ繝吶Ν繧偵そ繝�ヨ縺熔ption隕∫エ繧定ソス蜉 222 280 $(".SBEndPointSelect").append('<option value="' + list[i]['uri'] + '">' + list[i]['label'] + '</option>'); 223 281 } 282 // 繧ィ繝ウ繝峨�繧、繝ウ繝医′謖�ョ壽ク医∩縺ァ縺ェ縺代l縺ー 224 283 if(defendpoint == ''){ 284 // 繝ュ繝シ繝峨い繧、繧ウ繝ウ繧帝撼陦ィ遉コ 225 285 switchLoadIcon("hide"); 226 286 } 287 // 繝「繝シ繝繝ォ繝薙Η繝シ縺瑚。ィ遉コ迥カ諷九↑繧� 227 288 if($('.SBModalView').attr('display') == 'block'){ 289 // 蜷�そ繝ャ繧ッ繝医�繝�け繧ケ繧呈、懃エ「蜿ッ閭ス縺ォ 228 290 $(".SBEndPointSelect").select2(); 229 291 $(".SBStartClassSelect").select2(); 230 292 $(".SBEndClassSelect").select2(); 231 293 } 294 // 繧ィ繝ウ繝峨�繧、繝ウ繝医�驕ク謚槭r譛牙柑蛹� 232 295 $(".SBEndPointSelect").removeAttr("disabled"); 296 // 繧ィ繝ウ繝峨�繧、繝ウ繝医�隱ュ縺ソ霎シ縺ソ螳御コ�r騾夂衍 233 297 $(".SBEndPointSelect").trigger(new $.Event('epcomplete')); 234 298 }, … … 236 300 } 237 301 238 changeEndPoint = function() { 239 endpoint = $(".SBEndPointSelect option:selected").text(); 240 if(endpoint != "SBDefault"){ 241 loadStartClassList(); 242 } 243 }; 244 245 loadStartClassList = function() { 302 // 繧ケ繧ソ繝シ繝医け繝ゥ繧ケ縺ョ蜿門セ� 303 function loadStartClassList() { 304 // 繝代�繝槭Μ繝ウ繧ッ繝懊ち繝ウ繧堤┌蜉ケ蛹� 246 305 $('.SBPermaLinkButton').attr('disabled', true); 247 var url = "http://www.sparqlbuilder.org/api/clist?ep=" + encodeURIComponent(endpoint); 306 // 諠�ア蜿門セ礼畑API縺ョURL繧剃ス懈��医�繝ャ繝輔ぅ繝�け繧ケ�議list�矩∈謚槭&繧後◆繧ィ繝ウ繝峨�繧、繝ウ繝�RL�� 307 var url = prefix + "/clist?ep=" + encodeURIComponent(endpoint); 308 // 繧ケ繧ソ繝シ繝医け繝ゥ繧ケ繝サ繧ィ繝ウ繝峨け繝ゥ繧ケ繧偵◎繧後◇繧檎ゥコ縺ォ縺礼┌蜉ケ蛹� 248 309 $(".SBStartClassSelect").empty(); 249 310 $(".SBStartClassSelect").attr("disabled", "disabled"); 250 311 $(".SBEndClassSelect").empty(); 251 312 $(".SBEndClassSelect").attr("disabled", "disabled"); 313 // ajax縺ァ諠�ア蜿門セ� 252 314 $.ajax({ 315 // 繝。繧ス繝�ラ繧ソ繧、繝玲欠螳� 253 316 type : "GET", 317 // url繧偵そ繝�ヨ 254 318 url : url, 255 // async : false,319 // 諠�ア縺悟叙蠕励〒縺阪◆繧� 256 320 success : function(data) { 321 // 蜿門セ励@縺殍son縺ョ繝�く繧ケ繝医r繧ェ繝悶ず繧ァ繧ッ繝医↓螟画鋤 257 322 var list = eval(data); 323 // 繧ケ繧ソ繝シ繝医け繝ゥ繧ケ繧堤ゥコ縺ォ 258 324 $(".SBStartClassSelect").empty(); 325 // 繝�ヵ繧ゥ繝ォ繝医r霑ス蜉 259 326 $(".SBStartClassSelect").append('<option value="SBDefault">SELECT StartClass (From ' + list.length + ' classes below)</option>'); 327 // 蜿門セ励@縺溘Μ繧ケ繝医�謨ー縺縺醍ケー繧願ソ斐@ 260 328 for (var i = 0; i < list.length; ++i) { 329 // 蜿門セ励@縺殷ri繝サ繝ゥ繝吶Ν繝サ繧ッ繝ゥ繧ケ謨ー繧偵そ繝�ヨ縺熔ption隕∫エ繧定ソス蜉 261 330 $(".SBStartClassSelect").append('<option value="' + list[i]['uri'] + '">' + list[i]['label'] + ' (' + list[i]['number'] + ')' + '</option>'); 262 331 } 332 // 繧ケ繧ソ繝シ繝医け繝ゥ繧ケ縺ョ驕ク謚槭r譛牙柑蛹� 263 333 $(".SBStartClassSelect").removeAttr("disabled"); 334 // 繧ケ繧ソ繝シ繝医け繝ゥ繧ケ繝サ繧ィ繝ウ繝峨け繝ゥ繧ケ繧呈、懃エ「蜿ッ閭ス縺ォ 264 335 $(".SBStartClassSelect").select2(); 265 336 $(".SBEndClassSelect").select2(); 337 // 繧ケ繧ソ繝シ繝医け繝ゥ繧ケ縺ョ隱ュ縺ソ霎シ縺ソ螳御コ�r騾夂衍 266 338 $(".SBStartClassSelect").trigger(new $.Event('lsccomplete')); 267 339 } … … 269 341 }; 270 342 271 loadEndClassList = function() { 343 // 繧ィ繝ウ繝峨け繝ゥ繧ケ縺ョ蜿門セ� 344 function loadEndClassList() { 345 // 繝代�繝槭Μ繝ウ繧ッ繝懊ち繝ウ繧堤┌蜉ケ蛹� 272 346 $('.SBPermaLinkButton').attr('disabled', true); 273 var url = "http://www.sparqlbuilder.org/api/clist?ep=" + encodeURIComponent(endpoint) + '&class=' + encodeURIComponent($(".SBStartClassSelect").val()); 347 // 諠�ア蜿門セ礼畑API縺ョURL繧剃ス懈��医�繝ャ繝輔ぅ繝�け繧ケ�議list�矩∈謚槭&繧後◆繧ィ繝ウ繝峨�繧、繝ウ繝茨シ矩∈謚槭&繧後◆繧ケ繧ソ繝シ繝医け繝ゥ繧ケ�� 348 var url = prefix + "/clist?ep=" + encodeURIComponent(endpoint) + '&class=' + encodeURIComponent(startClass); 349 // ajax縺ァ諠�ア蜿門セ� 274 350 $.ajax({ 351 // 繝。繧ス繝�ラ繧ソ繧、繝玲欠螳� 275 352 type : "GET", 353 // url繧偵そ繝�ヨ 276 354 url : url, 277 // async : false,355 // 諠�ア縺悟叙蠕怜�譚・縺溘i 278 356 success : function(data) { 357 // 蜿門セ励@縺殍son縺ョ繝�く繧ケ繝医r繧ェ繝悶ず繧ァ繧ッ繝医↓螟画鋤 279 358 var list = eval(data); 359 // 繧ィ繝ウ繝峨�繧、繝ウ繝医r遨コ縺ォ 280 360 $(".SBEndClassSelect").empty(); 361 // 繝�ヵ繧ゥ繝ォ繝医r霑ス蜉 281 362 $(".SBEndClassSelect").append('<option value="SBDefault">SELECT EndClass (From ' + list.length + ' classes below)</option>'); 363 // 蜿門セ励@縺溘Μ繧ケ繝医�謨ー縺縺醍ケー繧願ソ斐@ 282 364 for (var i = 0; i < list.length; ++i) { 365 // 蜿門セ励@縺殷ri繝サ繝ゥ繝吶Ν繝サ繧ッ繝ゥ繧ケ謨ー繧偵そ繝�ヨ縺熔ption隕∫エ繧定ソス蜉 283 366 $(".SBEndClassSelect").append('<option value="' + list[i]['uri'] + '">' + list[i]['label'] + ' (' + list[i]['number'] + ')' + '</option>'); 284 367 } 368 // 繧ィ繝ウ繝峨け繝ゥ繧ケ縺ョ驕ク謚槭r譛牙柑蛹� 285 369 $(".SBEndClassSelect").removeAttr("disabled"); 370 // 繧ケ繧ソ繝シ繝医け繝ゥ繧ケ繝サ繧ィ繝ウ繝峨け繝ゥ繧ケ繧呈、懃エ「蜿ッ閭ス縺ォ 286 371 $(".SBStartClassSelect").select2(); 287 372 $(".SBEndClassSelect").select2(); 373 // 繧ィ繝ウ繝峨け繝ゥ繧ケ縺ョ隱ュ縺ソ霎シ縺ソ螳御コ�r騾夂衍 288 374 $(".SBEndClassSelect").trigger(new $.Event('leccomplete')); 289 375 } … … 291 377 }; 292 378 293 loadPathList = function() { 379 // 繝代せ繝ェ繧ケ繝医�蜿門セ� 380 function loadPathList() { 381 // 繧ケ繧ソ繝シ繝医け繝ゥ繧ケ繝サ繧ィ繝ウ繝峨け繝ゥ繧ケ繧貞叙蠕� 294 382 startclass = $(".SBStartClassSelect").val(); 295 383 endclass = $(".SBEndClassSelect").val(); 296 384 385 // GET繝。繧ス繝�ラ縺ァ縺昴l縺槭l謖�ョ壹&繧後※縺�l縺ー荳頑嶌縺� 297 386 if(defendpoint != "" && defstartclass != "" && defendclass != ""){ 298 387 endpoint = defendpoint; … … 301 390 } 302 391 303 $('.SBSaveESE').attr('disabled', true); 392 // 繝代�繝槭Μ繝ウ繧ッ繝懊ち繝ウ繧堤┌蜉ケ蛹� 393 $('.SBPermaLinkButton').attr('disabled', true); 394 // URI縺檎ゥコ繧�ョ繝輔か繝ォ繝医↑繧臥オゆコ� 304 395 if (startclass == null || endclass == null || startclass == "SBDefault" || endclass == "SBDefault"){ 305 396 return; 306 397 } 307 398 399 // 隕∝�讀懆ィ� 400 // 繝代せ謨ー荳企剞繧偵Μ繧サ繝�ヨ 308 401 pathlimit = 10; 309 402 403 // 蜷�ィョ蛻晄悄蛹� 310 404 $('.SBResult').hide(); 311 405 $('.SBViewAll').hide(); 312 406 $('.SBSelectedPath').html('<h1>Please <span style="color: hsl(150, 50%, 75%);">select a leaf node</span> and click to generate a SPARQL</h1><img src=\"images/pathline.png\" style="display:none;">'); 313 407 314 var url = "http://www.sparqlbuilder.org/api/plist?ep=" + encodeURIComponent(endpoint) 315 + "&startclass=" + encodeURIComponent(startclass) 316 + "&endclass=" + encodeURIComponent(endclass); 317 408 // 諠�ア蜿門セ礼畑API縺ョURL繧剃ス懈��医�繝ャ繝輔ぅ繝�け繧ケ�却list�句推遞ョ驕ク謚樒オ先棡�� 409 var url = prefix + "/plist?ep=" + encodeURIComponent(endpoint) 410 + "&startclass=" + encodeURIComponent(startclass) 411 + "&endclass=" + encodeURIComponent(endclass); 412 413 // 隱ュ縺ソ霎シ縺ソ繧「繧、繧ウ繝ウ繧定。ィ遉コ 318 414 switchLoadIcon("view"); 415 // GET繝。繧ス繝�ラ縺ァ謖�ョ壹&繧後◆蝣エ蜷郁。ィ遉コ縺ォ蝠城。後′襍キ縺阪k縺ョ縺ァ荳迸ャ蠕�▲縺ヲ縺九i螳溯。� 319 416 setTimeout(function(){ 417 // ajax縺ァ諠�ア蜿門セ� 320 418 $.ajax({ 419 // 繝。繧ス繝�ラ繧ソ繧、繝玲欠螳� 321 420 type : "GET", 421 // url繧偵そ繝�ヨ 322 422 url : url, 323 // async : false,423 // 繧ソ繧、繝繧「繧ヲ繝医r繧サ繝�ヨ 324 424 timeout : 1000000, 425 // 諠�ア縺悟叙蠕励〒縺阪◆繧� 325 426 success : function(data) { 427 // 邨先棡繝�く繧ケ繝医r繧サ繝�ヨ 326 428 jsontext = data; 429 // 繝代せ縺ョ謠冗判 327 430 view_map(); 431 // 隱ュ縺ソ霎シ縺ソ繧「繧、繧ウ繝ウ繧帝撼陦ィ遉コ 328 432 switchLoadIcon("hide"); 433 // 繝代�繝槭Μ繝ウ繧ッ繝懊ち繝ウ繧呈怏蜉ケ蛹� 329 434 $('.SBPermaLinkButton').attr('disabled', false); 330 435 }, 436 // 蜿門セ励↓螟ア謨励@縺溘i 331 437 error: function(data){ 438 // 隱ュ縺ソ霎シ縺ソ繧「繧、繧ウ繝ウ繧帝撼陦ィ遉コ 332 439 switchLoadIcon("hide"); 440 // 繧ィ繝ゥ繝シ蜀�ョケ繧偵い繝ゥ繝シ繝� 333 441 alert("error: ", data); 334 442 } … … 337 445 }; 338 446 447 // 隕九▽縺九▲縺溘ヱ繧ケ繧貞�縺ヲ謠冗判 339 448 function viewAll(){ 449 // 繝代せ謨ー荳企剞繧�縺ォ 340 450 pathlimit = 0; 451 // 蜀肴緒逕サ 341 452 view_map(); 342 453 } 343 454 455 // SPARQL縺ョ逕滓� 344 456 generateSPARQL = function() { 457 // 驕ク謚槭&繧後◆繝代せ縺ョ繧ェ繝悶ず繧ァ繧ッ繝医rjson譁�ュ怜�縺ォ 345 458 var path = JSON.stringify(pathobj); 346 var url = 'http://www.sparqlbuilder.org/api/sparql?path=' + encodeURIComponent(path); 459 // 諠�ア蜿門セ礼畑API縺ョURL繧剃ス懈��医�繝ャ繝輔ぅ繝�け繧ケ�虐parql�九ヱ繧ケ諠�ア�� 460 var url = prefix + '/sparql?path=' + encodeURIComponent(path); 461 // ajax縺ァ諠�ア蜿門セ� 347 462 $.ajax({ 463 // 繝。繧ス繝�ラ繧ソ繧、繝玲欠螳� 348 464 type: "GET", 465 // url繧偵そ繝�ヨ 349 466 url : url, 467 // 繝��繧ソ繧ソ繧、繝励r謖�ョ� 350 468 dataType: 'text', 351 async: false, 469 // 諠�ア縺悟叙蠕励〒縺阪◆繧� 352 470 success : function(data) { 471 // 邨先棡繧担PARQL陦ィ遉コ逕ィ繧ィ繝ェ繧「縺ォ謖ソ蜈・ 353 472 $(".SBSparqlArea").val(data); 473 // SPARQLbuilder繧帝哩縺倥k 354 474 closeSPARQLBuilder(); 355 475 }