Skip to content

Members of metaclasses should explicitly be classes #575

@ajnelson-nist

Description

@ajnelson-nist

This is a follow-on to PR 512, which, among other things, initiated a metaclass design pattern. I have no complaints about the pattern's design, but did come across an implementation detail that I think would be helpful to spell more explicitly.

The instances of metaclasses are currently subjects of rdfs:subClassOf, but are not themselves rdfs:Classes. There are a few benefits to being explicit that these nodes are rdfs:Classes:

  • If they are classes, the OWL casting for Issue 246 can just look for instances of rdfs:Class.
  • Seeing the extra rdf:type on a rdfs:Class emphasizes that these are intentionally members of meta-classes; and, likewise, there are meta-classes floating around somewhere.
  • There is a reduced chance of confusion from seeing rdfs:subClassOf on something that is not explicitly an rdfs:Class.

I came across the now-missing rdfs:Class statements because a prior state of Issue 246's PR had already done the casting of sh:SelectExpression and sh:SPARQLExprExpression, but post PR 512, it looked like they'd dropped, and I became curious if they'd migrated to shnex.ttl. They didn't; they'd just lost the a rdfs:Class triple I'd been relying on in my CONSTRUCT query.

I'll file a PR momentarily to add a rdfs:Class to all the subjects of rdfs:subClassOf.

Metadata

Metadata

Assignees

Labels

CoreFor SHACL 1.2 Core spec

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions