Country (E1)

From Qichwabase
Revision as of 16:44, 7 April 2023 by Elwinlhq (talk | contribs) (Updated Schema text)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
language codelabeldescriptionaliasesedit
enCountryConstraints for country instancesedit
PREFIX wd: <https://qichwa.wikibase.cloud/entity/>
PREFIX wdt: <https://qichwa.wikibase.cloud/prop/direct/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

start = @<Country>

<Country> EXTRA wdt:P5 {
  wdt:P5 [wd:Q137] ; #instance of a country
  wdt:P18 .* ; #oficial name of a country
}

/*******************
# Querying country instances from Qichwabase
PREFIX wd: <https://qichwa.wikibase.cloud/entity/>
PREFIX wdt: <https://qichwa.wikibase.cloud/prop/direct/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?country
WHERE 
{
  ?country wdt:P5 wd:Q137. # Must be of a country
}

# Validating the EntitySchema with ShEX:
https://shex-simple.toolforge.org/wikidata/packages/shex-webapp/doc/shex-simple.html?data=Endpoint:%20https://qichwa.wikibase.cloud/query/sparql&hideData&manifest=[]&textMapIsSparqlQuery&schemaURL=//qichwa.wikibase.cloud%2Fwiki%2FSpecial%3AEntitySchemaText%2FE1

https://qichwa.wikibase.cloud/wiki/Special:EntityData/Q138.ttl

*/