チェンジセット 169 : SPARQLBuilderWWW/web/jsgui.html

差分発生行の前後
無視リスト:
更新日時:
2014/09/25 17:16:50 (10 年 前)
更新者:
lenz
ログメッセージ:

ノードに表示する名前をJSONから取得する形に変更
(JSON生成時点でラベルがあればラベルに、なければURIの短縮をセットしてある)

ファイル:
1 変更

凡例:

変更なし
追加
削除
  • SPARQLBuilderWWW/web/jsgui.html

    r156 r169  
    6464 
    6565 
     66// 騾√i繧後◆繝代せ縺ョ菫晏ュ伜� 
     67var jsontext = ""; 
     68// 霑斐☆繝代せ縺ョ繧ェ繝悶ず繧ァ繧ッ繝� 
    6669var pathobj = []; 
     70 
     71// 騾√i繧後◆繝代せ縺ョ謨ー 
    6772var PATHNUM = 0; 
     73// 騾√i繧後◆繝代せ縺ョ譛€螟ァ豺ア縺� 
    6874var MAXDEPTH = 0; 
     75// 繝代せ縺ョ繝弱�繝蛾俣菴咏區 
    6976var TREESPACE = 0; 
     77// 繝代せ髢薙�荳贋ク倶ス咏區 
    7078var DRAWHEIGHT = 0; 
     79// 繝弱�繝峨�螟ァ縺阪& 
    7180var NODEHEIGHT = 50; 
     81// 繝��繝ォ繝√ャ繝励r髫縺吶◆繧√�蜍輔″蛻、螳夂畑 
    7282var MOUSEMOVED = 0; 
    73 var jsontext = ""; 
    74 var DURATION = 0; 
    7583 
    7684 
     
    7886$(window).load(function() { 
    7987 
     88        // 荳企Κ繝。繝九Η繝シ縺ョ蟷�シ育判髱「繧オ繧、繧コ縺ィ蜷後§�� 
    8089        var menuwidth = window.innerWidth + "px"; 
     90        // 荳企Κ繝。繝九Η繝シ蟾ヲ蛛エ驛ィ蛻�シ亥�蜉帶ャ�シ峨�繧オ繧、繧コ 
    8191        var inputswidth = ((window.innerWidth - 100) / 2) + "px"; 
     92        // 縺昴l縺槭l縺ォ繧サ繝�ヨ 
    8293        document.getElementById("menu").style.width = menuwidth; 
    8394        document.endpoint.inputendpoint.style.width = inputswidth; 
     
    8798        document.path.sparql.style.width = inputswidth; 
    8899        document.path.sendsparql.style.width = inputswidth; 
     100        // 繧ー繝ゥ繝墓緒逕サ驛ィ蛻�r荳企Κ繝。繝九Η繝シ逶エ蠕後↓謗・縺吶k繧医≧縺ォ險ュ螳� 
    89101        document.getElementById("graph").style.top = document.getElementById("menu").offsetHeight + "px"; 
    90102 
     103        // 繧ィ繝ウ繝峨�繧、繝ウ繝井ク€隕ァ繧貞叙蠕励@繧サ繝�ヨ 
    91104        $.ajax({ 
    92105                type: "GET", 
     
    108121        // make_data繝。繧ス繝�ラ縺ョ邨先棡繧貞叙蠕� 
    109122        var json = make_data(0); 
    110         // 豺ア縺輔r蜿門セ� 
    111         var dep = MAXDEPTH; 
    112123 
    113124        // 蜃コ譚・荳翫′縺」縺溽オ先棡繧呈ク。縺励※繝槭ャ繝嶺ク翫�繝ュ繧ア繝シ繧キ繝ァ繝ウ繧偵そ繝�ヨ 
     
    125136                d3.select("#graph").select("svg").remove(); 
    126137        } 
    127         DURATION = 0; 
    128  
    129         /* 
    130         // 繝峨Λ繝�げ譎ゅ�蜃ヲ逅� 
    131         var drag = d3.behavior.drag().on("drag", function(d,i) { 
    132             d.x += d3.event.dx 
    133             d.y += d3.event.dy 
    134  
    135             d. isDrag = true; 
    136             DURATION = 0; 
    137             redraw(); 
    138         }); 
    139         */ 
    140  
    141         // SVG縺ョ霑ス蜉 
     138 
     139        // 逕サ髱「繧オ繧、繧コ縺ォ蜷医o縺婀VG縺ョ霑ス蜉 
    142140        var svg = d3.select("#graph").append("svg") 
    143141            .attr("width", width) 
     
    153151                .attr("fill", "#fafafa"); 
    154152 
    155         // 繝ェ繝ウ繧ッ縺ョ菴懈� 
     153        // links驟榊�繧呈ク。縺励Μ繝ウ繧ッ縺ョ菴懈� 
    156154        var link = svg.selectAll(".link") 
    157         .data(json.links) 
    158         .enter().append("line") 
    159         .attr("class", "link") 
    160         .style("stroke-width", function(d) { return Math.sqrt(d.value);}); 
    161  
    162         // 繝弱�繝峨�菴懈� 
     155                .data(json.links) 
     156                .enter().append("line") 
     157                .attr("class", "link") 
     158                .style("stroke-width", function(d) { return Math.sqrt(d.value);}); 
     159 
     160        // nodes驟榊�繧呈ク。縺励ヮ繝シ繝峨�菴懈� 
    163161        var node = svg.selectAll(".node") 
    164         .data(json.nodes) 
    165         .enter().append("circle") 
    166         .attr("class", "node") 
    167         .attr("r", (NODEHEIGHT / 2)) 
    168         .attr("cx", function(d) { return d.x;} ) 
    169         .attr("cy",  function(d) { return d.y; }) 
    170         .style("stroke", function(d) { return '#fafafa'; }) 
    171         .style("stroke-width", function(d) { return '1.5px'; }) 
    172         .style("fill", function(d) { return color(d.group); }) 
    173         .style("cursor", function(d) { return 'pointer'; }); 
    174         //.call(drag); 
    175  
    176         // 繝弱�繝峨ユ繧ュ繧ケ繝医�菴懈� 
     162                .data(json.nodes) 
     163                .enter().append("circle") 
     164                .attr("class", "node") 
     165                .attr("r", (NODEHEIGHT / 2)) 
     166                .attr("cx", function(d) { return d.x;} ) 
     167                .attr("cy",  function(d) { return d.y; }) 
     168                .style("stroke", function(d) { return '#fafafa'; }) 
     169                .style("stroke-width", function(d) { return '1.5px'; }) 
     170                .style("fill", function(d) { return color(d.group); }) 
     171                .style("cursor", function(d) { return 'pointer'; }); 
     172 
     173        // nodes驟榊�繧呈ク。縺励ヮ繝シ繝峨ユ繧ュ繧ケ繝医�菴懈� 
    177174        var tnode = svg.selectAll("text.node") 
    178         .data(json.nodes) 
    179         .enter().append("svg:text") 
    180         .attr("class", "tnode") 
    181         .attr("x", function(d) { return d.x; }) 
    182         .attr("y", function(d) { return d.y; }) 
    183         .text(function(d) { 
    184                 var nodetext = d.name 
    185                 var nodesplit1 = nodetext.split("/"); 
    186                 var nodesplit2 = nodesplit1[nodesplit1.length - 1]; 
    187                 var nodesplit3 = nodesplit2.split("#"); 
    188                 nodetext = nodesplit3[nodesplit3.length - 1]; 
    189                 return nodetext; 
    190         }) 
    191         .style("fill", function(d) { return '#000000'; }) 
    192         //.style("stroke", function(d) { return '#000000'; }) 
    193         //.style("stroke-width", function(d) { return '1.5px'; }) 
    194         .style("text-anchor", function(d) { return 'middle'; }) 
    195         .style("pointer-events", "none"); 
    196         //.call(drag); 
     175                .data(json.nodes) 
     176                .enter().append("svg:text") 
     177                .attr("class", "tnode") 
     178                .attr("x", function(d) { return d.x; }) 
     179                .attr("y", function(d) { return d.y; }) 
     180                .text(function(d) { return d.name; }) 
     181                .style("fill", function(d) { return '#000000'; }) 
     182                .style("text-anchor", function(d) { return 'middle'; }) 
     183                .style("pointer-events", "none"); 
    197184 
    198185        // 繝ェ繝ウ繧ッ繝�く繧ケ繝医�菴懈� 
    199186        var tlink = svg.selectAll("text.link") 
    200         .data(json.links) 
    201         .enter().append("svg:text") 
    202         .attr("class", "tlink") 
    203         .attr("x", function(d) { return (json.nodes[d.source].x + json.nodes[d.target].x) / 2; }) 
    204         .attr("y", function(d) { return (json.nodes[d.source].y + json.nodes[d.target].y) / 2; }) 
    205         .style("fill", function(d) { return '#000000'; }) 
    206         .style("text-anchor", function(d) { return 'middle'; }); 
    207  
    208         // 繝弱�繝峨∈縺ョ繧ッ繝ェ繝�け縺ァ繝代せ謗「邏「縲√ヱ繧ケ荳ュ縺ョ繝ェ繝ウ繧ッ譁�ュ励r陦ィ遉コ 
     187                .data(json.links) 
     188                .enter().append("svg:text") 
     189                .attr("class", "tlink") 
     190                .attr("x", function(d) { return (json.nodes[d.source].x + json.nodes[d.target].x) / 2; }) 
     191                .attr("y", function(d) { return (json.nodes[d.source].y + json.nodes[d.target].y) / 2; }) 
     192                .style("fill", function(d) { return '#000000'; }) 
     193                .style("text-anchor", function(d) { return 'middle'; }); 
     194 
     195        // 繝弱�繝峨∈縺ョ繧ェ繝ウ繝槭え繧ケ縺ァ繝代せ謗「邏「縲√ヱ繧ケ荳ュ縺ョ繝ェ繝ウ繧ッ譁�ュ励r陦ィ遉コ 
    209196        node.on("mouseover", function(d){ 
    210197 
     198                // 繝槭え繧ケ縺ョ蜍輔″繧ォ繧ヲ繝ウ繝医r繝ェ繧サ繝�ヨ 
    211199                MOUSEMOVED = 0; 
    212200 
    213                 if(!d.isDrag){ 
    214  
    215                         var path = []; 
    216                         var pathname = []; 
    217  
    218                         if(d.nodeid != 0){ 
    219                                 path.push(d.nodeid); 
    220                                 pathname.push(d.name); 
    221                                 do{ 
    222                                         for(var i = 0; i < link.data().length; i++){ 
    223                                                 if(path[(path.length-1)] == link.data()[i].target){ 
    224                                                         path.push(link.data()[i].source); 
    225                                                         pathname.push(link.data()[i].property); 
    226                                                         pathname.push(node.data()[link.data()[i].source].name); 
    227                                                 } 
     201                // 陦ィ遉コ縺吶k繝代せ菫晏ュ倡畑驟榊� 
     202                var path = []; 
     203                // 繝��繝ォ繝√ャ繝励∈縺ョ蜷榊燕陦ィ遉コ逕ィ驟榊� 
     204                var pathname = []; 
     205 
     206                // 繝ォ繝シ繝医ヮ繝シ繝我サ・螟悶↑繧� 
     207                if(d.nodeid != 0){ 
     208                        // 縺セ縺壹が繝ウ繝槭え繧ケ縺輔l縺溘ヮ繝シ繝峨�id縺ィ蜷榊燕繧偵◎繧後◇繧瑚ソス蜉 
     209                        path.push(d.nodeid); 
     210                        pathname.push(d.name); 
     211 
     212                        // 繝代せ謗「邏「 
     213                        do{ 
     214                                // 繝ェ繝ウ繧ッ縺ョ謨ー縺縺醍ケー繧願ソ斐@ 
     215                                for(var i = 0; i < link.data().length; i++){ 
     216                                        // 迴セ蝨ィ縺ョ譛€蠕悟ーセ縺ォ郢九′繧九Μ繝ウ繧ッ縺後≠繧後� 
     217                                        if(path[(path.length-1)] == link.data()[i].target){ 
     218                                                // 縺昴�繝ェ繝ウ繧ッ縺ョ繧ス繝シ繧ケ蛛エ繝弱�繝峨�id繧定ソス蜉 
     219                                                path.push(link.data()[i].source); 
     220                                                // 縺昴�繝ェ繝ウ繧ッ縺ョ蜷榊燕縺ィ繧ス繝シ繧ケ蛛エ繝弱�繝峨�蜷榊燕繧定ソス蜉 
     221                                                pathname.push(link.data()[i].property); 
     222                                                pathname.push(node.data()[link.data()[i].source].name); 
    228223                                        } 
    229                                 }while(path[(path.length-1)] != 0); 
     224                                } 
     225                        // 繝ォ繝シ繝医ヮ繝シ繝峨↓霎ソ繧顔捩縺上∪縺ァ郢ー繧願ソ斐☆ 
     226                        }while(path[(path.length-1)] != 0); 
     227 
     228                        // 譛ォ遶ッ繝弱�繝峨〒縺ェ縺�↑繧� 
     229                        if(d.path == "notend"){ 
     230                                // 繝��繝ォ繝√ャ繝励r髱櫁。ィ遉コ縺ォ 
     231                                document.getElementById("showpath").style.display = "none"; 
     232                        }else{ 
     233                                // 譛ォ遶ッ繝弱�繝峨↑繧峨ヤ繝シ繝ォ繝√ャ繝励�諠�ア繧呈峩譁ー 
    230234                                var resultText = "<h3>Selected Path</h3>"; 
     235                                // 繝代せ縺ョ蜷榊燕驟榊�蛻�セ後m縺九i郢ー繧願ソ斐@縺ェ縺後i 
    231236                                for (var i = pathname.length;i > 0; i--){ 
     237                                        // 螂�焚逡ェ逶ョ�医ヮ繝シ繝峨�蜷榊燕�峨�螟ェ蟄励↓ 
    232238                                        if(i % 2 == 1){ 
    233239                                                resultText = resultText + "<span style=\"font-weight: bold;\">" + pathname[i - 1] + "</span><br><br>"; 
     240                                        // 蛛カ謨ー逡ェ逶ョ�医Μ繝ウ繧ッ縺ョ蜷榊燕�峨�縺昴�縺セ縺セ縺ァ陦ィ遉コ 
    234241                                        }else{ 
    235242                                                resultText = resultText + pathname[i - 1] + "<br><br>"; 
    236243                                        } 
    237244                                } 
    238  
     245                                // 繝��繝ォ繝√ャ繝励�蜀�ョケ繧呈嶌縺肴鋤縺� 
    239246                                document.getElementById("selectpath").innerHTML=(resultText); 
    240247 
    241                                 /* 
    242                                 if(d.group > (MAXDEPTH - 2)){ 
    243                                         document.getElementById("getsparqlbutton").style.display = "block"; 
    244                                 }else{ 
    245                                         document.getElementById("getsparqlbutton").style.display = "none"; 
    246                                 } 
    247                                 */ 
    248  
    249                                 if(d.path == "notend"){ 
    250                                         document.getElementById("showpath").style.display = "none"; 
    251                                 }else{ 
    252  
    253                                         pathobj = d.path; 
    254  
    255                                         var xPosition = parseFloat(d3.select(this).attr("cx")) + parseFloat(d3.select(this).style("stroke-width")) + (NODEHEIGHT * 0.5); 
    256                                         var yPosition = parseFloat(d3.select(this).attr("cy") - document.getElementById("showpath").offsetHeight + document.getElementById("menu").offsetHeight) + (NODEHEIGHT * 0.5); 
    257  
    258                                         if(xPosition < 0){ 
    259                                                 xPosition = 0; 
    260                                         } 
    261                                         if(yPosition < 0){ 
    262                                                 yPosition = 0; 
    263                                         } 
    264  
    265                                         document.getElementById("showpath").style.left = xPosition + "px" 
    266                                         document.getElementById("showpath").style.top = yPosition + "px" 
    267                                         document.getElementById("showpath").style.display = "block"; 
    268                                 } 
    269  
    270                         }else{ 
    271                                 document.getElementById("showpath").style.display = "none"; 
    272                         } 
    273  
    274                         var movey = d.y; 
    275  
    276                         node 
     248                                // 繧オ繝シ繝悶Ξ繝�ヨ縺ォ騾√j霑斐☆繝代せ繧ェ繝悶ず繧ァ繧ッ繝医r菫晏ュ� 
     249                                pathobj = d.path; 
     250 
     251                                // 繝��繝ォ繝√ャ繝苓。ィ遉コ譎ゅ�蠎ァ讓呻シ医が繝ウ繝槭え繧ケ縺輔l縺溘ヮ繝シ繝峨�讓ェ縺ォ繝懊ち繝ウ縺梧擂繧九h縺��鄂ョ�� 
     252                                var xPosition = parseFloat(d3.select(this).attr("cx")) + parseFloat(d3.select(this).style("stroke-width")) + (NODEHEIGHT * 0.5); 
     253                                var yPosition = parseFloat(d3.select(this).attr("cy") - document.getElementById("showpath").offsetHeight + document.getElementById("menu").offsetHeight) + (NODEHEIGHT * 0.5); 
     254 
     255                                // 繝��繝ォ繝√ャ繝励′逕サ髱「螟悶↓蜃コ縺ェ縺�h縺�」懈ュ」 
     256                                if(xPosition < 0){ 
     257                                        xPosition = 0; 
     258                                } 
     259                                if(yPosition < 0){ 
     260                                        yPosition = 0; 
     261                                } 
     262 
     263                                // 逕滓�縺励◆蠎ァ讓吶↓繝��繝ォ繝√ャ繝励r陦ィ遉コ 
     264                                document.getElementById("showpath").style.left = xPosition + "px" 
     265                                document.getElementById("showpath").style.top = yPosition + "px" 
     266                                document.getElementById("showpath").style.display = "block"; 
     267                        } 
     268                // 繝ォ繝シ繝医ヮ繝シ繝峨□縺」縺溘↑繧� 
     269                }else{ 
     270                        // 繝��繝ォ繝√ャ繝励r髱櫁。ィ遉コ 
     271                        document.getElementById("showpath").style.display = "none"; 
     272                } 
     273 
     274                // 繧ェ繝ウ繝槭え繧ケ縺輔l縺溘ヮ繝シ繝峨�鬮倥&縺ォ隕ェ繧貞粋繧上○繧� 
     275                // 蜷医o縺帙k鬮倥&繧剃ソ晏ュ� 
     276                var movey = d.y; 
     277 
     278                // 蜷�ヮ繝シ繝峨↓蟇セ縺� 
     279                node 
     280                        // 霈ェ驛ュ邱壹�濶イ繧定ィュ螳� 
    277281                        .style("stroke", function(d){ 
     282                                // 縺セ縺壹�閭梧勹濶イ�医ョ繝輔か繝ォ繝茨シ峨r謖�ョ� 
    278283                                var strokecolor = "#fafafa"; 
     284                                // 蜑榊屓濶イ繧剃サ倥¢縺ヲ縺�◆繝弱�繝峨↑繧� 
    279285                                if(d.view == "now"){ 
     286                                        // 繝弱�繝峨�濶イ莉倥¢繧偵↑縺励↓ 
    280287                                        d.view = "no"; 
    281288                                } 
     
    312319                        }); 
    313320 
    314                         tlink 
     321                tlink 
    315322                        .text(function(d) { 
    316323                                var linktext = ""; 
     
    322329                                        for(var t = 0; t < path.length; t++){ 
    323330                                                if(path[t] == d.target && node.data()[d.target].view != "hide"){ 
    324                                                         var propertytext = d.property 
    325                                                         var linksplit1 = propertytext.split("/"); 
    326                                                         var linksplit2 = linksplit1[linksplit1.length - 1]; 
    327                                                         var linksplit3 = linksplit2.split("#"); 
    328                                                         linktext = linksplit3[linksplit3.length - 1]; 
     331                                                        linktext = d.property 
    329332                                                        d.view = "now"; 
    330333                                                } 
    331334                                        } 
    332335                                }else if(d.view == "fix" && node.data()[d.target].view != "hide"){ 
    333                                         var propertytext = d.property 
    334                                         var linksplit1 = propertytext.split("/"); 
    335                                         var linksplit2 = linksplit1[linksplit1.length - 1]; 
    336                                         var linksplit3 = linksplit2.split("#"); 
    337                                         linktext = linksplit3[linksplit3.length - 1]; 
     336                                        linktext = d.property 
    338337                                } 
    339338                                return linktext; 
    340339                        }); 
    341340 
    342                         link 
     341                link 
    343342                        .style("stroke", function(d){ 
    344343                                if(d.view == "no"){ 
     
    349348                        }); 
    350349 
    351                         redraw(); 
    352                 } 
     350                redraw(); 
    353351 
    354352        }).on("click", function(d){ 
     
    439437                        var linktext = ""; 
    440438                        if((d.view == "now" || d.view == "fix") && (node.data()[d.target].view != "hide")){ 
    441                                 var propertytext = d.property 
    442                                 var linksplit1 = propertytext.split("/"); 
    443                                 var linksplit2 = linksplit1[linksplit1.length - 1]; 
    444                                 var linksplit3 = linksplit2.split("#"); 
    445                                 linktext = linksplit3[linksplit3.length - 1]; 
     439                                linktext = d.property 
    446440                                d.view = "fix"; 
    447441                        } 
     
    452446                redraw(); 
    453447 
    454         }).on("mouseout", function(d){ 
    455                 d.isDrag = false; 
    456448        }); 
    457449 
    458         var redraw = function (){ 
     450        var redraw = function (duration){ 
     451 
     452                if(duration == undefined){ 
     453                        duration = 500; 
     454                } 
     455 
    459456                link 
    460457                .transition() 
    461                 .duration(DURATION) 
     458                .duration(duration) 
    462459                .attr("x1", function(d) {return node.data()[d.source].x;}) 
    463460                .attr("y1", function(d) {return node.data()[d.source].y;}) 
     
    467464                tlink 
    468465                .transition() 
    469                 .duration(DURATION) 
     466                .duration(duration) 
    470467                .attr("x", function(d) {return (node.data()[d.source].x + node.data()[d.target].x) / 2;}) 
    471468                .attr("y", function(d) {return ((node.data()[d.source].y + node.data()[d.target].y) / 2) + 5;}); 
     
    473470                node 
    474471                .transition() 
    475                 .duration(DURATION) 
     472                .duration(duration) 
    476473                .attr("cx", function(d) {return d.x;}) 
    477474                .attr("cy", function(d) {return d.y;}) 
     
    503500                tnode 
    504501                .transition() 
    505                 .duration(DURATION) 
     502                .duration(duration) 
    506503                .attr("x", function(d) {return d.x;}) 
    507504                .attr("y", function(d) { 
     
    517514                .text(function(d){ 
    518515                        var nodetext = d.name 
    519                         var nodesplit1 = nodetext.split("/"); 
    520                         var nodesplit2 = nodesplit1[nodesplit1.length - 1]; 
    521                         var nodesplit3 = nodesplit2.split("#"); 
    522                         nodetext = nodesplit3[nodesplit3.length - 1]; 
    523516                        if(d.view == "hide"){ 
    524517                                nodetext = ""; 
     
    526519                        return nodetext; 
    527520                }); 
    528  
    529                 DURATION = 500; 
    530521 
    531522        }; 
     
    565556        }); 
    566557 
    567         redraw(); 
     558        redraw(0); 
    568559} 
    569560 
     
    587578                if(i == 0){ 
    588579                        // 蛻晏屓縺縺代Ν繝シ繝医ヮ繝シ繝峨r繝励ャ繧キ繝・ 
    589                         ret['nodes'].push({'name':obj['paths'][0]['startClassURI'], 'group': 0, 'x':50, 'y':50, 'nodeid':ret['nodes'].length, 'view' : 'no', 'path': 'notend'}); 
     580                        ret['nodes'].push({'name': obj['paths'][0]['startClassLabel'], 'group': 0, 'x':50, 'y':50, 'nodeid':ret['nodes'].length, 'view' : 'no', 'path': 'notend'}); 
    590581                } 
    591582                // 蜈医↓source縺ォ0�医Ν繝シ繝茨シ峨r莉」蜈・ 
     
    596587                // classLinks縺ョ謨ー縺縺醍ケー繧願ソ斐@縺ェ縺後i 
    597588                for(var j = 0;j < obj['paths'][i]['classLinks'].length; j++){ 
     589 
     590                        // 繝ェ繝ウ繧ッ縺ョ蜷榊燕繧旦RL譛ォ蟆セ縺九i蜿門セ� 
     591                        var propertytext = obj['paths'][i]['classLinks'][j]['propertyURI']; 
     592                        var propertysplit1 = propertytext.split("/"); 
     593                        var propertysplit2 = propertysplit1[propertysplit1.length - 1]; 
     594                        var propertysplit3 = propertysplit2.split("#"); 
     595                        propertytext = propertysplit3[propertysplit3.length - 1]; 
    598596 
    599597                        if(MAXDEPTH < j+1){ 
     
    631629                                        if(!isCommonNow){ 
    632630                                                isCommon = false; 
    633                                                 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'}); 
    634                                                 ret['links'].push({'source':source, 'target':ret['nodes'].length - 1, 'value':5, 'property':obj['paths'][i]['classLinks'][j]['propertyURI'], 'view' : 'no'}); 
     631                                                ret['nodes'].push({'name': obj['paths'][i]['classLinks'][j]['nodeLabel'], 'group': (j+1), 'x':0, 'y':0, 'dy':0, 'nodeid':ret['nodes'].length, 'view' : 'no', 'path': 'notend'}); 
     632                                                ret['links'].push({'source':source, 'target':ret['nodes'].length - 1, 'value':5, 'property': propertytext, 'view' : 'no'}); 
    635633                                                source = ret['nodes'].length - 1; 
    636634                                        } 
     
    640638 
    641639                                        isCommon = false; 
    642                                         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'}); 
    643                                         ret['links'].push({'source':source, 'target':ret['nodes'].length - 1, 'value':5, 'property':obj['paths'][i]['classLinks'][j]['propertyURI'], 'view' : 'no'}); 
     640                                        ret['nodes'].push({'name': obj['paths'][i]['classLinks'][j]['nodeLabel'], 'group': (j+1), 'x':0, 'y':0, 'dy':0, 'nodeid':ret['nodes'].length, 'view' : 'no', 'path': 'notend'}); 
     641                                        ret['links'].push({'source':source, 'target':ret['nodes'].length - 1, 'value':5, 'property': propertytext, 'view' : 'no'}); 
    644642                                        source = ret['nodes'].length - 1; 
    645643                                } 
    646644                        // 譌「縺ォ蜈ア騾壹Ν繝シ繝医〒縺ェ縺�↑繧画眠隕剰ソス蜉縺励※谺。縺ク 
    647645                        }else{ 
    648                                 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'}); 
    649                                 ret['links'].push({'source':source, 'target':ret['nodes'].length - 1, 'value':5, 'property':obj['paths'][i]['classLinks'][j]['propertyURI'], 'view' : 'no'}); 
     646                                ret['nodes'].push({'name': obj['paths'][i]['classLinks'][j]['nodeLabel'], 'group': (j+1), 'x':0, 'y':0, 'dy':0, 'nodeid':ret['nodes'].length, 'view' : 'no', 'path': 'notend'}); 
     647                                ret['links'].push({'source':source, 'target':ret['nodes'].length - 1, 'value':5, 'property': propertytext, 'view' : 'no'}); 
    650648                                source = ret['nodes'].length - 1; 
    651649                        }