# 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/TrafficFlowObservedShape>
  a sh:NodeShape ;
  sh:targetClass <https://uri.etsi.org/ngsi-ld/default-context/TrafficFlowObserved> ;
  sh:closed false ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/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/dateObserved> ;
    sh:name "dateObserved" ;
    sh:order 1 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:dateTime ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "The end of the counted day, the same instant as dateObservedTo."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/dateObservedFrom> ;
    sh:name "dateObservedFrom" ;
    sh:order 2 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
    rdfs:comment "The start of the period the observation counts, the local midnight that opens the day."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/dateObservedTo> ;
    sh:name "dateObservedTo" ;
    sh:order 3 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
    rdfs:comment "The end of the period the observation counts, the local midnight that closes the day."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/intensity> ;
    sh:name "intensity" ;
    sh:order 4 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:integer ;
    sh:maxCount 1 ;
    rdfs:comment "How many vehicles, or bicycles, the counter detected in the day, in one direction."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/averageVehicleSpeed> ;
    sh:name "averageVehicleSpeed" ;
    sh:order 5 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:float ;
    sh:maxCount 1 ;
    rdfs:comment "The mean speed of the vehicles the counter measured in the period, in km/h."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/vehicleType> ;
    sh:name "vehicleType" ;
    sh:order 6 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:in ( "bicycle" ) ;
    sh:maxCount 1 ;
    rdfs:comment "The one kind of vehicle the observation counts, in the Smart Data Model's words; absent when the counter sums every class of motor vehicle."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/trafficDirection> ;
    sh:name "trafficDirection" ;
    sh:order 7 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:in ( "east" "inbound" "north" "outbound" "south" "west" ) ;
    sh:maxCount 1 ;
    rdfs:comment "The compass direction, or into and out of the centre, the counted traffic travels, as the city's counter names it (Pohjoiseen is north). Smart Data Models' laneDirection needs a road segment to mean anything, which the counters do not name. Absent when the counter sums both directions."
  ] ;
  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 8 ;
    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 9 ;
    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 10 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:maxCount 1 ;
    rdfs:comment "Where the entity is, as GeoJSON geometry."
  ] .
