EntitySchema:E2: Difference between revisions

From geokb
(Updated Schema text)
(Updated Schema text: changed organization to recursive call)
 
(4 intermediate revisions by the same user not shown)
Schema / Line 1: Schema / Line 1:
prefix wd: <https://geokb.wikibase.cloud/entity/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
prefix wdt: <https://geokb.wikibase.cloud/prop/direct/>
PREFIX wd: <https://geokb.wikibase.cloud/entity/>
PREFIX wdt: <https://geokb.wikibase.cloud/prop/direct/>


START = @<Organization>
START = @<Organization>


<Organization> EXTRA wdt:P1 {
<Organization> EXTRA wdt:P62 {
# Must be instance of an organization and any subclasses
  # Must have an Instance Of
wdt:P1 @<OrgClass> * ;
    wdt:P1 . ;


  # Part of another organization
  # "part of" (transitive) "USGS"
wdt:P62 @<OrgClass> * ;
  wdt:P62 @<SubclassUSGS> ;
  
  
  # Has another organization part
  # Alias(es)
wdt:P63 @<OrgClass> * ;
    skos:altLabel . *;
 
  # Operating area
  wdt:P111 IRI ? ;


# Reference URL
  # Reference URL
  wdt:P31 . ? ;
    wdt:P31 IRI + ;
}
}


<OrgClass> EXTRA wdt:P2 {
<SubclassUSGS> {
   wdt:P2 [ wd:Q4 ] * ;
   ( wdt:P62 [ wd:Q44210 ]; wdt:P62 . * ) |
  ( wdt:P62 @<SubclassUSGS>; wdt:P62 . *) *;
}
}

Latest revision as of 18:49, 7 June 2023

language codelabeldescriptionaliasesedit
enOrganizationschema for describing an organizationedit
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX wd: <https://geokb.wikibase.cloud/entity/>
PREFIX wdt: <https://geokb.wikibase.cloud/prop/direct/>

START = @<Organization>

<Organization> EXTRA wdt:P62 {
  # Must have an Instance Of
    wdt:P1 . ;

  # "part of" (transitive) "USGS"
  wdt:P62 @<SubclassUSGS> ;
  	
  # Alias(es)
    skos:altLabel . *;

  # Reference URL
    wdt:P31 IRI + ;
}

<SubclassUSGS> {
  ( wdt:P62 [ wd:Q44210 ]; wdt:P62 . * ) |
  ( wdt:P62 @<SubclassUSGS>; wdt:P62 . *) *;
}