# 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", "Název"@cs, "Name"@de, "Name"@en, "Názov"@sk ;
    sh:order 0 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The name as the city publishes it, in Catalan (a station, an event, a facility, a street section and its stretch, a street address, a district or barri, a work, a tourist flat by its register number)."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/kpiValue> ;
    sh:name "kpiValue", "Hodnota ukazatele"@cs, "Indikatorwert"@de, "Indicator value"@en, "Hodnota ukazovateľa"@sk ;
    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, 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", "Oblast"@cs, "Gebiet"@de, "Area"@en, "Oblasť"@sk ;
    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 barri, a district or the whole city."
  ] ;
  sh:property [
    sh:path <http://purl.org/dc/terms/description> ;
    sh:name "description", "Popis"@cs, "Beschreibung"@de, "Description"@en, "Popis"@sk ;
    sh:order 3 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The description as the city publishes it, in Catalan (a work, a statistics dataset)."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/calculationPeriod> ;
    sh:name "calculationPeriod", "Období výpočtu"@cs, "Berechnungszeitraum"@de, "Calculation period"@en, "Obdobie výpočtu"@sk ;
    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", "Frekvence výpočtu"@cs, "Berechnungshäufigkeit"@de, "Calculation frequency"@en, "Frekvencia výpočtu"@sk ;
    sh:order 5 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:in ( "monthly" "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", "Kód území"@cs, "Gebietscode"@de, "Area code"@en, "Kód územia"@sk ;
    sh:order 6 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The city's own two-digit code of the area: the district number 01..10, or for a barri its number 01..73, which runs across the whole city."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/divisionLevel> ;
    sh:name "divisionLevel", "Úroveň členění"@cs, "Gliederungsebene"@de, "Division level"@en, "Úroveň členenia"@sk ;
    sh:order 7 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:in ( "city" "district" "neighbourhood" ) ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "Which of the city's two divisions the area belongs to; for a statistics indicator also the whole city."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/refArea> ;
    sh:name "refArea", "Území"@cs, "Gebietseinheit"@de, "Area unit"@en, "Územie"@sk ;
    sh:order 8 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:anyURI ;
    sh:maxCount 1 ;
    rdfs:comment "The district or barri (AdministrativeArea) the value describes; none for the whole city."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/process> ;
    sh:name "process", "Proces"@cs, "Prozess"@de, "Process"@en, "Proces"@sk ;
    sh:order 9 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The statistics dataset the value comes from, its Open Data BCN title in Catalan."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/statisticsTable> ;
    sh:name "statisticsTable", "Statistická tabulka"@cs, "Statistiktabelle"@de, "Statistics table"@en, "Štatistická tabuľka"@sk ;
    sh:order 10 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The Open Data BCN dataset the value comes from, such as pad_mdbas, which `source` links to."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/dimensionKey> ;
    sh:name "dimensionKey", "Členění"@cs, "Aufschlüsselung"@de, "Breakdown"@en, "Členenie"@sk ;
    sh:order 11 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "Which breakdown of the dataset the value is: each kept column and its value as the source writes it, such as SEXE=2; total when the dataset has no breakdown."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/calculatedBy> ;
    sh:name "calculatedBy", "Vypočítal"@cs, "Berechnet von"@de, "Calculated by"@en, "Vypočítal"@sk ;
    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", "Organizace"@cs, "Organisation"@de, "Organization"@en, "Organizácia"@sk ;
    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/dataProvider> ;
    sh:name "dataProvider", "Poskytovatel dat"@cs, "Datenanbieter"@de, "Data provider"@en, "Poskytovateľ údajov"@sk ;
    sh:order 14 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "Who publishes the data the entity was read from, with the credit its licence asks for."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/source> ;
    sh:name "source", "Zdroj"@cs, "Quelle"@de, "Source"@en, "Zdroj"@sk ;
    sh:order 15 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:anyURI ;
    sh:maxCount 1 ;
    rdfs:comment "The open-data file or the Open Data BCN dataset the entity was read from."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/location> ;
    sh:name "location" ;
    sh:order 16 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:maxCount 1 ;
    rdfs:comment "Where the entity is, as GeoJSON geometry."
  ] .
