Index: SPARQLBuilderWWW/web/jsgui.html
===================================================================
--- SPARQLBuilderWWW/web/jsgui.html (revision 188)
+++ SPARQLBuilderWWW/web/jsgui.html (revision 194)
@@ -8,8 +8,4 @@
 
 .link {
-  stroke: #999;
-  stroke-opacity: .6;
-}
-.tlink {
   stroke: #999;
   stroke-opacity: .6;
@@ -37,7 +33,7 @@
 </style>
 
-<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+<script type="text/javascript" src="jquery.min.js"></script>
 <script type="text/javascript" src="d3.min.js"></script>
-<!--<script type="text/javascript" src="http://lod.hozo.jp/SparqlFinder/js/template.js" charset="UTF-8"></script>-->
+<script type="text/javascript" src="drawgraph.js"></script>
 <script>
 <!--
@@ -130,723 +126,4 @@
 }
 
-// 謠冗判蜃ｦ逅�
-function view_map(){
-
-	// make_data繝｡繧ｽ繝�ラ縺ｮ邨先棡繧貞叙蠕�
-	var json = make_data(0);
-
-	// SVG縺悟ｭ伜惠縺吶ｋ縺ｪ繧峨�蜑企勁
-	if (d3.select("#graph").select("svg")) {
-		d3.select("#graph").select("svg").remove();
-	}
-
-	if(json['nodes'].length != 0){
-
-		// 蜃ｺ譚･荳翫′縺｣縺溽ｵ先棡繧呈ｸ｡縺励※繝槭ャ繝嶺ｸ翫�繝ｭ繧ｱ繝ｼ繧ｷ繝ｧ繝ｳ繧偵そ繝�ヨ
-		set_map_location(0, json['nodes'], json['links']);
-
-		// SVG縺ｮ蟷�→鬮倥＆繧定ｨｭ螳夲ｼ亥ｹ�ｼ夂判髱｢縺�▲縺ｱ縺�鬮倥＆�壹ヱ繧ｹ縺ｮ謨ｰ縺ｫ蠢懊§險ｭ螳夲ｼ�
-		var width = window.innerWidth;
-		var height = ((NODEHEIGHT * 1.5) * PATHNUM) + (NODEHEIGHT / 2);
-
-		// 繧ｫ繝ｩ繝ｼ繧貞叙蠕�
-		var color = d3.scale.category20();
-
-		// 逕ｻ髱｢繧ｵ繧､繧ｺ縺ｫ蜷医ｏ縺婀VG縺ｮ霑ｽ蜉
-		var svg = d3.select("#graph").append("svg")
-			.attr("width", width)
-			.attr("height", height);
-
-		// 閭梧勹縺ｮ霑ｽ蜉
-		var bg = svg
-			.append("rect")
-			.attr("x", 0)
-			.attr("y", 0)
-			.attr("width", width)
-			.attr("height", height)
-			.attr("fill", "#fafafa");
-
-		// links驟榊�繧呈ｸ｡縺励Μ繝ｳ繧ｯ縺ｮ菴懈�
-		var link = svg.selectAll(".link")
-			.data(json.links)
-			.enter().append("line")
-			.attr("class", "link")
-			.style("stroke-width", function(d) { return Math.sqrt(d.value);});
-
-		// nodes驟榊�繧呈ｸ｡縺励ヮ繝ｼ繝峨�菴懈�
-		var node = svg.selectAll(".node")
-			.data(json.nodes)
-			.enter().append("circle")
-			.attr("class", "node")
-			.attr("r", (NODEHEIGHT / 2))
-			.attr("cx", function(d) { return d.x;} )
-			.attr("cy",  function(d) { return d.y; })
-			.style("stroke", function(d) { return '#fafafa'; })
-			.style("stroke-width", function(d) { return '1.5px'; })
-			.style("fill", function(d) { return color(d.group); })
-			.style("cursor", function(d) { return 'pointer'; });
-
-		// nodes驟榊�繧呈ｸ｡縺励ヮ繝ｼ繝峨ユ繧ｭ繧ｹ繝医�菴懈�
-		var tnode = svg.selectAll("text.node")
-			.data(json.nodes)
-			.enter().append("svg:text")
-			.attr("class", "tnode")
-			.attr("x", function(d) { return d.x; })
-			.attr("y", function(d) { return d.y; })
-			.text(function(d) { return d.name; })
-			.style("fill", function(d) { return '#000000'; })
-			.style("text-anchor", function(d) { return 'middle'; })
-			.style("pointer-events", "none");
-
-		// 繝ｪ繝ｳ繧ｯ繝�く繧ｹ繝医�菴懈�
-		var tlink = svg.selectAll("text.link")
-			.data(json.links)
-			.enter().append("svg:text")
-			.attr("class", "tlink")
-			.attr("x", function(d) { return (json.nodes[d.source].x + json.nodes[d.target].x) / 2; })
-			.attr("y", function(d) { return (json.nodes[d.source].y + json.nodes[d.target].y) / 2; })
-			.style("fill", function(d) { return '#000000'; })
-			.style("text-anchor", function(d) { return 'middle'; });
-
-		// 繝弱�繝峨∈縺ｮ繧ｪ繝ｳ繝槭え繧ｹ縺ｧ繝代せ謗｢邏｢縲√ヱ繧ｹ荳ｭ縺ｮ繝ｪ繝ｳ繧ｯ譁�ｭ励ｒ陦ｨ遉ｺ
-		node.on("mouseover", function(d){
-
-			// 繝槭え繧ｹ縺ｮ蜍輔″繧ｫ繧ｦ繝ｳ繝医ｒ繝ｪ繧ｻ繝�ヨ
-			MOUSEMOVED = 0;
-
-			// 陦ｨ遉ｺ縺吶ｋ繝代せ菫晏ｭ倡畑驟榊�
-			var path = [];
-			// 繝��繝ｫ繝√ャ繝励∈縺ｮ蜷榊燕陦ｨ遉ｺ逕ｨ驟榊�
-			var pathname = [];
-
-			// 繝ｫ繝ｼ繝医ヮ繝ｼ繝我ｻ･螟悶↑繧�
-			if(d.nodeid != 0){
-				// 縺ｾ縺壹が繝ｳ繝槭え繧ｹ縺輔ｌ縺溘ヮ繝ｼ繝峨�id縺ｨ蜷榊燕繧偵◎繧後◇繧瑚ｿｽ蜉
-				path.push(d.nodeid);
-				pathname.push(d.name);
-
-				// 繝代せ謗｢邏｢
-				do{
-					// 繝ｪ繝ｳ繧ｯ縺ｮ謨ｰ縺縺醍ｹｰ繧願ｿ斐＠
-					for(var i = 0; i < link.data().length; i++){
-						// 迴ｾ蝨ｨ縺ｮ譛蠕悟ｰｾ縺ｫ郢九′繧九Μ繝ｳ繧ｯ縺後≠繧後�
-						if(path[(path.length-1)] == link.data()[i].target){
-							// 縺昴�繝ｪ繝ｳ繧ｯ縺ｮ繧ｽ繝ｼ繧ｹ蛛ｴ繝弱�繝峨�id繧定ｿｽ蜉
-							path.push(link.data()[i].source);
-							// 縺昴�繝ｪ繝ｳ繧ｯ縺ｮ蜷榊燕縺ｨ繧ｽ繝ｼ繧ｹ蛛ｴ繝弱�繝峨�蜷榊燕繧定ｿｽ蜉
-							pathname.push(link.data()[i].property);
-							pathname.push(node.data()[link.data()[i].source].name);
-						}
-					}
-				// 繝ｫ繝ｼ繝医ヮ繝ｼ繝峨↓霎ｿ繧顔捩縺上∪縺ｧ郢ｰ繧願ｿ斐☆
-				}while(path[(path.length-1)] != 0);
-
-				// 譛ｫ遶ｯ繝弱�繝峨〒縺ｪ縺�↑繧�
-				if(d.path == "notend"){
-					// 繝��繝ｫ繝√ャ繝励ｒ髱櫁｡ｨ遉ｺ縺ｫ
-					document.getElementById("showpath").style.display = "none";
-				}else{
-					// 譛ｫ遶ｯ繝弱�繝峨↑繧峨ヤ繝ｼ繝ｫ繝√ャ繝励�諠�ｱ繧呈峩譁ｰ
-					var resultText = "<h3>Selected Path</h3>";
-					// 繝代せ縺ｮ蜷榊燕驟榊�蛻�ｾ後ｍ縺九ｉ郢ｰ繧願ｿ斐＠縺ｪ縺後ｉ
-					for (var i = pathname.length;i > 0; i--){
-						// 螂�焚逡ｪ逶ｮ�医ヮ繝ｼ繝峨�蜷榊燕�峨�螟ｪ蟄励↓
-						if(i % 2 == 1){
-							resultText = resultText + "<span style=\"font-weight: bold;\">" + pathname[i - 1] + "</span><br><br>";
-						// 蛛ｶ謨ｰ逡ｪ逶ｮ�医Μ繝ｳ繧ｯ縺ｮ蜷榊燕�峨�縺昴�縺ｾ縺ｾ縺ｧ陦ｨ遉ｺ
-						}else{
-							resultText = resultText + pathname[i - 1] + "<br><br>";
-						}
-					}
-					// 繝��繝ｫ繝√ャ繝励�蜀�ｮｹ繧呈嶌縺肴鋤縺�
-					document.getElementById("selectpath").innerHTML=(resultText);
-					document.getElementById("showpath").style.display = "block";
-
-					// 繧ｵ繝ｼ繝悶Ξ繝�ヨ縺ｫ騾√ｊ霑斐☆繝代せ繧ｪ繝悶ず繧ｧ繧ｯ繝医ｒ菫晏ｭ�
-					pathobj = d.path;
-
-					// 繝��繝ｫ繝√ャ繝苓｡ｨ遉ｺ譎ゅ�蠎ｧ讓呻ｼ医が繝ｳ繝槭え繧ｹ縺輔ｌ縺溘ヮ繝ｼ繝峨�讓ｪ縺ｫ繝懊ち繝ｳ縺梧擂繧九ｈ縺��鄂ｮ��
-					var xPosition = parseFloat(d3.select(this).attr("cx")) + parseFloat(d3.select(this).style("stroke-width")) + (NODEHEIGHT * 0.5);
-					var yPosition = parseFloat(d3.select(this).attr("cy") - document.getElementById("showpath").offsetHeight + document.getElementById("menu").offsetHeight) + (NODEHEIGHT * 0.5);
-
-					// 繝��繝ｫ繝√ャ繝励′逕ｻ髱｢螟悶↓蜃ｺ縺ｪ縺�ｈ縺�｣懈ｭ｣
-					if(xPosition < 0){
-						xPosition = 0;
-					}
-					if(yPosition < 0){
-						yPosition = 0;
-					}
-
-					// 逕滓�縺励◆蠎ｧ讓吶↓繝��繝ｫ繝√ャ繝励ｒ陦ｨ遉ｺ
-					document.getElementById("showpath").style.left = xPosition + "px"
-					document.getElementById("showpath").style.top = yPosition + "px"
-				}
-			// 繝ｫ繝ｼ繝医ヮ繝ｼ繝峨□縺｣縺溘↑繧�
-			}else{
-				// 繝��繝ｫ繝√ャ繝励ｒ髱櫁｡ｨ遉ｺ
-				document.getElementById("showpath").style.display = "none";
-			}
-
-			// 繧ｪ繝ｳ繝槭え繧ｹ縺輔ｌ縺溘ヮ繝ｼ繝峨�鬮倥＆縺ｫ隕ｪ繧貞粋繧上○繧九◆繧√↓蜷医ｏ縺帙ｋ鬮倥＆繧剃ｿ晏ｭ�
-			var movey = d.y;
-
-			// 蜷�ヮ繝ｼ繝峨↓蟇ｾ縺�
-			node
-				// 霈ｪ驛ｭ邱壹�濶ｲ繧定ｨｭ螳�
-				.style("stroke", function(d){
-					// 縺ｾ縺壹�閭梧勹濶ｲ�医ョ繝輔か繝ｫ繝茨ｼ峨ｒ謖�ｮ�
-					var strokecolor = "#fafafa";
-
-					// 繝代せ蛻､螳壹�蜑榊�逅�
-					// 陦ｨ遉ｺ繝輔Λ繧ｰ縺系ow�亥燕蝗槭が繝ｳ繝槭え繧ｹ縺ｧ蜍輔＞縺ｦ縺�◆繝弱�繝会ｼ峨↑繧�
-					if(d.view == "now"){
-						// 繝弱�繝峨�陦ｨ遉ｺ繝輔Λ繧ｰ繧地o縺ｫ
-						d.view = "no";
-					}
-					// 陦ｨ遉ｺ繝輔Λ繧ｰ縺稽oved�医け繝ｪ繝�け縺輔ｌ蝗ｺ螳壽ｸ医∩縺縺悟燕蝗槫虚縺�※縺�◆繝弱�繝会ｼ峨↑繧�
-					if(d.view == "moved"){
-						// 陦ｨ遉ｺ繝輔Λ繧ｰ繧団licked縺ｫ謌ｻ縺�
-						d.view = "clicked";
-					}
-
-					// 陦ｨ遉ｺ繝輔Λ繧ｰ縺系o縺ｮ繧ゅ�縺九ｉ遒ｺ隱�
-					if(d.view == "no"){
-						// 繝代せ縺ｮ繝弱�繝画焚縺縺醍ｹｰ繧願ｿ斐＠縺ｪ縺後ｉ
-						for(var n = 0; n < path.length; n++){
-							// 繝代せ蜀�↓蜷ｫ縺ｾ繧後ｋ繝弱�繝峨□縺｣縺溘ｉ
-							if(path[n] == d.nodeid){
-								// 霈ｪ驛ｭ邱壹ｒ襍､縺ｫ
-								strokecolor = "#ffaaaa";
-								// 陦ｨ遉ｺ繝輔Λ繧ｰ繧地ow�井ｻ雁屓蜍輔＞縺溘ヮ繝ｼ繝会ｼ峨↓
-								d.view = "now";
-							}
-						}
-					// 蝗ｺ螳壽ｸ医∩繝弱�繝峨□縺｣縺溘ｉ
-					}else if(d.view == "clicked"){
-						// 縺ｾ縺壹�霈ｪ驛ｭ邱壹ｒ襍､縺ｫ
-						strokecolor = "#ffaaaa";
-						// 繝代せ蜀�↓蜷ｫ縺ｾ繧後ｋ繝弱�繝峨°繝√ぉ繝�け
-						for(var n = 0; n < path.length; n++){
-							if(path[n] == d.nodeid){
-								// 蜷ｫ縺ｾ繧後※縺�◆縺ｪ繧我ｻ雁屓蜍輔°縺吶◆繧√ヵ繝ｩ繧ｰ繧知oved縺ｫ
-								d.view = "moved";
-							}
-						}
-					}
-
-					// 縺薙％縺ｾ縺ｧ縺ｧ蠕励ｉ繧後◆霈ｪ驛ｭ邱壹�濶ｲ繧定ｿ斐☆
-					return strokecolor;
-				})
-				// 鬮倥＆縺ｮ蛟､
-				.attr("cy", function(d){
-					// 繝弱�繝峨′莉雁屓繧ｪ繝ｳ繝槭え繧ｹ縺輔ｌ縺溘�縺ｾ縺溘�蝗ｺ螳壽ｸ医∩縺縺檎ｧｻ蜍輔ヵ繝ｩ繧ｰ繧偵▽縺代ｉ繧後※縺�ｌ縺ｰ
-					if(d.view == "now" || d.view == "moved"){
-						// 迴ｾ蝨ｨ縺ｮ鬮倥＆繧貞叙蠕�
-						var curty = d.y;
-						// d.y縺ｫ蟄舌ヮ繝ｼ繝峨�鬮倥＆繧偵そ繝�ヨ
-						d.y = movey;
-						// 迴ｾ蝨ｨ縺ｮ鬮倥＆繧定ｿ斐☆�医％縺ｮ譎らせ縺ｧ縺ｯ迴ｾ蝨ｨ菴咲ｽｮ縺ｫ謠冗判縺輔ｌ縲〉edraw髢｢謨ｰ縺ｧd.y縺ｫ繧｢繝九Γ繝ｼ繧ｷ繝ｧ繝ｳ縺輔ｌ繧具ｼ�
-						return curty;
-					// 遘ｻ蜍募ｯｾ雎｡縺ｧ縺ｪ縺�↑繧�
-					}else{
-						// 迴ｾ蝨ｨ菴咲ｽｮ繧偵◎縺ｮ縺ｾ縺ｾ霑斐☆
-						return d.y;
-					}
-				});
-
-			// 蜷�Μ繝ｳ繧ｯ繝�く繧ｹ繝医↓蟇ｾ縺�
-			tlink
-				// 繝�く繧ｹ繝郁｡ｨ遉ｺ蛻､螳�
-				.text(function(d) {
-					// 繝�ヵ繧ｩ繝ｫ繝医〒遨ｺ繧偵そ繝�ヨ
-					var linktext = "";
-					// 陦ｨ遉ｺ繝輔Λ繧ｰ縺系ow�亥燕蝗櫁｡ｨ遉ｺ縺輔ｌ縺ｦ縺�◆繝ｪ繝ｳ繧ｯ�峨↑繧�
-					if(d.view == "now"){
-						// 陦ｨ遉ｺ繝輔Λ繧ｰ繧定ｧ｣髯､
-						d.view = "no";
-					}
-
-					// 陦ｨ遉ｺ繝輔Λ繧ｰ縺系o縺ｪ繧�
-					if(d.view == "no"){
-						// 繝代せ縺ｮ繝弱�繝画焚蛻�ｹｰ繧願ｿ斐＠
-						for(var t = 0; t < path.length; t++){
-							// 閾ｪ霄ｫ縺後◎縺ｮ繝弱�繝峨∈謗･邯壹＠縺ｦ縺�ｋ繝ｪ繝ｳ繧ｯ�医°縺､縺昴�繝弱�繝峨′謚倥ｊ縺溘◆縺ｾ繧後※縺�↑縺代ｌ縺ｰ��
-							if(path[t] == d.target && node.data()[d.target].view != "hide"){
-								// 繝ｪ繝ｳ繧ｯ繝�く繧ｹ繝医↓繝励Ο繝代ユ繧｣縺ｮ蛟､繧偵そ繝�ヨ
-								linktext = d.property
-								// 陦ｨ遉ｺ繝輔Λ繧ｰ縺ｫnow繧偵そ繝�ヨ
-								d.view = "now";
-							}
-						}
-					// 陦ｨ遉ｺ繝輔Λ繧ｰ縺掲ix�医け繝ｪ繝�け縺輔ｌ縺溘ヱ繧ｹ縺ｮ繝ｪ繝ｳ繧ｯ�峨↑繧峨��医°縺､郢九′繧句�縺ｮ繝弱�繝峨′謚倥ｊ縺溘◆縺ｾ繧後※縺�↑縺代ｌ縺ｰ��
-					}else if(d.view == "fix" && node.data()[d.target].view != "hide"){
-						// 繝ｪ繝ｳ繧ｯ繝�く繧ｹ繝医↓繝励Ο繝代ユ繧｣縺ｮ蛟､繧偵そ繝�ヨ
-						linktext = d.property
-					}
-					// 縺薙％縺ｾ縺ｧ縺ｧ縺ｧ縺阪◆繝ｪ繝ｳ繧ｯ繝�く繧ｹ繝医ｒ霑斐☆
-					return linktext;
-				});
-
-			// 蜷�Μ繝ｳ繧ｯ縺ｫ蟇ｾ縺�
-			link
-				// 邱壹�濶ｲ蛻､螳�
-				.style("stroke", function(d){
-					// 陦ｨ遉ｺ繝輔Λ繧ｰ縺系o縺ｪ繧峨�
-					if(d.view == "no"){
-						// 濶ｲ繧偵ョ繝輔か繝ｫ繝医↓
-						return "#999";
-					// 縺昴ｌ莉･螟厄ｼ亥崋螳壹ｄ繧ｪ繝ｳ繝槭え繧ｹ縺輔ｌ縺溘ヱ繧ｹ縺ｫ蜷ｫ縺ｾ繧後ｋ�峨↑繧�
-					}else{
-						// 濶ｲ繧定ｵ､縺ｫ
-						return "#ffaaaa";
-					}
-				});
-
-			// 縺薙％縺ｾ縺ｧ縺ｮ險ｭ螳壹ｒ蜈�↓蜀肴緒逕ｻ
-			redraw();
-
-		// 繝弱�繝峨∈縺ｮ繧ｯ繝ｪ繝�け縺ｧ驕ｸ謚槫崋螳壼喧�亥所縺ｳ謚倥ｊ逡ｳ縺ｿ蜃ｦ逅�ｼ�
-		}).on("click", function(d){
-
-			// 蜷�ヮ繝ｼ繝峨↓蟇ｾ縺�
-			node
-				// 霈ｪ驛ｭ邱壹�蛻､螳�
-				.style("stroke", function(d) {
-					// 繝�ヵ繧ｩ繝ｫ繝医�濶ｲ繧偵そ繝�ヨ
-					var strokecolor = "#fafafa"
-					// 陦ｨ遉ｺ繝輔Λ繧ｰ縺後が繝ｳ繝槭え繧ｹ荳ｭ繝ｻ蝗ｺ螳壻ｸｭ繝ｻ遘ｻ蜍穂ｸｭ�磯∈謚槭＆繧後※縺�ｋ繝弱�繝会ｼ峨↑繧峨�
-					if(d.view == "now" || d.view == "clicked" || d.view == "moved"){
-						// 濶ｲ繧定ｵ､縺ｫ
-						strokecolor = "#ffaaaa"
-						// 陦ｨ遉ｺ繝輔Λ繧ｰ繧貞崋螳壻ｸｭ縺ｫ
-						d.view = "clicked";
-					}
-					// 縺薙％縺ｾ縺ｧ縺ｧ縺ｧ縺阪◆濶ｲ繧定ｿ斐☆
-					return strokecolor;
-				});
-
-			// 縺薙％縺九ｉ蟄舌ヮ繝ｼ繝峨�逡ｳ縺ｿ霎ｼ縺ｿ蜃ｦ逅�ｼ育樟蝨ｨ縺ｯ蟒�ｭ｢縲∝ｿｵ縺ｮ縺溘ａ繧ｳ繝ｼ繝峨�谿九＠縺ｦ縺翫￥��
-			/*
-			var childs = [];
-			var prevchilds = [];
-			prevchilds.push(d.nodeid);
-
-			//
-			do{
-				var tmpchilds = [];
-				var curchilds = [];
-				for(var p = 0; p < prevchilds.length; p++){
-					tmpchilds = get_children(prevchilds[p], json['links']);
-					curchilds = curchilds.concat(tmpchilds);
-				}
-				prevchilds = curchilds;
-				childs = childs.concat(curchilds);
-
-			}while(curchilds.length != 0);
-
-			var childy = d.y;
-			for(var c = 0; c < childs.length; c++){
-				if(node.data()[childs[c]].y < childy){
-					childy = node.data()[childs[c]].y;
-				}
-			}
-
-			d.y = childy;
-
-			var maxdy = 0;
-			var mindy = 0;
-
-			for(var c = 0; c < childs.length; c++){
-				if(node.data()[childs[c]].view != "hide"){
-					var dy = node.data()[childs[c]].y - d.y;
-					if(dy > maxdy){
-						maxdy = dy;
-					}
-					node.data()[childs[c]].x = d.x;
-					node.data()[childs[c]].y = d.y;
-					node.data()[childs[c]].dy = dy;
-					node.data()[childs[c]].view = "hide";
-					node.data()[childs[c]].hideparent = d.nodeid;
-				}else{
-					if(node.data()[childs[c]].hideparent == d.nodeid){
-						node.data()[childs[c]].x = d.x + (TREESPACE * (node.data()[childs[c]].group - d.group));
-						node.data()[childs[c]].y = node.data()[childs[c]].y + node.data()[childs[c]].dy;
-						if(-node.data()[childs[c]].dy < mindy){
-							mindy = -node.data()[childs[c]].dy;
-						}
-						node.data()[childs[c]].view = "appear";
-						node.data()[childs[c]].hideparent = -1;
-					}
-				}
-			}
-
-			node
-			.attr("r", function(d){
-				if(d.view == "appear"){
-					d.view = "no";
-				}else if(d.y > childy){
-					d.y = d.y - maxdy - mindy;
-				}
-				if(d.view == "hide"){
-					d.x = node.data()[d.hideparent].x;
-					d.y = node.data()[d.hideparent].y;
-				}
-				if(d.nodeid == 0){
-					d.y = childy;
-				}
-				return (NODEHEIGHT / 2);
-			});
-			*/
-
-			// 蜷�Μ繝ｳ繧ｯ縺ｫ蟇ｾ縺�
-			tlink
-				// 繝�く繧ｹ繝郁｡ｨ遉ｺ蛻､螳�
-				.text(function(d) {
-					// 繝�ヵ繧ｩ繝ｫ繝医〒遨ｺ縺ｫ
-					var linktext = "";
-					// 陦ｨ遉ｺ繝輔Λ繧ｰ縺檎樟蝨ｨ陦ｨ遉ｺ荳ｭ縺ｾ縺溘�蝗ｺ螳壼喧貂医∩縺ｪ繧峨��医°縺､謚倥ｊ逡ｳ縺ｿ荳ｭ縺ｧ縺ｪ縺代ｌ縺ｰ��
-					if((d.view == "now" || d.view == "fix") && (node.data()[d.target].view != "hide")){
-						// 繝ｪ繝ｳ繧ｯ繝�く繧ｹ繝医↓繝励Ο繝代ユ繧｣縺ｮ蛟､繧偵そ繝�ヨ
-						linktext = d.property
-						// 陦ｨ遉ｺ繝輔Λ繧ｰ繧貞崋螳壻ｸｭ縺ｫ
-						d.view = "fix";
-					}
-					// 繝�く繧ｹ繝医ｒ霑斐☆
-					return linktext;
-				});
-
-			// 縺薙％縺ｾ縺ｧ縺ｮ蜃ｦ逅�ｵ先棡繧貞�縺ｫ蜀肴緒逕ｻ
-			redraw();
-
-		});
-
-		// 蜀肴緒逕ｻ髢｢謨ｰ
-		var redraw = function (duration){
-
-			// 縺九￠繧区凾髢薙′譛ｪ謖�ｮ壹↑繧峨�
-			if(duration == undefined){
-				// 0.5遘偵°縺代※繧｢繝九Γ繝ｼ繧ｷ繝ｧ繝ｳ
-				duration = 500;
-			}
-
-			// 蜷�Μ繝ｳ繧ｯ縺ｫ縺､縺�※險ｭ螳壹＆繧後◆菴咲ｽｮ縺ｫ蜀肴緒逕ｻ
-			link
-				.transition()
-				.duration(duration)
-				.attr("x1", function(d) {return node.data()[d.source].x;})
-				.attr("y1", function(d) {return node.data()[d.source].y;})
-				.attr("x2", function(d) {return node.data()[d.target].x;})
-				.attr("y2", function(d) {return node.data()[d.target].y;});
-
-			// 蜷�Μ繝ｳ繧ｯ繝�く繧ｹ繝医↓縺､縺�※險ｭ螳壹＆繧後◆菴咲ｽｮ縺ｫ蜀肴緒逕ｻ
-			tlink
-				.transition()
-				.duration(duration)
-				.attr("x", function(d) {return (node.data()[d.source].x + node.data()[d.target].x) / 2;})
-				.attr("y", function(d) {return ((node.data()[d.source].y + node.data()[d.target].y) / 2) + 5;});
-
-			// 蜷�ヮ繝ｼ繝峨↓縺､縺�※險ｭ螳壹＆繧後◆菴咲ｽｮ縺ｫ蜀肴緒逕ｻ�医°縺､謚倥ｊ縺溘◆縺ｾ繧御ｸｭ縺ｮ蝣ｴ蜷医�謠冗判蛻�ｲ仙�逅�ｼ�
-			node
-				.transition()
-				.duration(duration)
-				.attr("cx", function(d) {return d.x;})
-				.attr("cy", function(d) {return d.y;})
-				.style("opacity", function(d){
-					var opa = 1.0;
-					if(d.view == "hide"){
-						opa = 0.0;
-					}
-					return opa;
-				})
-				.style("fill", function(d) {
-					var fcolor = color(d.group);
-
-					for(var n = 0; n < node.data().length; n++){
-						if(d.nodeid == node.data()[n].hideparent){
-							fcolor = "ffaaaa";
-						}
-					}
-					return fcolor;
-				})
-				.style("pointer-events", function(d){
-					var pe = "auto";
-					if(d.view == "hide"){
-						pe = "none";
-					}
-					return pe;
-				});
-
-			// 蜷�ヮ繝ｼ繝峨ユ繧ｭ繧ｹ繝医↓縺､縺�※險ｭ螳壹＆繧後◆菴咲ｽｮ縺ｫ蜀肴緒逕ｻ縲√ユ繧ｭ繧ｹ繝域緒逕ｻ菴咲ｽｮ繧剃ｸ贋ｸ九↓謖ｯ繧具ｼ医°縺､謚倥ｊ縺溘◆縺ｾ繧御ｸｭ縺ｮ蝣ｴ蜷医�謠冗判蛻�ｲ仙�逅�ｼ�
-			tnode
-			.transition()
-			.duration(duration)
-			.attr("x", function(d) {return d.x;})
-			.attr("y", function(d) {
-				// 繝�ヵ繧ｩ繝ｫ繝医〒蟆代＠荳九￡繧�
-				var updown = (NODEHEIGHT * 0.4);
-				// 螂�焚逡ｪ逶ｮ縺ｮ豺ｱ縺輔↑繧牙ｰ代＠荳翫￡繧�
-				if(d.group % 2 == 1){
-					updown = -(NODEHEIGHT * 0.2);
-				}
-				// 縺昴�蛟､繧帝ｫ倥＆縺ｫ霑斐☆縺薙→縺ｧ繝�く繧ｹ繝域緒逕ｻ菴咲ｽｮ縺御ｺ偵＞驕輔＞縺ｫ縺ｪ繧�
-				return d.y + updown;
-			})
-			// 謚倥ｊ逡ｳ縺ｿ迥ｶ諷九↑繧峨ユ繧ｭ繧ｹ繝郁｡ｨ遉ｺ繧呈ｶ医☆
-			.text(function(d){
-				var nodetext = d.name
-				if(d.view == "hide"){
-					nodetext = "";
-				}
-				return nodetext;
-			});
-
-		};
-
-		// 閭梧勹驛ｨ蛻�′繧ｯ繝ｪ繝�け縺輔ｌ縺溘ｉ陦ｨ遉ｺ縺ｮ蝗ｺ螳壼喧繧定ｧ｣髯､
-		bg.on("click", function() {
-			// 繝��繝ｫ繝√ャ繝励ｒ髱櫁｡ｨ遉ｺ
-			document.getElementById("showpath").style.display = "none";
-			d3.selectAll(".node").style("stroke-width", function(d) { return '1.5px'; });
-			d3.selectAll(".node").style("stroke", function(d) { return '#ffffff'; });
-
-			// 蜷�ヮ繝ｼ繝峨�霈ｪ驛ｭ邱壹�濶ｲ繧偵ョ繝輔か繝ｫ繝医↓
-			node
-				.style("stroke", function(d){
-					if(d.view != "hide"){
-						d.view = "no";
-					}
-					return "#fafafa";
-				});
-
-			// 繝ｪ繝ｳ繧ｯ繝�く繧ｹ繝医ｒ蜈ｨ縺ｦ遨ｺ縺ｫ
-			tlink
-				.text(function(d) {
-					d.view = "no";
-					return "";
-				});
-
-			// 繝ｪ繝ｳ繧ｯ縺ｮ濶ｲ繧貞�縺ｦ繝�ヵ繧ｩ繝ｫ繝医↓
-			link
-				.style("stroke", function(d){
-					return "#999";
-				});
-
-		});
-
-		// 閭梧勹荳翫〒繝槭え繧ｹ縺悟虚縺上＃縺ｨ縺ｫ
-		bg.on("mousemove", function(){
-			// MOUSEMOVED繧定ｿｽ蜉�医ヮ繝ｼ繝峨↓繧ｪ繝ｳ繝槭え繧ｹ縺輔ｌ繧句ｺｦ縺ｫ繧ｫ繧ｦ繝ｳ繝医Μ繧ｻ繝�ヨ��
-			MOUSEMOVED++;
-			// 30繧定ｶ�∴縺溘ｉ
-			if(MOUSEMOVED > 30){
-				// 繝��繝ｫ繝√ャ繝励ｒ髱櫁｡ｨ遉ｺ縺ｫ縺励※繧ｫ繧ｦ繝ｳ繝医Μ繧ｻ繝�ヨ
-				document.getElementById("showpath").style.display = "none";
-				MOUSEMOVED = 0;
-			}
-		});
-
-		// 蛻晏屓縺ｮ縺ｿduration繧�縺ｨ謖�ｮ壹＠蜀肴緒逕ｻ�医い繝九Γ繝ｼ繧ｷ繝ｧ繝ｳ縺ｪ縺暦ｼ�
-		redraw(0);
-	}
-}
-
-// 繝��繧ｿ縺ｮ菴懈�繝｡繧ｽ繝�ラ
-function make_data(tdepth, ret, parent, depth){
-	// ret縺梧悴螳夂ｾｩ縺ｪ繧峨�螳夂ｾｩ縺励※莉｣蜈･
-	if (ret == undefined){
-		ret = new Object();
-		ret['nodes'] = new Array();
-		ret['links'] = new Array();
-	}
-
-	PATHNUM = 0;
-	MAXDEPTH = 0;
-	TREESPACE = 0;
-	DRAWHEIGHT = NODEHEIGHT;
-
-	var viewnum;
-
-	var obj = JSON.parse(jsontext);
-
-	document.getElementById("resultmessage").style.color = "black";
-	document.getElementById("resultmessage").style.fontWeight = "normal";
-
-	document.getElementById("plural").innerHTML = "s";
-
-	if(obj['paths'].length == 0){
-		document.getElementById("resultmessage").style.color = "red";
-		document.getElementById("resultmessage").style.fontWeight = "bold";
-		document.getElementById("plural").innerHTML = "";
-	}else if(obj['paths'].length == 1){
-		document.getElementById("plural").innerHTML = "";
-	}
-
-	if(obj['paths'].length <= 10){
-		viewnum = obj['paths'].length;
-		document.getElementById("viewall").style.display = "none";
-	}else if(pathlimit == 10){
-		viewnum = 10;
-		document.getElementById("viewall").style.display = "block";
-	}else{
-		viewnum = obj['paths'].length;
-		document.getElementById("viewall").style.display = "none";
-	}
-
-	document.getElementById("pathnum").innerHTML = obj['paths'].length;
-	document.getElementById("resultmessage").style.display = "block";
-
-	// obj繝医ャ繝鈴嚴螻､縺ｮ謨ｰ縺縺醍ｹｰ繧願ｿ斐＠縺ｪ縺後ｉ
-	for(var i = 0; i < viewnum; i++){
-		if(i == 0){
-			// 蛻晏屓縺縺代Ν繝ｼ繝医ヮ繝ｼ繝峨ｒ繝励ャ繧ｷ繝･
-			ret['nodes'].push({'name': obj['paths'][0]['startClassLabel'], 'uri': obj['paths'][0]['startClassURI'], 'group': 0, 'x':50, 'y':50, 'nodeid':ret['nodes'].length, 'view' : 'no', 'path': 'notend'});
-		}
-		// 蜈医↓source縺ｫ0�医Ν繝ｼ繝茨ｼ峨ｒ莉｣蜈･
-		var source = 0;
-		// 蜈ｱ騾壹Ν繝ｼ繝亥愛螳壹ｒtrue縺ｫ
-		var isCommon = true;
-
-		// classLinks縺ｮ謨ｰ縺縺醍ｹｰ繧願ｿ斐＠縺ｪ縺後ｉ
-		for(var j = 0;j < obj['paths'][i]['classLinks'].length; j++){
-
-			// 繝ｪ繝ｳ繧ｯ縺ｮ蜷榊燕繧旦RL譛ｫ蟆ｾ縺九ｉ蜿門ｾ�
-			var propertytext = obj['paths'][i]['classLinks'][j]['propertyURI'];
-			var propertysplit1 = propertytext.split("/");
-			var propertysplit2 = propertysplit1[propertysplit1.length - 1];
-			var propertysplit3 = propertysplit2.split("#");
-			propertytext = propertysplit3[propertysplit3.length - 1];
-
-			if(MAXDEPTH < j+1){
-				MAXDEPTH = j+1;
-			}
-			// 縺薙％縺ｾ縺ｧ蜈ｱ騾壹Ν繝ｼ繝医↑繧�
-			if(isCommon){
-				// 莉雁屓繧ょ�騾壹°遒ｺ隱阪☆繧九◆繧√�繝輔Λ繧ｰ
-				var isCommonNow = false;
-				// nodes驟榊�縺ｫ蜷後§linkedClass縺梧里縺ｫ縺ゅｋ縺狗｢ｺ隱�
-				var targets = [];
-				for(var k = 0; k < ret['nodes'].length; k++){
-					// 蜷碁嚴螻､縺九▽蜷後§蜷榊燕縺ｮ繧ゅ�縺後≠縺｣縺溘ｉtargets驟榊�縺ｫ逡ｪ蜿ｷ繧定ｿｽ蜉
-					if(ret['nodes'][k]['group'] == (j+1) && obj['paths'][i]['classLinks'][j]['linkedClassURI'] == ret['nodes'][k]['uri']){
-						targets.push(k);
-					}
-				}
-
-				// 譌｢縺ｫ縺ゅ▲縺溷ｴ蜷医�links驟榊�縺ｫ蜷後§link縺悟ｭ伜惠縺吶ｋ縺狗｢ｺ隱�
-				if(targets.length != 0){
-					// 蜈医⊇縺ｩ隕九▽縺代◆targets縺ｮ謨ｰ縺縺醍ｹｰ繧願ｿ斐＠縺ｪ縺後ｉ
-					for(var l = 0; l <targets.length; l++){
-						// links驟榊�縺ｫ蜈ｨ縺丞酔縺俶擅莉ｶ縺ｮ繧ゅ�縺後≠繧九°遒ｺ隱�
-						for(var m = 0; m < ret['links'].length; m++){
-							// 縺ゅ▲縺溷ｴ蜷井ｻ雁屓縺ｮ繧ゅ�縺ｯ霑ｽ蜉縺帙★source繧呈峩譁ｰ縺励※谺｡縺ｸ
-							if(ret['links'][m]['source'] == source && ret['links'][m]['target'] == targets[l] && ret['links'][m]['uri'] == obj['paths'][i]['classLinks'][j]['propertyURI'] && !isCommonNow){
-								// 蜈ｱ騾壹Ν繝ｼ繝医ヵ繝ｩ繧ｰ繧偵が繝ｳ
-								isCommonNow = true;
-								source = targets[l];
-							}
-						}
-					}
-
-					// 蜷дarget繧堤｢ｺ隱阪＠縺ｦ蜈ｱ騾壹Ν繝ｼ繝医〒縺ｯ縺ｪ縺九▲縺溷ｴ蜷域眠隕剰ｿｽ蜉
-					if(!isCommonNow){
-						isCommon = false;
-						ret['nodes'].push({'name': obj['paths'][i]['classLinks'][j]['nodeLabel'], 'uri': obj['paths'][i]['classLinks'][j]['linkedClassURI'], 'group': (j+1), 'x':0, 'y':0, 'dy':0, 'nodeid':ret['nodes'].length, 'view' : 'no', 'path': 'notend'});
-						ret['links'].push({'source':source, 'target':ret['nodes'].length - 1, 'value':5, 'property': propertytext, 'uri': obj['paths'][i]['classLinks'][j]['propertyURI'], 'view' : 'no'});
-						source = ret['nodes'].length - 1;
-					}
-
-				// 縺ｪ縺九▲縺溷ｴ蜷医�蛻･譚｡莉ｶ縺ｪ縺ｮ縺ｧ譁ｰ隕剰ｿｽ蜉縺励※谺｡縺ｸ
-				}else{
-
-					isCommon = false;
-					ret['nodes'].push({'name': obj['paths'][i]['classLinks'][j]['nodeLabel'], 'uri': obj['paths'][i]['classLinks'][j]['linkedClassURI'], 'group': (j+1), 'x':0, 'y':0, 'dy':0, 'nodeid':ret['nodes'].length, 'view' : 'no', 'path': 'notend'});
-					ret['links'].push({'source':source, 'target':ret['nodes'].length - 1, 'value':5, 'property': propertytext, 'uri': obj['paths'][i]['classLinks'][j]['propertyURI'], 'view' : 'no'});
-					source = ret['nodes'].length - 1;
-				}
-			// 譌｢縺ｫ蜈ｱ騾壹Ν繝ｼ繝医〒縺ｪ縺�↑繧画眠隕剰ｿｽ蜉縺励※谺｡縺ｸ
-			}else{
-				ret['nodes'].push({'name': obj['paths'][i]['classLinks'][j]['nodeLabel'], 'uri': obj['paths'][i]['classLinks'][j]['linkedClassURI'], 'group': (j+1), 'x':0, 'y':0, 'dy':0, 'nodeid':ret['nodes'].length, 'view' : 'no', 'path': 'notend'});
-				ret['links'].push({'source':source, 'target':ret['nodes'].length - 1, 'value':5, 'property': propertytext, 'uri': obj['paths'][i]['classLinks'][j]['propertyURI'], 'view' : 'no'});
-				source = ret['nodes'].length - 1;
-			}
-
-		}
-		ret['nodes'][ret['nodes'].length - 1]['path'] = obj['paths'][i];
-		PATHNUM++;
-	}
-	TREESPACE = (window.innerWidth - 200) / (MAXDEPTH + 1);
-
-	// 縺ｧ縺阪◆邨先棡繧定ｿ斐☆
-	return ret;
-}
-
-// 逕滓�縺輔ｌ縺溘ョ繝ｼ繧ｿ縺ｮ螳滄圀縺ｮ繝ｭ繧ｱ繝ｼ繧ｷ繝ｧ繝ｳ繧定ｨ育ｮ励☆繧九Γ繧ｽ繝�ラ�亥�蝗槭�myNodeIndex縺�縲］odes縺ｫ逕滓�縺輔ｌ縺殤odes驟榊�縲〕inks縺ｫ逕滓�縺輔ｌ縺殕inks驟榊�縺梧ｸ｡縺輔ｌ繧具ｼ�
-function set_map_location(myNodeIndex, nodes, links, depth, fromAngle, toAngle){
-
-	// depth縺梧悴螳夂ｾｩ縺ｪ繧峨�0繧偵そ繝�ヨ
-	if (depth == undefined){
-		depth = 0;
-	}
-
-	// 蜷�ｨｮ蛻晄悄蛹�
-	var children = undefined;
-	var parent = undefined;
-	var parentsChildren = undefined;
-
-	// links驟榊�縺ｮ謨ｰ縺縺醍ｹｰ繧願ｿ斐＠縺ｪ縺後ｉ
-	for (var i=0; i<links.length; i++){
-		// 縺昴�links縺ｮtarget縺稽yNodeIndex縺ｪ繧英arent繧偵そ繝�ヨ
-		if (links[i].target == myNodeIndex){
-			parent = links[i].source;
-		}
-	}
-
-	// parent縺瑚ｦ九▽縺九▲縺ｦ縺�◆縺ｪ繧峨�
-	if (parent != undefined){
-		// parent縺ｨlinks繧呈ｸ｡縺揚et_children繝｡繧ｽ繝�ラ繧貞ｮ溯｡�
-		parentsChildren = get_children(parent, links);
-	}
-
-	if(myNodeIndex != 0){
-		DRAWHEIGHT += (NODEHEIGHT * 1.5);
-		var x = (depth * TREESPACE) + (TREESPACE / 3);
-		var y = DRAWHEIGHT;
-		nodes[myNodeIndex].x = x;
-		nodes[myNodeIndex].y = y;
-	}else{
-		var x = TREESPACE / 2;
-		var y = (NODEHEIGHT * 1.5) * ((PATHNUM - 1) / 2) + NODEHEIGHT;
-		nodes[myNodeIndex].x = x;
-		nodes[myNodeIndex].y = y;
-	}
-
-	children = get_children(myNodeIndex, links);
-
-	for (var i=0; i<children.length; i++){
-		if(i == 0){
-			DRAWHEIGHT -= (NODEHEIGHT * 1.5);
-		}
-		var child = children[i];
-		set_map_location(child, nodes, links, depth+1, fromAngle + ((toAngle - fromAngle) / children.length) * i, fromAngle + ((toAngle - fromAngle) / children.length) * (i+1));
-	}
-
-}
-
-// 謖�ｮ壹＆繧後◆隕ｪ縺梧戟縺､蟄舌ｒ霑斐☆
-function get_children(index, links){
-	var children = new Array();
-	// links縺ｮ謨ｰ縺縺醍｢ｺ隱阪＠縺ｪ縺後ｉ
-	for (var i=0; i<links.length; i++){
-		// 隕ｪ縺梧ｸ｡縺輔ｌ縺溯ｦｪ縺ｨ荳閾ｴ縺吶ｋ譎ゅ�蟄舌ｒ霑ｽ蜉
-		if (links[i].source == index){
-			children.push(links[i].target);
-		}
-	}
-	return children;
-}
-
-// ZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZN
-// ZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZNZN
-
 function setEndpoints(ep){
 	for (var i = 0; i < ep.length; i++){
@@ -877,6 +154,6 @@
 			$("*[name=endclass] option").remove();
 			for (var i = 0; i < epclass.length; i++){
-				$("*[name=startclass]").append('<option value="' + epclass[i] + '">' + epclass[i]);
-				$("*[name=endclass]").append('<option value="' + epclass[i] + '">' + epclass[i]);
+				$("*[name=startclass]").append('<option value="' + epclass[i]["uri"] + '">' + epclass[i]{"display"});
+				$("*[name=endclass]").append('<option value="' + epclass[i]["uri"] + '">' + epclass[i]["display"]);
 			}
 			ajaxload("hide");
