You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A YASGUI plugin for visualizing SPARQL CONSTRUCT query results as interactive graphs with nodes (subjects/objects) and edges (predicates).
6
+
A YASGUI plugin for visualizing SPARQL CONSTRUCT and DESCRIBE query results as interactive graphs with nodes (subjects/objects) and edges (predicates).
7
7
8
8
## ✨ Features
9
9
@@ -66,8 +66,9 @@ const yasgui = new Yasgui(document.getElementById('yasgui'), {
Copy file name to clipboardExpand all lines: specs/001-construct-graph-viz/plan.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
8
8
## Summary
9
9
10
-
**Primary Requirement**: Create a YASGUI plugin that visualizes SPARQL CONSTRUCT query results as interactive graphs with nodes (subjects/objects) and edges (predicates), supporting zoom, drag, tooltips and color coding by node type.
10
+
**Primary Requirement**: Create a YASGUI plugin that visualizes SPARQL CONSTRUCT and DESCRIBE query results as interactive graphs with nodes (subjects/objects) and edges (predicates), supporting zoom, drag, tooltips and color coding by node type.
11
11
12
12
**Technical Approach**: Implement a YASR plugin class following the yasgui-geo pattern (constructor, canHandleResults, draw, getIcon methods) using vis-network v9.x for graph rendering. Parse RDF triples from bindings format, transform to vis-network DataSets with color-coded nodes (grey literals, green rdf:type objects, blue other URIs), apply prefix abbreviation, and leverage vis-network's built-in force-directed layout and interaction. Build with esbuild to UMD format for `Yasgui.Yasr.registerPlugin()` registration.
Copy file name to clipboardExpand all lines: specs/001-construct-graph-viz/spec.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
**Feature Branch**: `001-construct-graph-viz`
4
4
**Created**: 2025-12-05
5
5
**Status**: Draft
6
-
**Input**: User description: "Visualize SPARQL CONSTRUCT query results as interactive graphs with nodes (subjects/objects) and edges (predicates), supporting zoom, drag, tooltips and color coding"
6
+
**Input**: User description: "Visualize SPARQL CONSTRUCT and DESCRIBE query results as interactive graphs with nodes (subjects/objects) and edges (predicates), supporting zoom, drag, tooltips and color coding"
7
7
8
8
## Clarifications
9
9
@@ -105,7 +105,7 @@ While exploring the graph, the user wants to see detailed information about node
105
105
106
106
#### Data Parsing & Graph Construction
107
107
108
-
-**FR-001**: Plugin MUST detect when YASR receives CONSTRUCT query results (as opposed to SELECT/ASK/DESCRIBE)
108
+
-**FR-001**: Plugin MUST detect when YASR receives CONSTRUCT or DESCRIBE query results (as opposed to SELECT/ASK)
109
109
-**FR-002**: Plugin MUST parse RDF triples from SPARQL results and extract subject, predicate, object for each triple
110
110
-**FR-003**: Plugin MUST create graph nodes for all unique subjects and objects appearing in triples
111
111
-**FR-004**: Plugin MUST create graph edges for predicates connecting subject nodes to object nodes
-[X] T011 [P] Implement getDefaultNetworkOptions() in src/networkConfig.js returning vis-network config: physics enabled with 200 max iterations, interactions (drag/zoom/pan/hover), autoResize, 100% width/height
41
41
-[X] T012 Create GraphPlugin class skeleton in src/GraphPlugin.js with constructor(yasr), priority=20, label='Graph', and placeholder methods: canHandleResults(), draw(), getIcon()
42
-
-[X] T013 Implement GraphPlugin.canHandleResults() to detect CONSTRUCT results by checking for subject/predicate/object variables in this.yasr.results
42
+
-[X] T013 Implement GraphPlugin.canHandleResults() to detect CONSTRUCT and DESCRIBE results by checking for subject/predicate/object variables in this.yasr.results
43
43
-[X] T014 Implement GraphPlugin.getIcon() to return Font Awesome icon element (fa-project-diagram) for YASR tab
44
44
-[X] T015 Export GraphPlugin and auto-register with Yasgui.Yasr.registerPlugin('graph', GraphPlugin) in src/index.js (UMD compatibility)
0 commit comments