Skip to content

Fix: Conceptualizer should store individuals in Fuseki for CQ compatibility #61

@laserpointlabs

Description

@laserpointlabs

Problem

When the DAS conceptualizer creates individuals, it stores them only in PostgreSQL database tables (individual_instances). However, Competency Questions (CQs) query Fuseki using SPARQL, so they cannot find these individuals.

Current Behavior

  1. User conceptualizes requirements using DAS
  2. Conceptualizer stores individuals in PostgreSQL (individual_instances table)
  3. CQs query Fuseki for RDF triples
  4. CQs return 0 rows because individuals aren't in Fuseki

Expected Behavior

Conceptualizer should store individuals in both:

  • PostgreSQL (for Individual Tables UI)
  • Fuseki (for SPARQL/CQ queries)

Impact

  • All relationship-based CQs fail
  • Entity identification CQs fail (until manual sync)
  • BSEO_V1 CQMT workbench returns empty results
  • Users can't use CQs to validate their ontology

Temporary Workaround

Created scripts/sync_das_individuals_to_fuseki.py to manually sync individuals from PostgreSQL to Fuseki.

Solution

Modify backend/api/configurations.py conceptualize_and_store_individual function to:

  1. Keep existing PostgreSQL storage (line 960-970)
  2. Add Fuseki storage call (similar to create_fuseki_individual in backend/api/individuals.py)
  3. Store relationships as RDF triples in Fuseki

Related Files

  • backend/api/configurations.py - Line 960-970: PostgreSQL storage
  • backend/api/individuals.py - Line 910-959: Fuseki individual creation
  • scripts/sync_das_individuals_to_fuseki.py - Temporary sync script

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions