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:
ex:1 is an rdfs:class
ex:1 is of type hqdm:kind_of_organization and all its supertypes.
ex:2 is of type organization and all of its supertypes.
- 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.
Instances of
kind_of_Xare new entity types, so as well as beingrdf:type kind_of_Xthey should also berdfs:subClassOf X.E.g. for an instance of
kind_of_organizationthe triples should be:The
ClassServices.createKindOfX()methods should add therdfs:subClassOf Xpredicate.Also, any entity that is a
member_of_kindof, for example,ex:1above, should also berdf:type ex:1†E.g.:
This allows standard RDFS entailments to infer that:
ex:1is anrdfs:classex:1is of typehqdm:kind_of_organizationand all its supertypes.ex:2is of typeorganizationand all of its supertypes.ex:2will implement theOrganizationinterface and all of its super interfaces soinstanceof Organizationwill betrueand it can be cast to that type rather than simply being aThing.† 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.