#004: Visual SHACL editor #4

Open
opened 2026-04-05 12:58:40 +00:00 by daniel · 0 comments
Owner

Blocked by

Summary

Provide a visual UI for creating and editing SHACL shapes, replacing the need to write SPARQL or Turtle manually. Users should be able to define node shapes, property shapes, constraints, and the mapping between shapes and dataset graphs through a form-based interface.

Motivation

In the initial implementation (#001), SHACL shapes are managed via raw SPARQL on the _shacl/_query and _shacl/_update endpoints. This requires knowledge of SHACL vocabulary and SPARQL syntax. A visual editor would make shape management accessible to non-technical users.

Scope (TBD)

  • Create/edit/delete node shapes
  • Add/remove property shapes with constraints
  • Define constraint parameters (datatype, class, cardinality, patterns)
  • Configure IRI generators per shape
  • Preview generated form
  • Map shapes to dataset graphs

Tests

Unit tests

#[test]
fn test_create_node_shape_generates_valid_shacl() {
    // Submit form data for a new NodeShape
    // Verify generated SHACL triples are valid
    // Verify shape can be parsed back by Rudof
}

#[test]
fn test_add_property_shape_with_constraints() {
    // Add a property shape with minCount, datatype, description
    // Verify all constraints are encoded correctly in RDF
}

#[test]
fn test_form_preview_matches_shape() {
    // Create a shape via the editor
    // Request the entity form preview
    // Verify form fields match the shape definition
}

Integration tests

#[tokio::test]
async fn test_shacl_editor_page_loads() {
    // Navigate to SHACL editor for a dataset
    // Verify HTML contains editor UI elements
}

#[tokio::test]
async fn test_create_shape_via_editor() {
    // POST shape creation form
    // Query SHACL store, verify shape exists
    // Request entity form, verify fields generated
}

Manual tests

  1. Open SHACL editor for a dataset
  2. Create a NodeShape with 3 properties (mandatory, optional, entity ref)
  3. Preview the generated form — verify layout matches constraints
  4. Edit an existing shape — change cardinality
  5. Delete a property shape — verify removed from SHACL store
# Blocked by - [\#002 SHACL-driven entity editor](002-shacl-driven-entity-editor.org) (SHACL infrastructure must exist first) # Summary Provide a visual UI for creating and editing SHACL shapes, replacing the need to write SPARQL or Turtle manually. Users should be able to define node shapes, property shapes, constraints, and the mapping between shapes and dataset graphs through a form-based interface. # Motivation In the initial implementation (#001), SHACL shapes are managed via raw SPARQL on the `_shacl/_query` and `_shacl/_update` endpoints. This requires knowledge of SHACL vocabulary and SPARQL syntax. A visual editor would make shape management accessible to non-technical users. # Scope (TBD) - Create/edit/delete node shapes - Add/remove property shapes with constraints - Define constraint parameters (datatype, class, cardinality, patterns) - Configure IRI generators per shape - Preview generated form - Map shapes to dataset graphs # Tests ## Unit tests ``` rust #[test] fn test_create_node_shape_generates_valid_shacl() { // Submit form data for a new NodeShape // Verify generated SHACL triples are valid // Verify shape can be parsed back by Rudof } #[test] fn test_add_property_shape_with_constraints() { // Add a property shape with minCount, datatype, description // Verify all constraints are encoded correctly in RDF } #[test] fn test_form_preview_matches_shape() { // Create a shape via the editor // Request the entity form preview // Verify form fields match the shape definition } ``` ## Integration tests ``` rust #[tokio::test] async fn test_shacl_editor_page_loads() { // Navigate to SHACL editor for a dataset // Verify HTML contains editor UI elements } #[tokio::test] async fn test_create_shape_via_editor() { // POST shape creation form // Query SHACL store, verify shape exists // Request entity form, verify fields generated } ``` ## Manual tests 1. Open SHACL editor for a dataset 2. Create a NodeShape with 3 properties (mandatory, optional, entity ref) 3. Preview the generated form — verify layout matches constraints 4. Edit an existing shape — change cardinality 5. Delete a property shape — verify removed from SHACL store
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
daniel/concon#4
No description provided.