EntitySchema:E2: Difference between revisions

From geokb
(Updated Schema text)
(Updated Schema text: changed organization to recursive call)
 
(5 intermediate revisions by 2 users not shown)
Schema / Line 1: Schema / Line 1:
prefix skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
prefix schema: <http://schema.org/>
PREFIX wd: <https://geokb.wikibase.cloud/entity/>
prefix wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <https://geokb.wikibase.cloud/prop/direct/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
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 . *) *;
}