Skip to content

Support literal values in owl:hasValue restrictions #177

Description

@jaybea

Problem

extract_restrictions() in rdf_parser.py silently drops any owl:hasValue restriction
where the value is a literal (e.g. owl:hasValue false, owl:hasValue "active"). Only
URIRef values are imported and stored.

This is because class_restrictions.value_uri and SnapshotRestriction.value_uri are
typed exclusively for URIs.

Current impact

Low — evrepo-core and ESEA vocabs only use URI values for hasValue. The
ontology-expressivity.ttl test fixture was adjusted to use a URI value to work around
this gap.

Scope

  • rdf_parser.py:extract_restrictions() — stop skipping literal values
  • class_restrictions table — add a value_literal column (or rename/generalize value_uri)
  • SnapshotRestriction schema — support literal values
  • skos_export_service.py — emit owl:hasValue with literal when appropriate

Context

Identified during Epic #108 Stripe 5 (PR #145).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions