# 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/ServiceRequestShape>
  a sh:NodeShape ;
  sh:targetClass <https://uri.etsi.org/ngsi-ld/default-context/ServiceRequest> ;
  sh:closed false ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/service_request_id> ;
    sh:name "service_request_id" ;
    sh:order 0 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "The number the city's feedback system gives the report (Open311 `service_request_id`)."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/status> ;
    sh:name "status" ;
    sh:order 1 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:in ( "closed" "open" ) ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "open while the city handles the report (PROCESSING), closed once it has answered (READY)."
  ] ;
  sh:property [
    sh:path <http://schema.org/description> ;
    sh:name "description" ;
    sh:order 2 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The report as the reporter wrote it, in the language they wrote it in (`@none`)."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/service_code> ;
    sh:name "service_code" ;
    sh:order 3 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The feedback system's code of the sector the report is filed under, for example 2809."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/service_name> ;
    sh:name "service_name" ;
    sh:order 4 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The sector's name in English, read from the feedback system's services list, for example City environment."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/status_notes> ;
    sh:name "status_notes" ;
    sh:order 5 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The city's answer or note on the report, as published."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/agency_responsible> ;
    sh:name "agency_responsible" ;
    sh:order 6 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The city unit handling the report, when the feedback system names one."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/requested_datetime> ;
    sh:name "requested_datetime" ;
    sh:order 7 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:dateTime ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "When the report was filed, ISO 8601 in UTC."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/updated_datetime> ;
    sh:name "updated_datetime" ;
    sh:order 8 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
    rdfs:comment "When the report last changed, ISO 8601 in UTC."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/expected_datetime> ;
    sh:name "expected_datetime" ;
    sh:order 9 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
    rdfs:comment "When the city expects to have handled the report, if it says."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/address_string> ;
    sh:name "address_string" ;
    sh:order 10 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The street or place the reporter named, as written, for example Malminkatu."
  ] ;
  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 11 ;
    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 12 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:maxCount 1 ;
    rdfs:comment "Where the entity is, as GeoJSON geometry."
  ] .
