# 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/AlertShape>
  a sh:NodeShape ;
  sh:targetClass <https://smartdatamodels.org/Alert> ;
  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 <http://schema.org/description> ;
    sh:name "description" ;
    sh:order 1 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "A short description, per language."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/category> ;
    sh:name "category" ;
    sh:order 2 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The alert's domain; traffic for everything Fintraffic and HSL publish."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/subCategory> ;
    sh:name "subCategory" ;
    sh:order 3 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The Smart Data Models code of the alert, roadWorks for a Fintraffic road work. Left out where no code fits: a Fintraffic traffic announcement and an HSL service alert."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/alertSource> ;
    sh:name "alertSource" ;
    sh:order 4 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "Who raised the alert, Fintraffic or HSL."
  ] ;
  sh:property [
    sh:path <https://joinedcontext.com/models/effect> ;
    sh:name "effect" ;
    sh:order 5 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "What an HSL service alert does to the service, as GTFS-RT names it, such as DETOUR or REDUCED_SERVICE."
  ] ;
  sh:property [
    sh:path <https://joinedcontext.com/models/cause> ;
    sh:name "cause" ;
    sh:order 6 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "Why an HSL service alert is in force, as GTFS-RT names it, such as CONSTRUCTION or MAINTENANCE."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/severity> ;
    sh:name "severity" ;
    sh:order 7 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "How much the alert matters, informational, medium or high (GTFS-RT INFO, WARNING, SEVERE)."
  ] ;
  sh:property [
    sh:path <http://schema.org/address> ;
    sh:name "address" ;
    sh:order 8 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:anyURI ;
    sh:maxCount 1 ;
    rdfs:comment "The postal address as the source publishes it, field by field (Smart Data Models' common PostalAddress); a field the source leaves out is absent, never guessed from a line of text."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/dateIssued> ;
    sh:name "dateIssued" ;
    sh:order 9 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
    rdfs:comment "When the situation was published."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/validFrom> ;
    sh:name "validFrom" ;
    sh:order 10 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
    rdfs:comment "When the situation starts."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/validTo> ;
    sh:name "validTo" ;
    sh:order 11 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
    rdfs:comment "When the situation ends; absent while open-ended."
  ] ;
  sh:property [
    sh:path <https://joinedcontext.com/models/refRoute> ;
    sh:name "refRoute" ;
    sh:order 12 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:anyURI ;
    rdfs:comment "The lines an HSL service alert affects, each a GtfsRoute of this space."
  ] ;
  sh:property [
    sh:path <https://joinedcontext.com/models/refStop> ;
    sh:name "refStop" ;
    sh:order 13 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:anyURI ;
    rdfs:comment "The stops an HSL service alert affects, each a GtfsStop of this space."
  ] ;
  sh:property [
    sh:path <https://joinedcontext.com/models/unknownReference> ;
    sh:name "unknownReference" ;
    sh:order 14 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    rdfs:comment "What an HSL service alert names that this space holds no entity for, as `route:<id>` or `stop:<id>`, kept as text rather than as a relationship that would point at nothing."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/source> ;
    sh:name "source", "Zdroj"@cs, "Quelle"@de, "Source"@en, "Lähde"@fi, "Zdroj"@sk ;
    sh:order 15 ;
    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://purl.org/geojson/vocab#geometry> ;
    sh:name "location" ;
    sh:order 16 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:maxCount 1 ;
    rdfs:comment "Where the entity is, as GeoJSON geometry."
  ] .
