@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix :        <vocab#> .

# ---- Ontology declaration -----------------------------------------------

<vocab>
    a               owl:Ontology ;
    rdfs:label      "Linked GISCO vocabulary"@en , "Linked-GISCO-Vokabular"@de ;
    dcterms:title   "Linked GISCO vocabulary"@en , "Linked-GISCO-Vokabular"@de ;
    dcterms:description
        "The wrapper-local terms minted by the linked-gisco wrapper that are not covered by the standard vocabularies it otherwise uses (SKOS for the classification, W3C basic geo and OGC GeoSPARQL for the spatial answers): the per-LAU demographic attributes carried on each LAU concept, and the Linked Data Service (LIDS) terms for the /search and /contains endpoints (with both the NUTS-side vocab:level and the LAU-side vocab:country facets). Stable English local-names are the identifiers; rdfs:label carries display names in en + de."@en ;
    dcterms:hasPart <vocab/gisco> .

# ---- Per-LAU demographic attributes -------------------------------------

:population2024
    a               rdf:Property ;
    rdfs:label      "population (2024)"@en , "Einwohnerzahl (2024)"@de ;
    rdfs:domain     skos:Concept ; rdfs:range xsd:integer ;
    rdfs:comment    "Resident population of the LAU (GISCO 2024 edition); omitted when the source value is 0 (missing/unavailable)."@en .

:populationDensity2024
    a               rdf:Property ;
    rdfs:label      "population density (2024)"@en , "Bevölkerungsdichte (2024)"@de ;
    rdfs:domain     skos:Concept ; rdfs:range xsd:decimal ;
    rdfs:comment    "Population per square kilometre of the LAU (GISCO 2024 edition); omitted when the source value is 0."@en .

:areaKm2
    a               rdf:Property ;
    rdfs:label      "area (km²)"@en , "Fläche (km²)"@de ;
    rdfs:domain     skos:Concept ; rdfs:range xsd:decimal ;
    rdfs:comment    "Area of the LAU in square kilometres (GISCO 2024 edition); omitted when the source value is 0."@en .

# ---- Linked Data Service (LIDS) terms -----------------------------------
# The /search endpoint is modelled as a Linked Data Service (Speiser & Harth,
# "Integrating Linked Data and Services with Linked Data Services", ESWC 2011):
# the service call is reified as a named input entity (a vocab:Query) under a #id
# fragment, minted from the query parameters and related to each matching LAU
# via vocab:result. Resolving the call URI returns the input and its result links.
# In Turtle the call entity is relativized against the query-less /search base, so
# it serializes host-free as <?…#id>. This mirrors the geo:Point input entity the
# /contains endpoint already reifies, and the mastr:Query of the sibling
# linked-mastr wrapper.

:Query
    a               rdfs:Class ;
    rdfs:label      "Search query"@en , "Suchanfrage"@de ;
    rdfs:comment    "The input entity of a /search service call: the active query facets (vocab:queryText and the optional vocab:country), related via vocab:result to each matching LAU concept."@en .

:queryText
    a               rdf:Property ;
    rdfs:label      "query text"@en , "Suchtext"@de ;
    rdfs:domain     :Query ;
    rdfs:range      xsd:string ;
    rdfs:comment    "The case-folded GISCO_ID/name substring a /search query matches a LAU's GISCO_ID or local-language name on."@en .

:country
    a               rdf:Property ;
    rdfs:label      "country filter"@en , "Länder-Filter"@de ;
    rdfs:domain     :Query ;
    rdfs:range      xsd:string ;
    rdfs:comment    "The 2-letter country code (e.g. DE) a /search query restricts its hits to, when given."@en .

:level
    a               rdf:Property ;
    rdfs:label      "NUTS level filter"@en , "NUTS-Ebenen-Filter"@de ;
    rdfs:domain     :Query ;
    rdfs:range      xsd:integer ;
    rdfs:comment    "The NUTS level (0..3) a /search query restricts its hits to, when given."@en .

:result
    a               rdf:Property ;
    rdfs:label      "query result"@en , "Abfrageergebnis"@de ;
    rdfs:domain     :Query ;
    rdfs:range      skos:Concept ;
    rdfs:comment    "Links a /search query to one of its matching LAU concepts."@en .

# ---- Region classes and the country code list ---------------------------
# What a region IS (Andreas / app-erdapfel, 2026-11-10; linked-family
# checklist-geo.md, "Classes and code lists"): one class per NUTS level and one
# for LAU, beside the SKOS classification (every region stays a skos:Concept in
# its cl/{level} or cl/{CC} scheme). A region's COUNTRY is not a class but a
# code list value: the list is cl/0, whose values are the NUTS level-0 regions
# (nuts/{CC}#it), so the values of :inCountry are exactly the :Nuts0Region
# instances. Every region, NUTS or LAU, states :inCountry directly.

:Region
    a               rdfs:Class ;
    rdfs:label      "Region (GISCO)"@en , "Gebiet (GISCO)"@de ;
    rdfs:comment    "A territorial unit of the European statistical system as published by Eurostat GISCO: a NUTS region at one of the levels 0 to 3, or a local administrative unit (LAU)."@en .

:NutsRegion
    a               rdfs:Class ;
    rdfs:subClassOf :Region ;
    rdfs:label      "NUTS region"@en , "NUTS-Region"@de ;
    skos:notation   "NUTS" ;
    rdfs:comment    "A region of the Nomenclature of Territorial Units for Statistics (NUTS), at one of the levels 0 (country) to 3 (small region)."@en ;
    rdfs:seeAlso    <https://ec.europa.eu/eurostat/web/nuts/background> .

:Nuts0Region
    a               rdfs:Class ;
    rdfs:subClassOf :NutsRegion ;
    rdfs:label      "NUTS 0 region (country)"@en , "NUTS-0-Region (Staat)"@de ;
    skos:notation   "0" ;
    rdfs:comment    "A NUTS region at level 0: a country. The NUTS 0 regions are the values of the country code list cl/0 (see :inCountry)."@en ;
    rdfs:seeAlso    <cl/0> .

:Nuts1Region
    a               rdfs:Class ;
    rdfs:subClassOf :NutsRegion ;
    rdfs:label      "NUTS 1 region (major region)"@en , "NUTS-1-Region (Großregion)"@de ;
    skos:notation   "1" ;
    rdfs:comment    "A NUTS region at level 1: a major socio-economic region (in Germany a Land)."@en ;
    rdfs:seeAlso    <cl/1> .

:Nuts2Region
    a               rdfs:Class ;
    rdfs:subClassOf :NutsRegion ;
    rdfs:label      "NUTS 2 region (basic region)"@en , "NUTS-2-Region (Grundregion)"@de ;
    skos:notation   "2" ;
    rdfs:comment    "A NUTS region at level 2: a basic region for the application of regional policies (in Germany a Regierungsbezirk or comparable)."@en ;
    rdfs:seeAlso    <cl/2> .

:Nuts3Region
    a               rdfs:Class ;
    rdfs:subClassOf :NutsRegion ;
    rdfs:label      "NUTS 3 region (small region)"@en , "NUTS-3-Region (Kleinregion)"@de ;
    skos:notation   "3" ;
    rdfs:comment    "A NUTS region at level 3: a small region for specific diagnoses (in Germany a Kreis or kreisfreie Stadt)."@en ;
    rdfs:seeAlso    <cl/3> .

:LauRegion
    a               rdfs:Class ;
    rdfs:subClassOf :Region ;
    rdfs:label      "Local administrative unit (LAU)"@en , "Gemeinde (LAU)"@de ;
    skos:notation   "LAU" ;
    rdfs:comment    "A local administrative unit (LAU): a municipality or equivalent, the building block of the NUTS 3 regions. In Germany a Gemeinde; the GISCO_ID after DE_ is its 8-digit AGS."@en .

:inCountry
    a               rdf:Property ;
    rdfs:label      "country"@en , "Staat"@de ;
    rdfs:domain     :Region ;
    rdfs:range      :Nuts0Region ;
    rdfs:comment    "The country a region lies in, as a value of the country code list cl/0: the NUTS 0 region nuts/{CC}#it (CC as GISCO writes it: EL for Greece). Stated on every region, so a client need not walk skos:broader to level 0. A NUTS 0 region is in itself."@en ;
    rdfs:seeAlso    <cl/0> .
