Index: /SPARQLBuilderWWW/web/jsgui.html
===================================================================
--- /SPARQLBuilderWWW/web/jsgui.html (revision 151)
+++ /SPARQLBuilderWWW/web/jsgui.html (revision 156)
@@ -64,5 +64,5 @@
 
 
-var pathname = [];
+var pathobj = [];
 var PATHNUM = 0;
 var MAXDEPTH = 0;
@@ -214,5 +214,5 @@
 
 			var path = [];
-			pathname = [];
+			var pathname = [];
 
 			if(d.nodeid != 0){
@@ -239,4 +239,5 @@
 				document.getElementById("selectpath").innerHTML=(resultText);
 
+				/*
 				if(d.group > (MAXDEPTH - 2)){
 					document.getElementById("getsparqlbutton").style.display = "block";
@@ -244,18 +245,26 @@
 					document.getElementById("getsparqlbutton").style.display = "none";
 				}
-
-				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"
-				document.getElementById("showpath").style.display = "block";
+				*/
+
+				if(d.path == "notend"){
+					document.getElementById("showpath").style.display = "none";
+				}else{
+
+					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"
+					document.getElementById("showpath").style.display = "block";
+				}
 
 			}else{
@@ -507,9 +516,13 @@
 		})
 		.text(function(d){
-			var nt = d.name;
+			var nodetext = d.name
+			var nodesplit1 = nodetext.split("/");
+			var nodesplit2 = nodesplit1[nodesplit1.length - 1];
+			var nodesplit3 = nodesplit2.split("#");
+			nodetext = nodesplit3[nodesplit3.length - 1];
 			if(d.view == "hide"){
-				nt = "";
-			}
-			return nt;
+				nodetext = "";
+			}
+			return nodetext;
 		});
 
@@ -574,5 +587,5 @@
 		if(i == 0){
 			// 蛻晏屓縺縺代Ν繝ｼ繝医ヮ繝ｼ繝峨ｒ繝励ャ繧ｷ繝･
-			ret['nodes'].push({'name':obj['paths'][0]['startClassURI'], 'group': 0, 'x':50, 'y':50, 'nodeid':ret['nodes'].length, 'view' : 'no'});
+			ret['nodes'].push({'name':obj['paths'][0]['startClassURI'], 'group': 0, 'x':50, 'y':50, 'nodeid':ret['nodes'].length, 'view' : 'no', 'path': 'notend'});
 		}
 		// 蜈医↓source縺ｫ0�医Ν繝ｼ繝茨ｼ峨ｒ莉｣蜈･
@@ -618,5 +631,5 @@
 					if(!isCommonNow){
 						isCommon = false;
-						ret['nodes'].push({'name':obj['paths'][i]['classLinks'][j]['linkedClassURI'], 'group': (j+1), 'x':0, 'y':0, 'dy':0, 'nodeid':ret['nodes'].length, 'view' : 'no'});
+						ret['nodes'].push({'name':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':obj['paths'][i]['classLinks'][j]['propertyURI'], 'view' : 'no'});
 						source = ret['nodes'].length - 1;
@@ -627,5 +640,5 @@
 
 					isCommon = false;
-					ret['nodes'].push({'name':obj['paths'][i]['classLinks'][j]['linkedClassURI'], 'group': (j+1), 'x':0, 'y':0, 'dy':0, 'nodeid':ret['nodes'].length, 'view' : 'no'});
+					ret['nodes'].push({'name':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':obj['paths'][i]['classLinks'][j]['propertyURI'], 'view' : 'no'});
 					source = ret['nodes'].length - 1;
@@ -633,5 +646,5 @@
 			// 譌｢縺ｫ蜈ｱ騾壹Ν繝ｼ繝医〒縺ｪ縺�↑繧画眠隕剰ｿｽ蜉縺励※谺｡縺ｸ
 			}else{
-				ret['nodes'].push({'name':obj['paths'][i]['classLinks'][j]['linkedClassURI'], 'group': (j+1), 'x':0, 'y':0, 'dy':0, 'nodeid':ret['nodes'].length, 'view' : 'no'});
+				ret['nodes'].push({'name':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':obj['paths'][i]['classLinks'][j]['propertyURI'], 'view' : 'no'});
 				source = ret['nodes'].length - 1;
@@ -639,4 +652,5 @@
 
 		}
+		ret['nodes'][ret['nodes'].length - 1]['path'] = obj['paths'][i];
 		PATHNUM++;
 	}
@@ -814,5 +828,6 @@
 function getSPARQL(){
 
-	var selectpath = JSON.stringify(pathname);
+	var selectpath = JSON.stringify(pathobj);
+
 	//document.getElementById("selectpath").innerHTML=(resultText);
 
