Skip to content

Commit d68f8c2

Browse files
authored
Master Thesis Implementation (#934)
* Add ZoomToSelected * Add export Button for Sparql result * Refactors, add export to SPARQL result * Fix Export Csv file extention * Randomize animations * Reafctors * Replace rml with codemirror * Refactor * Refactor RmlMapping * Fix scrolling issue * Spinner in center * Refactor visualizer code * Refactor RmlMapping Dialog, refactor Messages * Fix scrolling issue on RmlDialog * Refactors * Refactor * Refactors * Edit modal on Visualizer * Code refactor, add edit and remove to GraphVisualizer * Transition effect for rdfVisualizer * Fix last node refresh bug * Refactors * Fix bugs * Add export as Png * Refactors, add DataTpe support for Objects * Remove un-necessar import * Refactors * Refactor * Add peoprties button * De-couple RdfVisualizer * Add scroller * Fix background * Remove Transitions * Refactors * Refactors * add missing import * Refactor Visualizer * Add undo-redo to Visualizer * Refactors * Refactor Visualizer * Disable Buttons on Graph error * Refactor * Add Search to Visualizer * Refactors * Refactors * Refactors * Refactors * Refactors * Refactor * Refactors * Refactor * Add node rename * Refactor * Refactor to support no graph section * Refactor * Refactor * Refactor * Refactor * Refactor * Refactors * Refactor * Refactor * Refactor * Refactors * Refactor * Remove coe which was fixed by another issue * Add thesis * Update GitIgnore * Move into separate chapters * Separate Chapters * Update GitIgnore * Refactors * Refactors * Refactor * Refactor * Refactor * Refactor * Refactor * Refactors * Refactor * Refactor * Refactor * Refactor * Refactors * Refactor * Refactors * apply formatting changes * Refactor * Refactor * Refactor * Refactors * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactors * Refactor * Refactor * Refactor * Refactor * Refactors * Refactor * Refactor * Refactor * Refactors * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactors * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactors * Refactor * Ontology Explorer refactor * apply formatting changes * Refactor * apply formatting changes * Refactor * Refactor * Refactor * Refactors * Refactor * Refactor * Refactors * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactors * Refactor * Refactor * Refactor * Refactor * Refactor * Refactors * Refactors * Remove thesis * Refactor * Color Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactors * Refactor * Refactor * Refactors * Refactor * Refactor * Refactor * refactor * Refactor * Refactor * Refactor * Refactors * Refactor * Refactor * Refactor * refactor * Refactor * Fix * Refactor * Refactor * Refactor * Refactor * Refactor * apply formatting changes * Refactor * Fix Bug * Bug Fix * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Refactor * Add baseUri to Settings * Add default * Refactor * Refactor * Fix Dynamic Rml Source * Add tests * refactor * Refactors * Refactor * Change Example IRI * Refactor * Refactors * Refactor * Refactor * Add ImportTurtleDialog test * Temp fix * Fix lint * Refactors * Add rdfPanel test * Remove CodeMirror * Add RDF Documentation * Update documentation * Refactors * Refactors * Refactors * Resolve index.html Merge Conflict * Apply event-isolation * Modals resize, Turtle import text change * Upgrade to 2.4.0, adding changelog --------- Co-authored-by: M-Jafarkhani <M-Jafarkhani@users.noreply.github.com>
1 parent 897c03d commit d68f8c2

102 files changed

Lines changed: 13881 additions & 2882 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
---
1010

11+
## [2.4.0] - 2026-04-15
12+
13+
### Added
14+
15+
- Add RDF Panel to support RDF authoring workflows
16+
- Add JSON to JSON-LD conversion using RML mapping
17+
- Add SPARQL querying support in RDF Panel
18+
- Add Knowledge Graph visualization for RDF data exploration
19+
1120
## [2.3.0] - 2026-04-14
1221

1322
### Changed

documentation_user/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* [Schema Selection List](examples/schema_selection_list) (Provide your users a pre-defined list of schemas to choose from; useful for organizations)
99
* [AI Assistance](examples/ai_assistance) (Shows how to use AI-assisted features for schema and data creation/editing, as well as data transformation)
1010
* [External References](examples/external_references) (Shows how to handle external references in MetaConfigurator)
11+
* [RDF Panel](examples/rdf) (How to use RDF Panel in MetaConfigurator)
1112

1213
## Load a Schema
1314

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
# MetaConfigurator RDF Panel User Guide
2+
3+
This guide explains how to use the RDF panel in MetaConfigurator. You will move from plain JSON to a queryable and visual knowledge graph:
4+
5+
1. Start from structured JSON in the Data tab.
6+
2. Open the RDF panel.
7+
3. Convert JSON to JSON-LD with RML (optionally with AI drafting).
8+
4. Review and edit triples in the RDF panel.
9+
5. Use ontology assistance when choosing IRIs.
10+
6. Run SPARQL queries (also with AI drafting).
11+
7. Explore and refine the graph visually.
12+
13+
---
14+
15+
## Data
16+
17+
We use two main examples throughout this document: a simple simulation dataset and a MOF dataset.
18+
19+
- [`samples/simulation-data.json`](./samples/simulation-data.json)
20+
- [`samples/simulation-mapping.ttl`](./samples/simulation-mapping.ttl)
21+
- [`samples/simulation-data.jsonld`](./samples/simulation-data.jsonld)
22+
- [`samples/simulation-query.sparql`](./samples/simulation-query.sparql)
23+
24+
- [`samples/mof-data.json`](./samples/mof-data.json)
25+
- [`samples/mof-mapping.ttl`](./samples/mof-mapping.ttl)
26+
- [`samples/mof-data.jsonld`](./samples/mof-data.jsonld)
27+
- [`samples/mof-prep-query.sparql`](./samples/mof-prep-query.sparql)
28+
29+
---
30+
31+
## 1) Start with JSON Data
32+
33+
Begin with your normal structured JSON (simulation data, lab records, process logs, etc.).
34+
35+
- Simulation example: [`samples/simulation-data.json`](./samples/simulation-data.json)
36+
- MOF example: [`samples/mof-data.json`](./samples/mof-data.json)
37+
38+
Open the RDF panel in the Data tab by clicking the globe icon.
39+
40+
![Opening RDF Panel](./images/RDF-Panel.png)
41+
42+
Initially, the panel shows a warning that your data is not in JSON-LD format. This means:
43+
44+
- Your data is already valid JSON.
45+
- It is not yet ready for semantic querying until converted to JSON-LD.
46+
47+
![RDF panel with JSON input](./images/MC-RDF-JSON.png)
48+
49+
Now you have two options to proceed:
50+
51+
- Use the **JSON to JSON-LD** (RML conversion) tool, or
52+
- Use **Turtle import** if your data is already in RDF/Turtle format.
53+
54+
Before using RML mapping, please review the RML documentation at [this link](https://rml.io/docs/rml/introduction/).
55+
56+
---
57+
58+
## 2) Convert JSON to JSON-LD with RML
59+
60+
Use the RML mapping dialog to define how JSON fields become RDF entities and relationships.
61+
62+
Again, you can proceed in two ways:
63+
64+
- Paste an existing RML mapping, or
65+
- Generate a draft mapping with AI and then adjust it.
66+
67+
![RML mapping dialog](./images/MC-RDF-RML-1.png)
68+
69+
Sample mappings:
70+
71+
- Simulation mapping: [`samples/simulation-mapping.ttl`](./samples/simulation-mapping.ttl)
72+
- MOF mapping: [`samples/mof-mapping.ttl`](./samples/mof-mapping.ttl)
73+
74+
Practical recommendation:
75+
76+
- Treat AI-generated mapping as a first draft.
77+
- Confirm identifiers, classes, and property choices before applying.
78+
79+
---
80+
81+
## 3) Inspect and Edit JSON-LD / RDF Triples
82+
83+
After conversion, the RDF panel gives two synchronized tabs:
84+
85+
- **Context**: manage prefix and context definitions.
86+
- **Triples**: manage subject-predicate-object statements.
87+
88+
![Context view](./images/MC-RDF-JSON-LD-2.png)
89+
90+
![Triples view](./images/MC-RDF-JSON-LD-1.png)
91+
92+
![Triple edit modal](./images/MC-RDF-Modal.png)
93+
94+
Typical tasks in the **Triples** tab:
95+
96+
- Add, edit, and delete triples.
97+
- Search and filter across subject, predicate, object.
98+
- Export graph data as Turtle, N-Triples, or RDF/XML.
99+
- Open SPARQL and visualization directly from the same toolbar.
100+
101+
Note: If you filter data in the Triples tab and then open the visualization dialog, you will see only the graph for the filtered data, not the entire dataset.
102+
103+
Sample JSON-LD outputs:
104+
105+
- Simulation: [`samples/simulation-data.jsonld`](./samples/simulation-data.jsonld)
106+
- MOF : [`samples/mof-data.jsonld`](./samples/mof-data.jsonld)
107+
108+
---
109+
110+
## 4) Use Ontology-Assisted IRI Selection
111+
112+
When editing predicates or object IRIs, open **Ontology Explorer** for guided selection.
113+
114+
![Ontology explorer](./images/MC-RDF-Ontology-1.png)
115+
116+
![Ontology explorer SPARQL](./images/MC-RDF-Ontology-3.png)
117+
118+
What you can do there:
119+
120+
- Select a prefix from your current `@context`.
121+
- Download ontology content by URL or upload an ontology file.
122+
- Reuse cached ontology data, refresh it, or delete it.
123+
- Browse `DatatypeProperty`, `ObjectProperty`, and `Class` terms.
124+
- Use ontology-side SPARQL to discover additional terms quickly.
125+
- Pick a term and insert it back into the triple editor.
126+
127+
This is especially helpful for consistent use of units, classes, and shared vocabularies.
128+
129+
---
130+
131+
## 5) Query with SPARQL (Optional AI Drafting)
132+
133+
Open SPARQL from the triples toolbar to validate and analyze your graph.
134+
135+
![SPARQL AI generation](./images/MC-RDF-SPARQL-1.png)
136+
137+
![SPARQL result table](./images/MC-RDF-SPARQL-2.png)
138+
139+
![MOF SPARQL result](./images/MC-RDF-SPARQL-3.png)
140+
141+
![SPARQL visualization hints](./images/MC-RDF-SPARQL-4.png)
142+
143+
In this dialog, you can:
144+
145+
- Write or paste SPARQL manually.
146+
- Ask AI to draft a query from a natural-language prompt. You can ask question from your data, since a subset of your JSON-LD data is being sent to the AI-endpoint.
147+
- Run query and inspect results in a filterable table.
148+
- Export results (CSV for tabular outputs when visualization is disabled, and RDF-based extensions for visualization-based queries).
149+
150+
Visualization note:
151+
152+
- You can enable query-result visualization mode.
153+
- This mode expects a graph-shaped query result (CONSTRUCT-style output).
154+
- You can also click the visualization help icon near the toggle for more information on how to create a valid query for visualization.
155+
156+
Sample queries:
157+
158+
- Simulation: [`samples/simulation-query.sparql`](./samples/simulation-query.sparql)
159+
- MOF prep-step: [`samples/mof-prep-query.sparql`](./samples/mof-prep-query.sparql)
160+
161+
---
162+
163+
## 6) Visualize and Refine the Knowledge Graph
164+
165+
Use **Visualize** to inspect relationships as a graph.
166+
167+
![Simulation Knowledge Graph](./images/MC-RDF-KG-1.png)
168+
169+
![MOF Knowledge Graph](./images/MC-RDF-KG-2.png)
170+
171+
Two visualization modes:
172+
173+
- From RDF Triples tab: **editable graph** (rename node, add/delete properties, add/delete nodes).
174+
- From SPARQL visualizer tab: **read-only graph** for query result exploration.
175+
176+
Useful actions in the visualization dialog:
177+
178+
- Node search and quick focus.
179+
- Zoom controls and fit-to-view.
180+
- Optional layout animation.
181+
- Export graph image.
182+
- Undo/redo for edits.
183+
184+
For very large graphs, the app warns before rendering and lets you continue or cancel.
185+
186+
---
187+
188+
## Recommended End-to-End Workflow
189+
190+
1. Validate raw JSON in Data/Schema views.
191+
2. Convert JSON to JSON-LD using RML (manual or AI draft).
192+
3. Confirm context prefixes and main entities in RDF panel.
193+
4. Clean up triples (missing links, wrong predicates, units, datatypes).
194+
5. Use Ontology Explorer for consistent vocabulary choices.
195+
6. Run SPARQL checks for your key domain questions.
196+
7. Inspect the graph visually and refine remaining issues.
197+
8. Export RDF or query results for downstream use.
198+
199+
---
200+
201+
## Practical Quality Checks
202+
203+
- Ensure important entities use stable and reusable identifiers.
204+
- Keep prefix usage consistent between `@context`, triples, and queries.
205+
- Use ontology IRIs for units/classes/properties instead of only plain text.
206+
- Review AI-generated mapping/query drafts before trusting them.
207+
- If the triple list is shortened due to display limits, increase RDF display limits in settings before final review.
208+
- Use Named Nodes (nodes with `@id`) instead of Blank Nodes. This makes it easier to find and edit triples in the Text view.
748 KB
Loading
349 KB
Loading
342 KB
Loading
299 KB
Loading
303 KB
Loading
111 KB
Loading
216 KB
Loading

0 commit comments

Comments
 (0)