Skip to content

Imported ontologies with rdfs:subClassOf hierarchies have no relationships (Brick: 1,530 entities, 0 edges) #101

Description

Describe the bug

After #96, the Brick ontology imports successfully — but the resulting graph has 1,530 entity types and 0 relationships. Every node is disconnected, which makes the imported ontology unusable for exploration.

Repro

  1. Download Brick 1.4 as RDF/XML (content negotiation on https://brickschema.org/schema/Brick, Accept: application/rdf+xml)
  2. Import it (with fix: support rdf:Description typed-node syntax in RDF import (Brick) #96 applied so the import succeeds)
  3. Observe: 1,530 entities, 0 relationships

Root cause

The relationship mapper only builds relationships from owl:ObjectProperty elements carrying rdfs:domain/rdfs:range pairs. Brick 1.4 contains just 2 rdfs:domain and 5 rdfs:range statements in the whole 5.2 MB file — its actual graph structure is the class taxonomy:

  • 2,016 rdfs:subClassOf statements between classes (e.g. brick:DDAHU rdfs:subClassOf brick:Air_Handling_Unit), which the parser ignores entirely.

This affects any ontology whose structure is primarily a class hierarchy (most published OWL taxonomies), not just Brick.

Expected behavior

rdfs:subClassOf references between imported classes should be extracted as relationships so the taxonomy is visible and navigable in the graph.

(Brick also expresses property domain/range constraints via SHACL property shapes — sh:propertysh:path/sh:class — which could be a further enhancement, but the subClassOf hierarchy is the dominant structure and the highest-value fix.)

Happy to submit a PR for this — follow-up to #96 as noted in its description.

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