query-56b18209c2ba23ccb355f004ca16df57
Problems with higher order metaclassesA class can be identified as such by itself being a subclass of another class, by having another class be its subclass, or most directly by having instances. These provides three different mechanisms for detecting higher order classes as well, as the following queries illustrate. Wikidata:WikiProject Ontology/Problems/3rd order metaclasses by instance Wikidata:WikiProject Ontology/Problems/3rd order metaclasses by superclass Wikidata:WikiProject Ontology/Problems/3rd order metaclasses by subclassThese are only looking at direct instance-of relationships up the hierarchy. The most general query along these lines would look like, for example:
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
select DISTINCT ?item WHERE
{ ?metametaclass wdt:P31 ?item .
?metaclass wdt:P31/wdt:P279* ?metametaclass .
?class wdt:P31/wdt:P279* ?metaclass .
?otherclass wdt:P279 ?class . }
Query found at
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Ontology/Problems
- https://www.wikidata.org/wiki/Wikidata:WikiProject_Ontology/Problems/High_order_metaclasses
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?class")
v2("?item"):::projected
v3("?metaclass")
v1("?metametaclass")
v5("?otherclass")
a1((" "))
a2((" "))
v1 --"wdt:P31"--> v2
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> v1
v4 --"wdt:P31"--> a2
a2 --"wdt:P279"--> v3
v5 --"wdt:P279"--> v4