# SHACL shapes, rendered from the LinkML model.
@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 sh: <http://www.w3.org/ns/shacl#> .

<https://smartdatamodels.org/SummaryGroup>
  a sh:PropertyGroup ;
  sh:order 0 ;
  rdfs:label "Základné"@sk, "Summary"@en .

<https://smartdatamodels.org/DetailGroup>
  a sh:PropertyGroup ;
  sh:order 1 ;
  rdfs:label "Detail"@sk, "Detail"@en .

<https://smartdatamodels.org/AnyShape>
  a sh:NodeShape ;
  sh:targetClass <https://w3id.org/linkml/Any> ;
  sh:closed false .

<https://smartdatamodels.org/KeyPerformanceIndicatorShape>
  a sh:NodeShape ;
  sh:targetClass <https://uri.etsi.org/ngsi-ld/default-context/KeyPerformanceIndicator> ;
  sh:closed false ;
  sh:property [
    sh:path <http://schema.org/name> ;
    sh:name "name" ;
    sh:order 0 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The name, per language."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/kpiValue> ;
    sh:name "kpiValue" ;
    sh:order 1 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:float ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "The indicator's value for its period, with the unit as `unitCode` (UN/CEFACT: C62 a count, P1 a percentage, EUR euros, MTK square metres) and the period's last day as `observedAt`, so the history holds one value per period."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/area> ;
    sh:name "area" ;
    sh:order 2 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The name of the area the value describes, a sub-district, district or the whole city."
  ] ;
  sh:property [
    sh:path <http://purl.org/dc/terms/description> ;
    sh:name "description" ;
    sh:order 3 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "A short description, per language."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/calculationPeriod> ;
    sh:name "calculationPeriod" ;
    sh:order 4 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:nodeKind sh:IRI ;
    sh:class <https://w3id.org/linkml/Any> ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "The period the value covers, its first and last day."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/calculationFrequency> ;
    sh:name "calculationFrequency" ;
    sh:order 5 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:in ( "monthly" "quarterly" "yearly" ) ;
    sh:maxCount 1 ;
    rdfs:comment "How often the source publishes a new period."
  ] ;
  sh:property [
    sh:path <https://joinedcontext.com/models/districtCode> ;
    sh:name "districtCode" ;
    sh:order 6 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The city's own code of the area: the district number, or for a sub-district the full ten-digit code the city's statistics use for it. An HSL fare zone has none; its letter is its `fareZone`. The districts and sub-districts mappings write no area without it."
  ] ;
  sh:property [
    sh:path <https://joinedcontext.com/models/divisionLevel> ;
    sh:name "divisionLevel" ;
    sh:order 7 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:in ( "basicDistrict" "city" "cityPart" "district" "fareZone" "majorDistrict" "subDistrict" ) ;
    sh:maxCount 1 ;
    rdfs:comment "Which of the city's divisions the area belongs to: a district or sub-district for an AdministrativeArea; for a statistics indicator also the city, a major or basic district, or the inner city or the suburbs."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/refArea> ;
    sh:name "refArea" ;
    sh:order 8 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:anyURI ;
    sh:maxCount 1 ;
    rdfs:comment "The sub-district (AdministrativeArea) the value describes. Set only for a sub-district the city's register holds; a district or the whole city is named by `area` and `districtCode`."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/process> ;
    sh:name "process" ;
    sh:order 9 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The statistics table the value comes from, in the source's words."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/statisticsTable> ;
    sh:name "statisticsTable" ;
    sh:order 10 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The source's own table code, such as alu_vamuu_010h, which `source` links to."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/dimensionKey> ;
    sh:name "dimensionKey" ;
    sh:order 11 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "Which cell of the table the value is: each kept dimension and its code, such as Sukupuoli=ALL;Tiedot=tyottomyysaste."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/calculatedBy> ;
    sh:name "calculatedBy" ;
    sh:order 12 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The organization that computes the value."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/organization> ;
    sh:name "organization" ;
    sh:order 13 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The organization the indicator describes."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/updatedAt> ;
    sh:name "updatedAt" ;
    sh:order 14 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
    rdfs:comment "When the source last updated the table."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/dataProvider> ;
    sh:name "dataProvider", "Poskytovatel"@cs, "Anbieter"@de, "Provider"@en, "Tarjoaja"@fi, "Poskytovateľ"@sk ;
    sh:order 15 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "Who publishes the data the entity was read from, as an application credits it beside the licence (CC BY 4.0 for every feed of this space)."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/source> ;
    sh:name "source", "Zdroj"@cs, "Quelle"@de, "Source"@en, "Lähde"@fi, "Zdroj"@sk ;
    sh:order 16 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:anyURI ;
    sh:maxCount 1 ;
    rdfs:comment "The open-data service the entity was read from."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/location> ;
    sh:name "location" ;
    sh:order 17 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:maxCount 1 ;
    rdfs:comment "Where the entity is, as GeoJSON geometry."
  ] .
