Skip to content

Kinds as rdfs:subClassOf #196

Open
@twalmsley

Description

@twalmsley

Instances of kind_of_X are new entity types, so as well as being rdf:type kind_of_X they should also be rdfs:subClassOf X.

E.g. for an instance of kind_of_organization the triples should be:

ex:1 rdf:type hqdm:kind_of_organization.
ex:1 rdfs:subClassOf hqdm:organization.
ex:1 hqdm:data_EntityName "National Government". # optional entity name

The ClassServices.createKindOfX() methods should add the rdfs:subClassOf X predicate.
Also, any entity that is a member_of_kind of, for example, ex:1 above, should also be rdf:type ex:1

E.g.:

ex:2 hqdm:member_of_kind ex:1.
ex:2 rdf:type ex:1.

This allows standard RDFS entailments to infer that:

  1. ex:1 is an rdfs:class
  2. ex:1 is of type hqdm:kind_of_organization and all its supertypes.
  3. ex:2 is of type organization and all of its supertypes.
  4. When read from a triple store by MagmaCore, ex:2 will implement the Organization interface and all of its super interfaces so instanceof Organization will be true and it can be cast to that type rather than simply being a Thing.

† I'm not sure how we enforce this, so some additional changes might need to be included to enforce this constraint, if it is even possible to do that.

Metadata

Metadata

Assignees

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