Index: SPARQLBuilderWWW/web/sparqlbuilder.js
===================================================================
--- SPARQLBuilderWWW/web/sparqlbuilder.js (revision 222)
+++ SPARQLBuilderWWW/web/sparqlbuilder.js (revision 225)
@@ -88,5 +88,5 @@
                 $("#EndPointSelect").append('<option value="' + list[i] + '">' + list[i] + '</option>');
             }
-            $("#EndPointSelect").trigger(event);
+            $("#seclass").trigger(new $.Event('epcomplete'));
         },
     });
@@ -111,8 +111,38 @@
                 $("#EndClassSelect").append('<option value="' + list[i]['uri'] + '">' + list[i]['label'] + ' (' + list[i]['number'] + ')' + '</option>');
             }
-            $("#StartClassSelect").trigger(event)
-            $("#EndClassSelect").trigger(event)
+            $("#seclass").trigger(new $.Event('secomplete'));
         }
     });
+};
+
+SPARQLBuilder.prototype.loadSamplePathList = function() {
+    var url = "http://www.sparqlbuilder.org/api/plist?ep=" + encodeURIComponent('http://www.ebi.ac.uk/rdf/services/reactome/sparql')
+                                          + "&startclass=" + encodeURIComponent('http://www.biopax.org/release/biopax-level3.owl#Protein')
+                                          + "&endclass="   + encodeURIComponent('http://www.biopax.org/release/biopax-level3.owl#Pathway');
+    //var url = "http://localhost:8080/api/plist?ep=" + encodeURIComponent(this.endpoint)
+    //                                      + "&startclass=" + encodeURIComponent(startclass)
+    //                                      + "&endclass="   + encodeURIComponent(endclass);
+    var self = this;
+    self.loadIcon("view");
+    setTimeout(function(){
+
+        $.ajax({
+            type : "GET",
+            url : url,
+            async : false,
+            timeout : 1000000,
+            success : function(data) {
+                var width = $(".SparqlBuilderContent").width();
+                self.drawGraph = new SPARQLBuilderDrawGraph(data, width, 10);
+                self.loadIcon("hide");
+                self.drawGraph.view_map();
+                $('select[name="selectendpoint"]').val('http://www.ebi.ac.uk/rdf/services/reactome/sparql');
+            },
+            error: function(data){
+                self.loadIcon("hide");
+                alert("error: ", data);
+            }
+        });
+    }, 100)
 };
 
@@ -184,6 +214,4 @@
     this.pathlimit = pathlimit;
     this.pathobj = null;
-    this.NODEHEIGHT = 50;
-    this.MOUSEMOVED = 0;
 };
 
@@ -196,9 +224,4 @@
     // make_data繝｡繧ｽ繝�ラ縺ｮ邨先棡繧貞叙蠕�
     var json = this.make_data(0);
-
-    // SVG縺悟ｭ伜惠縺吶ｋ縺ｪ繧峨�蜑企勁
-    if (d3.select("#sparqlBuilderGraph").select("svg")) {
-        d3.select("#sparqlBuidlerGraph").select("svg").remove();
-    }
 
     if(json['nodes'].length != 0){
@@ -214,4 +237,6 @@
         var color = d3.scale.category20();
 
+        // SVG縺ｮ蜑企勁
+        d3.select("#sparqlBuilderGraph").html("");
         // 逕ｻ髱｢繧ｵ繧､繧ｺ縺ｫ蜷医ｏ縺婀VG縺ｮ霑ｽ蜉
         var svg = d3.select("#sparqlBuilderGraph").append("svg")
@@ -272,4 +297,7 @@
             .style("text-anchor", function(d) { return 'middle'; });
 
+        // 繝槭え繧ｹ縺ｮ蜍輔″繧ｫ繧ｦ繝ｳ繝医ｒ繝ｫ繝ｼ繝医↓謖√◆縺帙ｋ
+        node.data()[0].mousemoved = 0;
+
         // 繝弱�繝峨∈縺ｮ繧ｪ繝ｳ繝槭え繧ｹ縺ｧ繝代せ謗｢邏｢縲√ヱ繧ｹ荳ｭ縺ｮ繝ｪ繝ｳ繧ｯ譁�ｭ励ｒ陦ｨ遉ｺ
         var self = this;
@@ -277,5 +305,5 @@
 
             // 繝槭え繧ｹ縺ｮ蜍輔″繧ｫ繧ｦ繝ｳ繝医ｒ繝ｪ繧ｻ繝�ヨ
-            this.MOUSEMOVED = 0;
+            node.data()[0].mousemoved = 0;
 
             // 陦ｨ遉ｺ縺吶ｋ繝代せ菫晏ｭ倡畑驟榊�
@@ -701,10 +729,10 @@
         bg.on("mousemove", function(){
             // MOUSEMOVED繧定ｿｽ蜉�医ヮ繝ｼ繝峨↓繧ｪ繝ｳ繝槭え繧ｹ縺輔ｌ繧句ｺｦ縺ｫ繧ｫ繧ｦ繝ｳ繝医Μ繧ｻ繝�ヨ��
-            this.MOUSEMOVED++;
+            node.data()[0].mousemoved++;
             // 30繧定ｶ�∴縺溘ｉ
-            if(this.MOUSEMOVED > 30){
+            if(node.data()[0].mousemoved > 30){
                 // 繝��繝ｫ繝√ャ繝励ｒ髱櫁｡ｨ遉ｺ縺ｫ縺励※繧ｫ繧ｦ繝ｳ繝医Μ繧ｻ繝�ヨ
                 document.getElementById("sparqlBuilderShowpath").style.display = "none";
-                this.MOUSEMOVED = 0;
+                node.data()[0].mousemoved = 0;
             }
         });
@@ -727,4 +755,5 @@
     this.MAXDEPTH = 0;
     this.TREESPACE = 0;
+    this.NODEHEIGHT = 50;
     this.DRAWHEIGHT = this.NODEHEIGHT;
 
