ceremonial county of England (E71)

From Wikidata
Jump to navigation Jump to search
language codelabeldescriptionaliasesedit
enceremonial county of Englandbasic schema for a ceremonial county in Englandedit
jaイングランドの典礼カウンティイングランドの典礼カウンティを記述するための基本的なスキーマedit
## Schema for So for example on a class like ceremonial county of England (Q180673) 
## one might identify a shape expression to say that instances of the class should 
## have located in the administrative territorial entity (P131) with a value that is
## instance of (P31) region of England (Q48091)

# DATA: SELECT * WHERE {?item wdt:P31 wd:Q180673 ;}

PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wd: <http://www.wikidata.org/entity/>

start=@<#ceremonial_county_of_England>

<#ceremonial_county_of_England> EXTRA p:P31 { # EXTRA : Except other Qids as values for p:P31 
	p:P31 {ps:P31 [wd:Q180673] ;}; # Q180673 ceremonial county of England}+ ; # There are 1 or more P31 statements
	p:P131 @<#P131_located_in_the_administrative_territorial_entity> ; # There is exactly 1 P131 statement
}

<#P131_located_in_the_administrative_territorial_entity>  {
	ps:P131  @<#region_of_england> ; 
} 	

<#region_of_england> EXTRA p:P31 { 
	p:P31 @<#P31_instance_of_roE> ;
}

<#P31_instance_of_roE> {
	  ps:P31 [wd:Q48091] ; #region of England Q48091
}