A lightweight, cross-platform graphical interface for populating OWL 2 knowledge graphs using the ISTA library.
- OWL 2 Ontology Loading: Load and visualize OWL 2 ontologies in RDF/XML format
- Interactive Graph Visualization: View classes, individuals, and their relationships as an interactive directed graph
- Knowledge Graph Schema Rendering: Visualize class hierarchies and ontological structure
- Data Source Integration: (Planned) Select and map data sources (CSV, Excel) to ontology classes for population
- Cross-Platform: Runs on Windows, macOS, and Linux
- Lightweight: Minimal dependencies using Dear ImGui and GLFW
- C++20: Modern C++ for high performance
- Dear ImGui: Lightweight immediate-mode GUI framework
- GLFW: Cross-platform window and input handling
- OpenGL 3.3: Hardware-accelerated graphics rendering
- ISTA OWL2: Native C++ OWL 2 ontology manipulation library
- CMake 3.15 or higher
- C++20 compatible compiler (GCC 10+, Clang 10+, MSVC 2019+)
- OpenGL 3.3 or higher support
- Dear ImGui (v1.90.4)
- GLFW (v3.4)
Run the setup script to download Dear ImGui and GLFW:
cd gui
./setup_dependencies.shThis will clone Dear ImGui and GLFW into the external/ directory.
From the project root:
mkdir -p build && cd build
cmake .. -DBUILD_GUI=ON
cmake --build .The executable will be located at: build/gui/ista_gui
BUILD_GUI=ON/OFF: Enable/disable GUI build (default: ON)BUILD_PYTHON_BINDINGS=ON/OFF: Enable/disable Python bindings (default: ON)
To disable GUI build:
cmake .. -DBUILD_GUI=OFF./build/gui/ista_guiOr load an ontology file directly:
./build/gui/ista_gui path/to/ontology.owl-
Load Ontology
- Click
File > Load Ontologyor pressCtrl+O - Enter the path to your RDF/XML ontology file
- The graph visualization will display classes and individuals
- Click
-
Navigate the Graph
- Pan: Right-click and drag
- Zoom: Mouse wheel
- Select Node: Left-click on a node
- Drag Node: Left-click and drag
-
View Options
View > Show Class Hierarchy: Toggle class nodes visibilityView > Show Individuals: Toggle individual nodes visibilityView > Reset View: Reset pan and zoom
-
Save Changes
- Click
File > Save Ontologyor pressCtrl+S - Use
File > Save As...to save to a new location
- Click
- Data Source Panel: Add CSV/Excel files as data sources
- Class Mapping: Map data source columns to ontology classes and properties
- Batch Population: Automatically populate individuals from data sources
- Filtering: Filter graph view by class or property
- Search: Find specific classes or individuals
- Export: Export graph visualizations as images
- Blue Circles (Large): OWL 2 Classes
- Green Circles (Small): Named Individuals
- Gold: Selected node
- Blue Arrows: Subclass relationships (rdfs:subClassOf)
- Gray Arrows: Object property assertions
- Selection: Click on a node to view its properties in the Properties panel
- Dragging: Rearrange nodes by dragging them
- Panning: Navigate large graphs by right-click dragging
- Zooming: Use mouse wheel to zoom in/out
gui/
├── include/
│ └── kg_editor.hpp # Main editor class header
├── src/
│ ├── main.cpp # Application entry point
│ └── kg_editor.cpp # Editor implementation
├── CMakeLists.txt # Build configuration
├── setup_dependencies.sh # Dependency download script
└── README.md # This file
KnowledgeGraphEditor: Main application class
- Manages GUI window and rendering
- Handles ontology loading/saving
- Controls graph visualization
- Manages user interactions
GraphNode: Represents a visual node (class or individual)
- Position and velocity for layout algorithms
- Selection and interaction state
- Display label and IRI
GraphEdge: Represents a visual edge (relationship)
- Source and target nodes
- Property label
- Edge type (subclass, property, etc.)
- Requires macOS 10.13 or later for OpenGL 3.3 support
- The application uses Cocoa, IOKit, and CoreVideo frameworks
- If you encounter OpenGL warnings, they can be safely ignored (OpenGL deprecated but still functional)
- Requires X11 development libraries:
sudo apt-get install libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev - May require
libgl1-mesa-devfor OpenGL headers
- Requires Visual Studio 2019 or later
- CMake will generate Visual Studio solution files
- OpenGL libraries are included with graphics drivers
- Ensure you have OpenGL 3.3 or higher support
- Update graphics drivers
- Check that GLFW was downloaded correctly
- Run
./setup_dependencies.shto download dependencies - Check that
external/imgui/directory exists and containsimgui.cpp
- Ensure C++20 compiler support
- Check CMake version (3.15+)
- Verify all dependencies are present in
external/directory
- Large ontologies (1000+ classes) may experience slowdown
- Disable class hierarchy view if not needed
- Use hierarchical layout instead of force-directed for better performance
To extend the GUI:
- Add new methods to
KnowledgeGraphEditorclass ininclude/kg_editor.hpp - Implement in
src/kg_editor.cpp - Add UI elements in the appropriate
render_*method - Follow ImGui patterns for immediate-mode UI
Current layouts:
- Hierarchical: Classes at top, individuals below (implemented)
- Force-Directed: Physics-based node positioning (planned)
To implement new layouts, add methods similar to apply_hierarchical_layout().
This GUI application is part of the ISTA project and follows the same license as the main ISTA library.
Contributions are welcome! Please ensure:
- Code follows existing style conventions
- C++20 features are used appropriately
- Cross-platform compatibility is maintained
- Changes are documented
- Dear ImGui - Bloat-free GUI library
- GLFW - Multi-platform library for OpenGL
- ISTA Library - OWL 2 ontology manipulation
- OWL 2 Specification
- File dialog integration (native file picker)
- Data source management (CSV import)
- Column-to-property mapping interface
- Batch individual creation from CSV
- Force-directed graph layout
- Graph filtering and search
- Undo/redo support
- Export visualizations as PNG/SVG
- SPARQL query interface
- Reasoner integration (visualize inferred axioms)
- Collaborative editing
- Plugin system for custom data sources