Skip to content

Commit

Permalink
Query graph col.
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzBuehmann committed Sep 4, 2016
1 parent f15aa6b commit 96a2294
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -202,6 +202,7 @@ public void generateBenchmarkDescription(File benchmarkQueriesFile, File htmlOut
+ "<th data-sortable=\"true\" data-valign='middle'>ID</th>\n"
+ "<th data-sortable=\"true\" data-valign='middle'>Query</th>\n"
+ "<th data-sortable=\"true\" data-valign='middle'>Query Type</th>\n"
+ "<th data-valign='middle'>Query Graph</th>\n"
+ "<th data-align=\"right\" data-sortable=\"true\" data-valign='middle'>Depth</th>\n"
+ "<th data-align=\"right\" data-sortable=\"true\" data-valign='middle'>#Instances</th>\n"
+ "<th data-align=\"right\" data-sortable=\"true\" data-valign='middle'>|CBD|<sub>min</sub></th>\n"
Expand All @@ -211,12 +212,15 @@ public void generateBenchmarkDescription(File benchmarkQueriesFile, File htmlOut

html += "<tbody>\n";
int id = 1;
new File("/tmp/graphs/").mkdirs();
File graphDir = new File("/tmp/graphs/");
graphDir.mkdirs();
for (Query query : queries) {
// if(!query.toString().contains("Kennedy"))continue;
System.out.println(query);

// exportGraph(query, new File("/tmp/graphs/graph" + id + ".png"));
File graphFile = new File(graphDir, "graph" + id + ".png");
// QueryToGraphExporter.exportYedGraph(query, graphFile);

html += "<tr>\n";

Expand All @@ -228,6 +232,10 @@ public void generateBenchmarkDescription(File benchmarkQueriesFile, File htmlOut

// 3. column: SPARQL query type
html += "<td>" + SPARQLUtils.getQueryType(query) + "</td>\n";

// query graph

html += "<td><img src=\"" + graphFile.getPath() + "\" alt=\"query graph\"></td>\n";

// 4. column: depth
html += "<td class='number'>" + getLongestPath(query) + "</td>\n";
Expand Down

0 comments on commit 96a2294

Please sign in to comment.