query-01d642353ae7a0e291be52c37ff1c462
Propertiesinstance of (P31)subclass of (P279)maintained by WikiProject (P6104)equivalent property (P1628)subproperty of (P1647)property constraint (P2302)class (P2308)relation (P2309)
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
CONSTRUCT {
?prop rdf:type owl:DataTypeProperty;
rdfs:label ?propLabel;
# rdfs:domain ?domain;
rdfs:range ?range;
schema:description ?propDescription;
skos:altLabel ?propAlias;
owl:equivalentProperty ?equivalentProp;
rdfs:subPropertyOf ?superProp.
# ?domain rdf:type owl:Class;
# rdfs:label ?domainLabel;
# owl:unionOf ( ?domainElement ).
} WHERE {
{
?prop wdt:P31/wdt:P279* wd:Q27525351.
} UNION {
?prop wdt:P6104 wd:Q5830855.
}
VALUES (?type ?range) { # https://www.wikidata.org/wiki/Help:Data_type#Technical_details
(wikibase:Quantity xsd:decimal)
(wikibase:Time xsd:dateTime)
(wikibase:Monolingualtext xsd:string)
(wikibase:String xsd:string)
(wikibase:MusicalNotation xsd:string)
}
?prop wikibase:propertyType ?type;
rdfs:label ?propLabel FILTER(lang(?propLabel) = 'en').
# BIND(IRI(REPLACE(
# STR(?prop),
# 'http://www.wikidata.org/entity/',
# 'https://raw.githubusercontent.com/Danysan1/unibo-ke-matching-ontologies/main/wikidata/ontology/domain/'
# )) AS ?domain).
# BIND(REPLACE(STR(?prop),'http://www.wikidata.org/entity/','domain of ') AS ?domainLabel).
# OPTIONAL {
# ?prop p:P2302 [
# ps:P2302 wd:Q21503250;
# pq:P2308 ?domainElement;
# pq:P2309 wd:Q21503252
# ].
# }
OPTIONAL { ?prop schema:description ?propDescription FILTER(lang(?propDescription) = 'en'). }
OPTIONAL { ?prop skos:altLabel ?propAlias FILTER(lang(?propAlias) = 'en'). }
OPTIONAL { ?prop wdt:P1628 ?equivalentProp. }
OPTIONAL { ?prop wdt:P1647 ?superProp. }
}
ORDER BY ?prop
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v14("?_const_15732a70_uri"):::projected
v10("?_const_1bbcdb25_uri")
v16("?_const_2a9456f4_uri")
v13("?_const_5fa4fb96_uri"):::projected
v15("?_const_65cb026b_uri")
v11("?_const_9285ccfc_uri"):::projected
v12("?_const_92da8745_uri")
v9("?_const_f5e5585a_uri")
v7("?equivalentProp"):::projected
v1("?prop"):::projected
v2("?propAlias"):::projected
v4("?propDescription"):::projected
v3("?propLabel"):::projected
v13("?range"):::projected
v8("?superProp"):::projected
v5("?type"):::projected
a1((" ")):::projected
c6(["wd:Q5830855"]):::iri
c4(["wd:Q27525351"]):::iri
f0[["?propLabel = 'en'"]]
f0 --> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P6104"--> c6
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c4
end
union0r <== or ==> union0l
end
bind1[/VALUES ?range ?type/]
bind1-->v5
bind1-->v13
bind10(["wikibase:Quantity"])
bind10 --> bind1
bind11(["xsd:decimal"])
bind11 --> bind1
bind12(["wikibase:Time"])
bind12 --> bind1
bind13(["xsd:dateTime"])
bind13 --> bind1
bind14(["wikibase:Monolingualtext"])
bind14 --> bind1
bind15(["xsd:string"])
bind15 --> bind1
bind16(["wikibase:String"])
bind16 --> bind1
bind17(["xsd:string"])
bind17 --> bind1
bind18(["wikibase:MusicalNotation"])
bind18 --> bind1
bind19(["xsd:string"])
bind19 --> bind1
v1 --"wikibase:propertyType"--> v5
v1 --"rdfs:label"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."schema:description".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."skos:altLabel".-> v2
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P1628".-> v7
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P1647".-> v8
end
bind2[/""a""/]
bind2 --as--o v9
bind3[/"'owl:DataTypeProperty'"/]
bind3 --as--o v10
bind4[/"'rdfs:label'"/]
bind4 --as--o v11
bind5[/"'rdfs:range'"/]
bind5 --as--o v12
bind6[/"?range"/]
v13 --o bind6
bind6 --as--o v13
bind7[/"'schema:description'"/]
bind7 --as--o v13
bind8[/"'skos:altLabel'"/]
bind8 --as--o v14
bind9[/"'owl:equivalentProperty'"/]
bind9 --as--o v15
bind10[/"'rdfs:subPropertyOf'"/]
bind10 --as--o v16