EntitySchema:E1: Difference between revisions

From Qichwabase
Jump to navigation Jump to search
(Updated Schema text)
(Updated Schema text)
 
(3 intermediate revisions by the same user not shown)
Schema / Line 5: Schema / Line 5:
start = @<Country>
start = @<Country>


<Country> {
<Country> EXTRA wdt:P5 {
   wdt:P5 [wd:Q137 ] ; #instance of a country
   wdt:P5 [wd:Q137] ; #instance of a country
   wdt:P18 .* ; #oficial name of the 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
*/

Latest revision as of 16:44, 7 April 2023

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

*/