# 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/EventShape>
  a sh:NodeShape ;
  sh:targetClass <https://uri.etsi.org/ngsi-ld/default-context/Event> ;
  sh:closed false ;
  sh:property [
    sh:path <https://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:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "The title of the event as the source writes it, in Slovak."
  ] ;
  sh:property [
    sh:path <https://schema.org/startDate> ;
    sh:name "startDate", "Začátek"@cs, "Beginn"@de, "Start"@en, "Začiatok"@sk ;
    sh:order 1 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "When the event starts: an RFC 3339 instant with its offset (`2026-11-14T19:00:00+01:00`, Europe/Bratislava as the source publishes it), or a date alone (`2026-11-14`) for an event that lasts whole days."
  ] ;
  sh:property [
    sh:path <https://schema.org/endDate> ;
    sh:name "endDate", "Konec"@cs, "Ende"@de, "End"@en, "Koniec"@sk ;
    sh:order 2 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "When the event ends, written as `startDate`; for a whole-day event its last day, inclusive. Absent when the source gives no end: the calendar then shows the start alone."
  ] ;
  sh:property [
    sh:path <https://purl.org/geojson/vocab#geometry> ;
    sh:name "location", "Poloha"@cs, "Standort"@de, "Location"@en, "Poloha"@sk ;
    sh:order 3 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:maxCount 1 ;
    rdfs:comment "Where the event takes place, a GeoJSON Point in WGS 84 inside Slovakia (longitude 16.8 to 22.6, latitude 47.7 to 49.7): the source's own point, the venue's building, else the organizer's or the town's office or the town's centre, as `locationPrecision` says (owner 2026-10-21: at least 90 % of events with a point)."
  ] ;
  sh:property [
    sh:path <https://joinedcontext.com/models/venue> ;
    sh:name "venue", "Místo konání"@cs, "Veranstaltungsort"@de, "Venue"@en, "Miesto konania"@sk ;
    sh:order 4 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The name of the place, as the source writes it (a hall, a square, a museum)."
  ] ;
  sh:property [
    sh:path <https://schema.org/address> ;
    sh:name "address", "Adresa"@cs, "Adresse"@de, "Address"@en, "Adresa"@sk ;
    sh:order 5 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:nodeKind sh:IRI ;
    sh:class <https://w3id.org/linkml/Any> ;
    sh:maxCount 1 ;
    rdfs:comment "The postal address of the venue, field by field (Smart Data Models' common PostalAddress); `addressLocality` is the town a calendar filters on. A field the source leaves out is absent, never guessed."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/category> ;
    sh:name "category", "Kategorie"@cs, "Kategorie"@de, "Category"@en, "Kategória"@sk ;
    sh:order 6 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:in ( "children-family" "community-civic" "education-talk" "exhibition-museum" "faith-tradition" "festival-fair" "film" "food-market" "health-wellness" "history-heritage" "hobby-workshop" "music" "other" "outdoor-nature" "sport" "theatre-dance" ) ;
    rdfs:comment "The event's main category, one code of the platform's list of 16 (docs API/12-event-categories.md), picked by the rule table seeds/event-categories.json from the source's own word, the name or the kind of body that announced it (`music`, `sport`), else by the decision model's cached answer. A list of one, as Smart Data Models' Event writes `category`; absent while neither has named the event."
  ] ;
  sh:property [
    sh:path <https://schema.org/organizer> ;
    sh:name "organizer", "Pořadatel"@cs, "Veranstalter"@de, "Organizer"@en, "Organizátor"@sk ;
    sh:order 7 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:nodeKind sh:IRI ;
    sh:class <https://w3id.org/linkml/Any> ;
    sh:maxCount 1 ;
    rdfs:comment "Who runs the event: the museum, the school, the town or the named performer, never the feed or the aggregator that announced it (that is `dataProvider`). Its name and its web site only, never a person's e-mail or phone."
  ] ;
  sh:property [
    sh:path <https://schema.org/url> ;
    sh:name "url", "Odkaz"@cs, "Link"@de, "Link"@en, "Odkaz"@sk ;
    sh:order 8 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:anyURI ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "An http(s) link a person opens: the page of the event at its source, where they read more or buy a ticket, else the organizer's page that lists its events."
  ] ;
  sh:property [
    sh:path <https://joinedcontext.com/models/eventCategory> ;
    sh:name "eventCategory", "Kategorie u zdroje"@cs, "Kategorie der Quelle"@de, "Category at the source"@en, "Kategória u zdroja"@sk ;
    sh:order 9 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The kind of event in the source's own words (`koncert`, `výstava`, `šport`), kept so `category` can be traced back to it."
  ] ;
  sh:property [
    sh:path <https://smartdatamodels.org/audience> ;
    sh:name "audience", "Pro koho"@cs, "Zielgruppe"@de, "Audience"@en, "Pre koho"@sk ;
    sh:order 10 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:in ( "children" "family" ) ;
    rdfs:comment "Who the event is for, in Smart Data Models' Event codes; set with the category `children-family`, `children` when the source or the name says children, else `family`."
  ] ;
  sh:property [
    sh:path <https://joinedcontext.com/models/categorySource> ;
    sh:name "categorySource", "Původ kategorie"@cs, "Kategorie bestimmt durch"@de, "Category picked by"@en, "Pôvod kategórie"@sk ;
    sh:order 11 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "How `category` was picked: `rule` the rule table, `model` the decision model's cached answer for an event no rule decides (scripts/events-classify.py)."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/locationPrecision> ;
    sh:name "locationPrecision", "Přesnost polohy"@cs, "Genauigkeit des Orts"@de, "Location precision"@en, "Presnosť polohy"@sk ;
    sh:order 12 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:in ( "building" "centre" "office" "source" ) ;
    sh:maxCount 1 ;
    rdfs:comment "How close `location` is to the venue: `source` the publisher's own point, `building` the venue's building (the address register or a venue checked against OpenStreetMap), `office` the organizer's or the town's office standing in for a venue nobody placed, `centre` the town's centre. A map draws `office` and `centre` as approximate."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/locationSource> ;
    sh:name "locationSource", "Zdroj polohy"@cs, "Ort bestimmt durch"@de, "Location placed by"@en, "Zdroj polohy"@sk ;
    sh:order 13 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "Who placed `location`: `feed` the publisher, `register-adries`, `overpass`, `nominatim` or `hand` the venue table's row (seeds/bbsk-events/venues.csv), `towns` the town table's office or centre."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/refPointOfInterest> ;
    sh:name "refPointOfInterest", "Místo"@cs, "Ort"@de, "Place"@en, "Miesto"@sk ;
    sh:order 14 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:nodeKind sh:IRI ;
    sh:class <https://uri.etsi.org/ngsi-ld/default-context/PointOfInterest> ;
    sh:maxCount 1 ;
    rdfs:comment "The venue as a PointOfInterest of this space, when the venue table placed the event; every event held there links the same one (DM-141)."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/areaServed> ;
    sh:name "areaServed", "Obec"@cs, "Gemeinde"@de, "Municipality"@en, "Obec"@sk ;
    sh:order 15 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The municipality the event or the venue belongs to, by its official name (`Detva`, `Košice`): the key a count or a filter per town reads, on every event (DM-141)."
  ] ;
  sh:property [
    sh:path <http://purl.org/dc/terms/description> ;
    sh:name "description", "Popis"@cs, "Beschreibung"@de, "Description"@en, "Popis"@sk ;
    sh:order 16 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "What the source says about the event, as plain text without markup."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/dataProvider> ;
    sh:name "dataProvider", "Poskytovatel"@cs, "Anbieter"@de, "Provider"@en, "Poskytovateľ"@sk ;
    sh:order 17 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "Who announced the event (the town, the region, the cultural body), as the credit names it."
  ] ;
  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 18 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:anyURI ;
    sh:maxCount 1 ;
    rdfs:comment "The feed or the page the pipeline read the event from."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/sourceId> ;
    sh:name "sourceId", "Identifikátor ve zdroji"@cs, "Quell-ID"@de, "Source id"@en, "Identifikátor v zdroji"@sk ;
    sh:order 19 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The event's own identifier at its source, so a record can be traced back."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/dateModified> ;
    sh:name "dateModified", "Změněno"@cs, "Geändert"@de, "Modified"@en, "Zmenené"@sk ;
    sh:order 20 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
    rdfs:comment "When the source last changed the record."
  ] .

<https://smartdatamodels.org/PointOfInterestShape>
  a sh:NodeShape ;
  sh:targetClass <https://uri.etsi.org/ngsi-ld/default-context/PointOfInterest> ;
  sh:closed false ;
  sh:property [
    sh:path <https://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:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "The venue's name (`Dom kultúry A. Sládkoviča`)."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/address> ;
    sh:name "address", "Adresa"@cs, "Adresse"@de, "Address"@en, "Adresa"@sk ;
    sh:order 1 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:nodeKind sh:IRI ;
    sh:class <https://w3id.org/linkml/Any> ;
    sh:maxCount 1 ;
    rdfs:comment "The postal address of the venue, field by field (Smart Data Models' common PostalAddress); `addressLocality` is the town a calendar filters on. A field the source leaves out is absent, never guessed."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/areaServed> ;
    sh:name "areaServed", "Obec"@cs, "Gemeinde"@de, "Municipality"@en, "Obec"@sk ;
    sh:order 2 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "The municipality the event or the venue belongs to, by its official name (`Detva`, `Košice`): the key a count or a filter per town reads, on every event (DM-141)."
  ] ;
  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 3 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:anyURI ;
    sh:maxCount 1 ;
    rdfs:comment "The feed or the page the pipeline read the event from."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/dataProvider> ;
    sh:name "dataProvider", "Poskytovatel"@cs, "Anbieter"@de, "Provider"@en, "Poskytovateľ"@sk ;
    sh:order 4 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    rdfs:comment "Who announced the event (the town, the region, the cultural body), as the credit names it."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/venueEvents> ;
    sh:name "venueEvents", "Akce"@cs, "Veranstaltungen"@de, "Events"@en, "Podujatia"@sk ;
    sh:order 5 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:nodeKind sh:IRI ;
    sh:class <https://uri.etsi.org/ngsi-ld/default-context/Event> ;
    rdfs:comment "The events held at this venue, computed from their refPointOfInterest and never stored."
  ] ;
  sh:property [
    sh:path <https://purl.org/geojson/vocab#geometry> ;
    sh:name "location", "Poloha"@cs, "Standort"@de, "Location"@en, "Poloha"@sk ;
    sh:order 6 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "The venue's building as a GeoJSON Point in WGS 84 inside Slovakia."
  ] .
