# 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://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 as the city publishes it, in Catalan."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/startDate> ;
    sh:name "startDate" ;
    sh:order 1 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:dateTime ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    rdfs:comment "The first day of the event, local midnight in Europe/Madrid; the agenda publishes the day, its hours sit in a free-text timetable."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/endDate> ;
    sh:name "endDate" ;
    sh:order 2 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
    rdfs:comment "The last day of the event, local midnight in Europe/Madrid; absent when the agenda gives none."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/category> ;
    sh:name "category" ;
    sh:order 3 ;
    sh:group <https://smartdatamodels.org/SummaryGroup> ;
    sh:datatype xsd:string ;
    rdfs:comment "An Event's main category first, one of the platform's fifteen event codes (music, theatre-dance, film, exhibition-museum, festival-fair, sport, outdoor-nature, education-talk, children-family, hobby-workshop, food-market, history-heritage, faith-tradition, health-wellness, community-civic), then the Smart Data Models category it falls under where one fits, read from the first words of the Catalan name and absent when no rule matches. A PointOfInterest's family in the city's facility register first (culture-leisure, sports, education, social-services, public-administration, markets-shopping, information-centres, religious-services, environment, animals-plants, cemeteries, media, utility-companies, restaurants), then the register's own kind in Catalan (Biblioteques, Poliesportius)."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/subCategory> ;
    sh:name "subCategory" ;
    sh:order 4 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:string ;
    rdfs:comment "The Smart Data Models sub-category where the name says it (music, theater)."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/address> ;
    sh:name "address" ;
    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 as the agenda or the facility register publishes it, field by field (Smart Data Models' common PostalAddress); a field the source leaves out is absent."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/contactPoint> ;
    sh:name "contactPoint" ;
    sh:order 6 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:nodeKind sh:IRI ;
    sh:class <https://w3id.org/linkml/Any> ;
    sh:maxCount 1 ;
    rdfs:comment "The public telephone line the agenda or the facility register lists."
  ] ;
  sh:property [
    sh:path <https://uri.etsi.org/ngsi-ld/default-context/source> ;
    sh:name "source" ;
    sh:order 7 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:datatype xsd:anyURI ;
    sh:maxCount 1 ;
    rdfs:comment "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 8 ;
    sh:group <https://smartdatamodels.org/DetailGroup> ;
    sh:maxCount 1 ;
    rdfs:comment "Where the entity is, as GeoJSON geometry."
  ] .
