# GENERATED FILE -- do not edit directly.
# Generated by _generators/generate_mcp_schema.rb from:
#   ontology/artsdata-ontology.ttl
#   shacl/shacl_artsdata_core.ttl
#   shacl/shacl_artsdata_ontology.ttl
#
# Combines the Artsdata Ontology (classes, properties, vocabulary
# equivalences) with the Artsdata CORE graph SHACL shapes and the
# Artsdata Ontology SHACL shapes into one self-contained file, for
# consumers (e.g. an MCP server's schema tool) that want the full
# data model of the reconciled Artsdata CORE graph in a single fetch.

@prefix ado: <http://kg.artsdata.ca/ontology/> .
@prefix adr: <http://kg.artsdata.ca/resource/> .
@prefix ads: <http://kg.artsdata.ca/shacl/> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix frbroo: <https://www.iflastandards.info/fr/frbr/frbroo#> .
@prefix lrmoo: <http://iflastandards.info/ns/lrm/lrmoo/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix wd: <http://www.wikidata.org/entity/> .
@prefix wdt: <http://www.wikidata.org/prop/direct/> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

####################################################
# From artsdata-ontology.ttl
####################################################

####################
# Artsdata Ontology
####################
# Background Notes: 
#     - Artsdata uses HORST (also called OWL-Horst or pD*) as its OWL profile, which is a subset of OWL 2 RL. 
#     - This means that certain OWL features (e.g., owl:disjointWith, owl:cardinality restrictions) are not used in this ontology to ensure compatibility with HORST reasoners.
#     - Cardinality constraints are expressed in SHACL.
#     - rdfs:Class is used instead of owl:Class in order to be more honest about what the reasoner will actually do with it.
# V 1.5.0
#     - Add ado:hasOrganizationTypeConcept
# V 1.4.0
#     - https://github.com/culturecreates/artsdata-data-model/issues/390
####################

ado: rdf:type owl:Ontology ;
    dcterms:title "Artsdata Ontology"@en ;
    dcterms:description "The Artsdata Ontology is designed to model and represent data related to arts, culture, and heritage."@en ;
    dcterms:creator "Artsdata Stewardship Team" ;
    dcterms:created "2025-09-30"^^xsd:date ;
    dcterms:modified "2026-07-03"^^xsd:date ;
    dcterms:license <http://creativecommons.org/licenses/by/4.0/> ;
    vann:preferredNamespacePrefix "ado" ;
    vann:preferredNamespaceUri "http://kg.artsdata.ca/ontology/" ;
    owl:versionIRI <http://kg.artsdata.ca/ontology/1/> ; # TODO: location = /ontology/1 { return 301 /ontology/; }
    owl:versionInfo "1.4.0" ;
    vann:changes <https://github.com/culturecreates/artsdata-data-model/commits/master/ontology/artsdata-ontology.ttl> ;
    dcterms:hasFormat <https://raw.githubusercontent.com/culturecreates/artsdata-data-model/refs/heads/master/ontology/artsdata-ontology.ttl> .

####################
# Classes
####################
ado:Thing rdf:type rdfs:Class ; 
    rdfs:label "Thing"@en ;
    rdfs:comment "The most generic class of things in Artsdata."@en ;
    rdfs:isDefinedBy ado: .

ado:LivePerformanceWork rdf:type rdfs:Class ;
    rdfs:label "Live Performance Work"@en,  "Œuvre scénique"@fr;
    schema:alternateName "show"@en, "spectacle"@fr ;
    rdfs:comment "Work containing an ensemble of creative elements, design elements (intangible and tangible), and plans intended to be performed in front of an audience."@en ,
        "Œuvre composée d'un ensemble d'éléments créatifs, de conceptions (intangibles et tangibles) et de plans destinée à être exécutée pour un public."@fr ;
    rdfs:isDefinedBy ado: ;
    rdfs:subClassOf ado:Thing, schema:CreativeWork, lrmoo:F1_Work, dbo:Work ;
    owl:equivalentClass frbroo:F20, wd:Q17538722 . # datascene:Show, milopa:PERFORMANCE_WORK when published
    
ado:Event rdf:type rdfs:Class ;
    rdfs:label "Event"@en ;
    schema:alternateName "performance"@en, "représentation"@fr ;
    rdfs:comment "An event is a happening that occurs at a certain time and location. Examples include and are not limited to a: performance, concert, conference, festival, exhibition and/or social gathering."@en ;
    rdfs:isDefinedBy ado: ;
    rdfs:subClassOf ado:Thing ;
    owl:equivalentClass schema:Event .


####################
# Properties
####################

ado:hasEventTypeConcept rdf:type rdf:Property ;
    rdfs:label "has event type"@en ;
    rdfs:comment "Links an Event to an event type concept defined by the Artsdata controlled vocabulary for event types."@en ;
    rdfs:isDefinedBy ado: ;
    rdfs:domain ado:Event ;
    rdfs:subPropertyOf schema:additionalType ;
    rdfs:range skos:Concept .

ado:hasPlaceTypeConcept rdf:type rdf:Property ;
    rdfs:label "has place type"@en ;
    rdfs:comment "Links a Place to a place type concept defined by the Artsdata controlled vocabulary for place types."@en ;
    rdfs:isDefinedBy ado: ;
    rdfs:domain schema:Place ;
    rdfs:subPropertyOf schema:additionalType ;
    rdfs:range skos:Concept .

ado:hasOrganizationTypeConcept rdf:type rdf:Property ;
    rdfs:label "has organization type"@en ;
    rdfs:comment "Links an organization to a organization type concept defined by the Artsdata controlled vocabulary for organization types."@en ;
    rdfs:isDefinedBy ado: ;
    rdfs:domain schema:Organization ;
    rdfs:subPropertyOf schema:additionalType ;
    rdfs:range skos:Concept .

ado:usesExpressionOf rdf:type rdf:Property ;
    rdfs:label "uses expression of"@en ;
    rdfs:comment "This property associates an instance of CreativeWork with another instance of CreativeWork that is a creative input to the former. For example, Pina Bausch's \"The Rite of Spring\" (instance of LivePerformanceWork) uses expression of Igor Stravinsky's \"The Rite of Spring\" (instance of musico-dramatic work)."@en ;
    rdfs:isDefinedBy ado: ;
    rdfs:domain schema:CreativeWork ;
    rdfs:range schema:CreativeWork ;
    rdfs:subPropertyOf lrmoo:R74_uses_expression_of .

ado:hasGenre rdf:type rdf:Property ;
    rdfs:label "has genre"@en ;
    rdfs:comment "Links a Live Performance Work to a genre defined by the Artsdata controlled vocabulary for genres."@en ;
    rdfs:isDefinedBy ado: ;
    rdfs:domain ado:LivePerformanceWork ;
    rdfs:subPropertyOf schema:genre ;
    rdfs:range skos:Concept .

ado:managedBy rdf:type rdf:Property ;
    rdfs:label "managed by"@en ;
    rdfs:comment "Links a Place to the Organization responsible for its day-to-day operations."@en ;
    rdfs:isDefinedBy ado: ;
    rdfs:domain schema:Place ;
    rdfs:range schema:Organization ;
    owl:minCardinality "0"^^xsd:nonNegativeInteger ;
	owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
    owl:equivalentProperty wdt:P137, dbo:operator .

ado:ownedBy rdf:type rdf:Property ;
    rdfs:label "owned by"@en ;
    rdfs:comment "Links a Place to an Organization that owns it."@en ;
    rdfs:isDefinedBy ado: ;
    rdfs:domain schema:Place ;
    rdfs:range schema:Organization ;
    owl:minCardinality "0"^^xsd:nonNegativeInteger ;
    owl:equivalentProperty wdt:P127 .

ado:usedBy rdf:type rdf:Property ;
    rdfs:label "used by"@en ;
    rdfs:comment "Links a Place to an Organization that regularly uses this Place as an Event location. A minimum threshold of regularity should be met for this relationship to be true. As a rule of thumb, if an organization regularly holds events every year in a given place, one could deem a usedBy relationship to be present."@en ;
    rdfs:isDefinedBy ado: ;
    rdfs:domain schema:Place ;
    rdfs:range schema:Organization ;
    owl:equivalentProperty wdt:P1535 .

ado:hasResident rdf:type rdf:Property ;
    rdfs:label "has resident"@en ;
    rdfs:comment "Links a Place to an Organization that has a residency status within this Place but does not manage the venue. Resident companies have privileged access to the facilities for creation, production and presentation activities. They may also be provided office space within the venue."@en ;
    rdfs:isDefinedBy ado: ;
    rdfs:domain schema:Place ;
    rdfs:range schema:Organization ;
    owl:equivalentProperty wdt:P466 .

####################################################
# From shacl_artsdata_core.ttl
####################################################

####################################################
# Artsdata CORE Graph SHACL Shapes v1.0
####################################################
#
# Description:
# Validates the Artsdata CORE graph (the reconciled, Artsdata-minted graph
# published at kg.artsdata.ca) for Event, LivePerformanceWork, Organization,
# Place and Person. This is a different graph, with different rules, from
# what shacl/shacl_artsdata.ttl validates (raw data POSTed by external
# providers to the Artsdata Databus, per shacl_reports.md) — the two files
# are not meant to be loaded together, and this file is self-contained.
#
# Ground truth: every property shaped here is derived directly from the
# Artsdata mint pipeline in the artsdata-api repo, not from the aspirational
# ontology. That pipeline runs in two stages:
#   1. Initial CONSTRUCT queries, one per class, e.g.
#      artsdata-api/app/services/sparqls/mint/event/construct_event_transform.sparql
#      (and .../liveperformancework/, .../organization/, .../place/, .../person/)
#   2. Subsequent enrichment queries that refine the constructed graph, e.g.
#      artsdata-api/.../mint/transform/K1-209_map_event_types.sparql,
#      K1-210_map_place_types.sparql and K1-212_map_organization_types.sparql,
#      which delete any schema:additionalType value that matches a
#      controlled-vocabulary mapping and insert ado:hasEventTypeConcept /
#      ado:hasPlaceTypeConcept / ado:hasOrganizationTypeConcept pointing at
#      the matching adr: (Artsdata) concept instead. Unmapped additionalType
#      values are left in place, so both properties can coexist on one entity.
#      These queries also insert an RDF-star provenance triple on the
#      new statement (prov:wasGeneratedBy / prov:used) — that provenance
#      metadata is intentionally NOT validated by this file.
#
# Because the core graph is the reconciled graph, every property that
# references another entity or concept (organizer, performer, location,
# hasEventTypeConcept, hasPlaceTypeConcept, hasOrganizationTypeConcept,
# hasGenre, usesExpressionOf, managedBy, ownedBy, usedBy, hasResident) is
# required here to be an Artsdata-minted adr: (kg.artsdata.ca) URI. This is
# applied uniformly by design, even though today's mint queries only filter
# for it in some cases (organizer, performer, hasGenre, hasEventTypeConcept,
# hasPlaceTypeConcept, hasOrganizationTypeConcept) and not others (location,
# managedBy, ownedBy, usedBy, hasResident) — a violation on one of the
# not-yet-filtered properties is a useful signal that the mint query may
# need to catch up, not necessarily a bad shape.
#
# ado:usesExpressionOf is included even though no enrichment SPARQL mints it
# yet; its constraints are inferred from the ontology's declared range plus
# the reconciliation convention above, and should be re-checked once that
# query exists.
#
# Out of scope: ado:originEC appears in the Organization and Person mint
# queries but is not declared anywhere in ontology/artsdata-ontology.ttl.
# Its range/vocabulary is unknown, so it is deliberately left unshaped here
# until it is formalized in the ontology.
#
# This file can optionally be loaded alongside shacl/shacl_artsdata_ontology.ttl:
# that file's ads:EventTypeConceptShape, ads:PlaceTypeConceptShape,
# ads:OrganizationTypeConceptShape and ads:GenreConceptShape are
# self-targeting (sh:targetObjectsOf) node shapes
# that add a vocabulary-scheme-membership and not-deprecated check on top of
# the adr:-URI and sh:class checks already enforced here — they are not
# referenced from this file (deliberately: referencing them via sh:node
# would escalate their internal Warning-severity deprecated-concept check to
# a hard Violation, per SHACL's sh:node conformance semantics), but they
# apply automatically to the same triples when both files are loaded together.
####################################################


################
# Shared property/value shapes, reused across classes
################

ads:CoreNameSh
    a sh:PropertyShape ;
    sh:path schema:name ;
    sh:name "name" ;
    sh:minCount 1 ;
    sh:uniqueLang true ;
    sh:or (
        [ sh:datatype rdf:langString ; ]
        [ sh:datatype xsd:string ; ]
    ) ;
    sh:message "schema:name is required (at least one value; multiple values must each have a distinct language tag)."@en .

ads:CoreUrlSh
    a sh:PropertyShape ;
    sh:path schema:url ;
    sh:name "url" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:message "schema:url must be a valid URL."@en .

ads:CoreSameAsSh
    a sh:PropertyShape ;
    sh:path schema:sameAs ;
    sh:name "sameAs" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:message "schema:sameAs must be a valid URL."@en .

ads:CoreAdditionalTypeSh
    a sh:PropertyShape ;
    sh:path schema:additionalType ;
    sh:name "additional type" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:message "schema:additionalType must be a URI."@en .

ads:CoreDescriptionShape
    a sh:NodeShape ;
    sh:name "Description value (any entity)" ;
    sh:targetObjectsOf schema:description ;
    sh:sparql [
        sh:message "schema:description must not be blank, whitespace-only, or contain only HTML markup with no visible text."@en ;
        sh:select """
            SELECT $this
            WHERE {
                BIND(REPLACE(STR($this), "<[^>]*>", "") AS ?stripped)
                FILTER(REGEX(?stripped, "^\\\\s*$"))
            }
        """ ;
    ] .


################
# schema:Event
# Source: artsdata-api/app/services/sparqls/mint/event/construct_event_transform.sparql
#         artsdata-api/app/services/sparqls/mint/transform/K1-209_map_event_types.sparql
################

ads:CoreEventShape
    a sh:NodeShape ;
    sh:name "Core Event Shape" ;
    sh:targetClass schema:Event ;
    sh:property ads:CoreNameSh,
                ads:CoreUrlSh,
                ads:CoreAdditionalTypeSh,
                ads:CoreStartDateSh,
                ads:CoreEndDateSh,
                ads:CoreEventDescriptionSh,
                ads:CoreLocationSh,
                ads:CoreEventStatusSh,
                ads:CoreEventAttendanceModeSh,
                ads:CoreEventImageSh,
                ads:CoreHasEventTypeConceptSh,
                ads:CoreOrganizerSh,
                ads:CorePerformerSh,
                ads:CoreSubEventSh,
                ads:CoreSuperEventSh .

ads:CoreStartDateSh
    a sh:PropertyShape ;
    sh:path schema:startDate ;
    sh:name "start date" ;
    sh:minCount 1 ;
    sh:message "schema:startDate is required."@en .

ads:CoreEndDateSh
    a sh:PropertyShape ;
    sh:path schema:endDate ;
    sh:name "end date" ;
    sh:minCount 0 .

ads:CoreEventDescriptionSh
    a sh:PropertyShape ;
    sh:path schema:description ;
    sh:name "description" ;
    sh:minCount 0 .

ads:CoreLocationSh
    a sh:PropertyShape ;
    sh:path schema:location ;
    sh:name "location" ;
    sh:minCount 1 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:class schema:Place ;
    sh:message "schema:location is required and must reference an Artsdata-minted (adr:) schema:Place."@en .

ads:CoreEventStatusSh
    a sh:PropertyShape ;
    sh:path schema:eventStatus ;
    sh:name "event status" ;
    sh:maxCount 1 ;
    sh:minCount 0 ;
    sh:in ( schema:EventPostponed
            schema:EventScheduled
            schema:EventCancelled
            schema:EventRescheduled
            schema:EventMovedOnline ) .

ads:CoreEventAttendanceModeSh
    a sh:PropertyShape ;
    sh:path schema:eventAttendanceMode ;
    sh:name "event attendance mode" ;
    sh:maxCount 1 ;
    sh:minCount 0 ;
    sh:in ( schema:OfflineEventAttendanceMode
            schema:OnlineEventAttendanceMode
            schema:MixedEventAttendanceMode ) .

ads:CoreEventImageSh
    a sh:PropertyShape ;
    sh:path schema:image ;
    sh:name "image" ;
    sh:minCount 0 ;
    sh:node ads:CoreImageShape .

ads:CoreImageShape
    a sh:NodeShape ;
    sh:name "Core Image Shape" ;
    sh:property [
        sh:path rdf:type ;
        sh:name "image type" ;
    ] , [
        sh:path schema:disambiguatingDescription ;
        sh:name "image disambiguating description" ;
        sh:minCount 0 ;
    ] , [
        sh:path schema:url ;
        sh:name "image url" ;
        sh:minCount 1 ;
        sh:nodeKind sh:IRI ;
        sh:message "Image schema:url is required and must be a valid URL."@en ;
    ] , [
        sh:path schema:usageInfo ;
        sh:name "image usage info" ;
        sh:minCount 0 ;
    ] , [
        sh:path schema:copyrightNotice ;
        sh:name "image copyright notice" ;
        sh:minCount 0 ;
    ] .

ads:CoreHasEventTypeConceptSh
    a sh:PropertyShape ;
    sh:path ado:hasEventTypeConcept ;
    sh:name "has event type" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:class skos:Concept ;
    sh:message "ado:hasEventTypeConcept must reference an Artsdata-minted (adr:) skos:Concept."@en .

ads:CoreOrganizerSh
    a sh:PropertyShape ;
    sh:path schema:organizer ;
    sh:name "organizer" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:class schema:Organization ;
    sh:message "schema:organizer must reference an Artsdata-minted (adr:) schema:Organization."@en .

ads:CorePerformerSh
    a sh:PropertyShape ;
    sh:path schema:performer ;
    sh:name "performer" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:message "schema:performer must reference an Artsdata-minted (adr:) entity."@en .

ads:CoreSubEventSh
    a sh:PropertyShape ;
    sh:path schema:subEvent ;
    sh:name "sub event" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI .

ads:CoreSuperEventSh
    a sh:PropertyShape ;
    sh:path schema:superEvent ;
    sh:name "super event" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI .


################
# ado:LivePerformanceWork
# Source: artsdata-api/app/services/sparqls/mint/liveperformancework/construct_liveperformancework_transform.sparql
################

ads:CoreLivePerformanceWorkShape
    a sh:NodeShape ;
    sh:name "Core Live Performance Work Shape" ;
    sh:targetClass ado:LivePerformanceWork ;
    sh:property ads:CoreNameSh,
                ads:CoreUrlSh,
                ads:CoreSameAsSh,
                ads:CoreAlternateNameSh,
                ads:CoreDisambiguatingDescriptionSh,
                ads:CoreLpwDescriptionSh,
                ads:CoreUnstructuredImageSh,
                ads:CoreHasGenreSh,
                ads:CoreUsesExpressionOfSh .

ads:CoreAlternateNameSh
    a sh:PropertyShape ;
    sh:path schema:alternateName ;
    sh:name "alternate name" ;
    sh:minCount 0 .

ads:CoreDisambiguatingDescriptionSh
    a sh:PropertyShape ;
    sh:path schema:disambiguatingDescription ;
    sh:name "disambiguating description" ;
    sh:minCount 0 .

ads:CoreLpwDescriptionSh
    a sh:PropertyShape ;
    sh:path schema:description ;
    sh:name "description" ;
    sh:minCount 0 .

# schema:image / schema:logo are copied through the mint pipeline as opaque
# nodes with arbitrary properties (?image_p ?image_o), unlike Event's image
# which has a fixed structure — so these are deliberately left unconstrained
# beyond "it must be present if given".
ads:CoreUnstructuredImageSh
    a sh:PropertyShape ;
    sh:path schema:image ;
    sh:name "image" ;
    sh:minCount 0 .

ads:CoreHasGenreSh
    a sh:PropertyShape ;
    sh:path ado:hasGenre ;
    sh:name "has genre" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:class skos:Concept ;
    sh:message "ado:hasGenre must reference an Artsdata-minted (adr:) skos:Concept."@en .

ads:CoreUsesExpressionOfSh
    a sh:PropertyShape ;
    sh:path ado:usesExpressionOf ;
    sh:name "uses expression of" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:class schema:CreativeWork ;
    sh:message "ado:usesExpressionOf must reference an Artsdata-minted (adr:) schema:CreativeWork. (Not yet confirmed by a mint SPARQL as of this writing — re-verify once one exists.)"@en .


################
# schema:Organization
# Source: artsdata-api/app/services/sparqls/mint/organization/construct_organization_transform.sparql
#         artsdata-api/app/services/sparqls/mint/transform/K1-212_map_organization_types.sparql
################

ads:CoreOrganizationShape
    a sh:NodeShape ;
    sh:name "Core Organization Shape" ;
    sh:targetClass schema:Organization ;
    sh:property ads:CoreNameSh,
                ads:CoreUrlSh,
                ads:CoreSameAsSh,
                ads:CoreAdditionalTypeSh,
                ads:CoreAlternateNameSh,
                ads:CoreDisambiguatingDescriptionSh,
                ads:CoreUnstructuredImageSh,
                ads:CoreLogoSh,
                ads:CoreTelephoneSh,
                ads:CoreCanadianBusinessNumberSh,
                ads:CoreHasOrganizationTypeConceptSh .
    # Not shaped: ado:originEC (see file header) .

ads:CoreHasOrganizationTypeConceptSh
    a sh:PropertyShape ;
    sh:path ado:hasOrganizationTypeConcept ;
    sh:name "has organization type" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:class skos:Concept ;
    sh:message "ado:hasOrganizationTypeConcept must reference an Artsdata-minted (adr:) skos:Concept."@en .

ads:CoreLogoSh
    a sh:PropertyShape ;
    sh:path schema:logo ;
    sh:name "logo" ;
    sh:minCount 0 .

ads:CoreTelephoneSh
    a sh:PropertyShape ;
    sh:path schema:telephone ;
    sh:name "telephone" ;
    sh:minCount 0 .

ads:CoreCanadianBusinessNumberSh
    a sh:PropertyShape ;
    sh:path wdt:P8860 ;
    sh:name "Canadian Business Number" ;
    sh:minCount 0 ;
    sh:pattern "^\\d{9}$" ;
    sh:message "Canadian Business Number (wdt:P8860) must be 9 digits."@en .


################
# schema:Place
# Source: artsdata-api/app/services/sparqls/mint/place/construct_place_transform.sparql
#         artsdata-api/app/services/sparqls/mint/transform/K1-210_map_place_types.sparql
################

ads:CorePlaceShape
    a sh:NodeShape ;
    sh:name "Core Place Shape" ;
    sh:targetClass schema:Place ;
    sh:property ads:CoreNameSh,
                ads:CoreUrlSh,
                ads:CoreSameAsSh,
                ads:CoreAdditionalTypeSh,
                ads:CoreHasPlaceTypeConceptSh,
                ads:CoreAlternateNameSh,
                ads:CoreDisambiguatingDescriptionSh,
                ads:CorePlaceDescriptionSh,
                ads:CoreContainedInPlaceSh,
                ads:CoreUnstructuredImageSh,
                ads:CoreLongitudeSh,
                ads:CoreLatitudeSh,
                ads:CoreManagedBySh,
                ads:CoreOwnedBySh,
                ads:CoreUsedBySh,
                ads:CoreHasResidentSh,
                ads:CoreAddressSh .

ads:CoreHasPlaceTypeConceptSh
    a sh:PropertyShape ;
    sh:path ado:hasPlaceTypeConcept ;
    sh:name "has place type" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:class skos:Concept ;
    sh:message "ado:hasPlaceTypeConcept must reference an Artsdata-minted (adr:) skos:Concept."@en .

ads:CorePlaceDescriptionSh
    a sh:PropertyShape ;
    sh:path schema:description ;
    sh:name "description" ;
    sh:minCount 0 .

ads:CoreContainedInPlaceSh
    a sh:PropertyShape ;
    sh:path schema:containedInPlace ;
    sh:name "contained in place" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:class schema:Place .

ads:CoreLongitudeSh
    a sh:PropertyShape ;
    sh:path schema:longitude ;
    sh:name "longitude" ;
    sh:minCount 0 .

ads:CoreLatitudeSh
    a sh:PropertyShape ;
    sh:path schema:latitude ;
    sh:name "latitude" ;
    sh:minCount 0 .

ads:CoreManagedBySh
    a sh:PropertyShape ;
    sh:path ado:managedBy ;
    sh:name "managed by" ;
    sh:minCount 0 ;
    sh:maxCount 1 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:class schema:Organization ;
    sh:message "ado:managedBy must reference at most one Artsdata-minted (adr:) schema:Organization."@en .

ads:CoreOwnedBySh
    a sh:PropertyShape ;
    sh:path ado:ownedBy ;
    sh:name "owned by" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:class schema:Organization ;
    sh:message "ado:ownedBy must reference an Artsdata-minted (adr:) schema:Organization."@en .

ads:CoreUsedBySh
    a sh:PropertyShape ;
    sh:path ado:usedBy ;
    sh:name "used by" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:class schema:Organization ;
    sh:message "ado:usedBy must reference an Artsdata-minted (adr:) schema:Organization."@en .

ads:CoreHasResidentSh
    a sh:PropertyShape ;
    sh:path ado:hasResident ;
    sh:name "has resident" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:pattern "^http://kg\\.artsdata\\.ca/resource/" ;
    sh:class schema:Organization ;
    sh:message "ado:hasResident must reference an Artsdata-minted (adr:) schema:Organization."@en .

ads:CoreAddressSh
    a sh:PropertyShape ;
    sh:path schema:address ;
    sh:name "address" ;
    sh:minCount 0 ;
    sh:node ads:CorePostalAddressShape .

# Unlike shacl_artsdata.ttl's ads:PostalAddressShape (external submissions,
# all subfields sh:minCount 1), every subfield here is optional: the mint
# query's OPTIONAL blocks show a core address can legitimately be partial.
ads:CorePostalAddressShape
    a sh:NodeShape ;
    sh:name "Core Postal Address Shape" ;
    sh:property [
        sh:path schema:streetAddress ;
        sh:name "street address" ;
        sh:minCount 1 ;
    ] , [
        sh:path schema:addressLocality ;
        sh:name "address locality" ;
        sh:minCount 1 ;
    ] , [
        sh:path schema:addressRegion ;
        sh:name "address region" ;
        sh:minCount 1 ;
    ] , [
        sh:path schema:postalCode ;
        sh:name "postal code" ;
        sh:minCount 1 ;
    ] , [
        sh:path schema:addressCountry ;
        sh:name "address country" ;
        sh:minCount 1 ;
    ] .


################
# schema:Person
# Source: artsdata-api/app/services/sparqls/mint/person/construct_person_transform.sparql
################

ads:CorePersonShape
    a sh:NodeShape ;
    sh:name "Core Person Shape" ;
    sh:targetClass schema:Person ;
    sh:property ads:CoreNameSh,
                ads:CoreUrlSh,
                ads:CoreSameAsSh,
                ads:CoreAlternateNameSh,
                ads:CoreDisambiguatingDescriptionSh,
                ads:CorePersonDescriptionSh,
                ads:CoreUnstructuredImageSh,
                ads:CoreHasOccupationSh .
    # Not shaped: ado:originEC (see file header) .

ads:CorePersonDescriptionSh
    a sh:PropertyShape ;
    sh:path schema:description ;
    sh:name "description" ;
    sh:minCount 0 .

ads:CoreHasOccupationSh
    a sh:PropertyShape ;
    sh:path schema:hasOccupation ;
    sh:name "has occupation" ;
    sh:minCount 0 .

####################################################
# From shacl_artsdata_ontology.ttl
####################################################

####################################################
# Artsdata Ontology SHACL Shapes v1.0
####################################################
#
# Description:
# Expresses, as SHACL, the data model defined by the Artsdata Ontology
# (ontology/artsdata-ontology.ttl): its classes (ado:Thing, ado:LivePerformanceWork,
# ado:Event) and its properties (ado:hasEventTypeConcept, ado:hasPlaceTypeConcept,
# ado:hasOrganizationTypeConcept, ado:usesExpressionOf, ado:hasGenre, ado:managedBy,
# ado:ownedBy, ado:usedBy, ado:hasResident).
#
# Artsdata uses HORST (OWL-Horst / pD*) as its OWL profile, so rdfs:domain,
# rdfs:range and owl:*Cardinality declarations in the ontology are not enforced
# by the reasoner. Per the "Background Notes" in artsdata-ontology.ttl, this
# SHACL file is the authoritative source of validation for those constraints.
#
# Concept-valued properties (hasEventTypeConcept, hasPlaceTypeConcept,
# hasOrganizationTypeConcept, hasGenre) are additionally constrained to
# concepts declared skos:inScheme the matching controlled vocabulary
# (ontology/skos-event-types.ttl, skos-place-types.ttl,
# skos-organization-types.ttl, skos-genres.ttl), and flagged with a Warning
# if the concept is owl:deprecated.
#
# This file complements shacl/shacl_artsdata.ttl, which validates the core
# schema.org Event/Place/Person/Organization/WebPage properties (name,
# location, startDate, address, etc.). It does not redefine shapes such as
# ads:NameSh or ads:PlaceShape, and can be loaded alongside that file.
#
# Not yet covered: ontology/skos-membership.ttl is a published controlled
# vocabulary that is not yet bound to a property in artsdata-ontology.ttl,
# so no shape targets it here.
####################################################


################
# Controlled Vocabulary Value Shapes
# Reused wherever an ado: property's range is skos:Concept
#
# These are declared as self-targeting shapes (sh:targetObjectsOf) rather than
# being referenced with sh:node from the property shapes below. sh:node always
# reports a plain sh:Violation when the referenced shape fails to conform, no
# matter what severity its internal property constraints declare, which would
# silently turn the "deprecated concept" Warning below into a hard Violation.
# Self-targeting keeps each constraint's own severity intact.
################

ads:EventTypeConceptShape
    a sh:NodeShape ;
    sh:name "Artsdata Event Type Concept" ;
    sh:targetObjectsOf ado:hasEventTypeConcept ;
    sh:nodeKind sh:IRI ;
    sh:class skos:Concept ;
    sh:property [
        sh:path skos:inScheme ;
        sh:hasValue adr:ArtsdataEventTypes ;
        sh:message "Value must be a skos:Concept in the Artsdata Event Types vocabulary (adr:ArtsdataEventTypes), see ontology/skos-event-types.ttl."@en ;
    ] ;
    sh:property [
        sh:path owl:deprecated ;
        sh:maxCount 0 ;
        sh:severity sh:Warning ;
        sh:message "This event type concept is deprecated; choose a current concept from the Artsdata Event Types vocabulary."@en ;
    ] .

ads:PlaceTypeConceptShape
    a sh:NodeShape ;
    sh:name "Artsdata Place Type Concept" ;
    sh:targetObjectsOf ado:hasPlaceTypeConcept ;
    sh:nodeKind sh:IRI ;
    sh:class skos:Concept ;
    sh:property [
        sh:path skos:inScheme ;
        sh:hasValue adr:ArtsdataPlaceTypes ;
        sh:message "Value must be a skos:Concept in the Artsdata Place Types vocabulary (adr:ArtsdataPlaceTypes), see ontology/skos-place-types.ttl."@en ;
    ] ;
    sh:property [
        sh:path owl:deprecated ;
        sh:maxCount 0 ;
        sh:severity sh:Warning ;
        sh:message "This place type concept is deprecated; choose a current concept from the Artsdata Place Types vocabulary."@en ;
    ] .

ads:GenreConceptShape
    a sh:NodeShape ;
    sh:name "Artsdata Genre Concept" ;
    sh:targetObjectsOf ado:hasGenre ;
    sh:nodeKind sh:IRI ;
    sh:class skos:Concept ;
    sh:property [
        sh:path skos:inScheme ;
        sh:hasValue adr:ArtsdataGenres ;
        sh:message "Value must be a skos:Concept in the Artsdata Genres vocabulary (adr:ArtsdataGenres), see ontology/skos-genres.ttl."@en ;
    ] ;
    sh:property [
        sh:path owl:deprecated ;
        sh:maxCount 0 ;
        sh:severity sh:Warning ;
        sh:message "This genre concept is deprecated; choose a current concept from the Artsdata Genres vocabulary."@en ;
    ] .

ads:OrganizationTypeConceptShape
    a sh:NodeShape ;
    sh:name "Artsdata Organization Type Concept" ;
    sh:targetObjectsOf ado:hasOrganizationTypeConcept ;
    sh:nodeKind sh:IRI ;
    sh:class skos:Concept ;
    sh:property [
        sh:path skos:inScheme ;
        sh:hasValue adr:ArtsdataOrganizationTypes ;
        sh:message "Value must be a skos:Concept in the Artsdata Organization Types vocabulary (adr:ArtsdataOrganizationTypes), see ontology/skos-organization-types.ttl."@en ;
    ] ;
    sh:property [
        sh:path owl:deprecated ;
        sh:maxCount 0 ;
        sh:severity sh:Warning ;
        sh:message "This organization type concept is deprecated; choose a current concept from the Artsdata Organization Types vocabulary."@en ;
    ] .


################
# ado:LivePerformanceWork
################
ads:LivePerformanceWorkShape
    a sh:NodeShape ;
    sh:name "Live Performance Work Shape" ;
    sh:targetClass ado:LivePerformanceWork ;
    sh:property ads:HasGenreSh .

ads:HasGenreSh
    a sh:PropertyShape ;
    sh:path ado:hasGenre ;
    sh:name "has genre" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:message "ado:hasGenre must reference a Concept from the Artsdata Genres controlled vocabulary (see ads:GenreConceptShape)."@en .


################
# schema:CreativeWork
# ado:usesExpressionOf has domain schema:CreativeWork (broader than just
# ado:LivePerformanceWork), so both are targeted here.
################
ads:CreativeWorkOntologyExtensionShape
    a sh:NodeShape ;
    sh:name "Creative Work Ontology Extension Shape" ;
    sh:targetClass schema:CreativeWork, ado:LivePerformanceWork ;
    sh:property ads:UsesExpressionOfSh .

ads:UsesExpressionOfSh
    a sh:PropertyShape ;
    sh:path ado:usesExpressionOf ;
    sh:name "uses expression of" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:class schema:CreativeWork ;
    sh:message "ado:usesExpressionOf must reference another schema:CreativeWork."@en .


################
# ado:Event
# ado:Event owl:equivalentClass schema:Event, so both are targeted here.
################
ads:AdoEventShape
    a sh:NodeShape ;
    sh:name "Artsdata Event Ontology Extension Shape" ;
    sh:targetClass ado:Event, schema:Event ;
    sh:property ads:HasEventTypeConceptSh .

ads:HasEventTypeConceptSh
    a sh:PropertyShape ;
    sh:path ado:hasEventTypeConcept ;
    sh:name "has event type" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:message "ado:hasEventTypeConcept must reference a Concept from the Artsdata Event Types controlled vocabulary (see ads:EventTypeConceptShape)."@en .


################
# schema:Place ontology extensions
################
ads:PlaceOntologyExtensionShape
    a sh:NodeShape ;
    sh:name "Place Ontology Extension Shape" ;
    sh:targetClass schema:Place ;
    sh:property ads:HasPlaceTypeConceptSh,
                ads:ManagedBySh,
                ads:OwnedBySh,
                ads:UsedBySh,
                ads:HasResidentSh .

ads:HasPlaceTypeConceptSh
    a sh:PropertyShape ;
    sh:path ado:hasPlaceTypeConcept ;
    sh:name "has place type" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:message "ado:hasPlaceTypeConcept must reference a Concept from the Artsdata Place Types controlled vocabulary (see ads:PlaceTypeConceptShape)."@en .

ads:ManagedBySh
    a sh:PropertyShape ;
    sh:path ado:managedBy ;
    sh:name "managed by" ;
    sh:minCount 0 ;
    sh:maxCount 1 ;
    sh:nodeKind sh:IRI ;
    sh:class schema:Organization ;
    sh:message "ado:managedBy must reference at most one schema:Organization."@en .

ads:OwnedBySh
    a sh:PropertyShape ;
    sh:path ado:ownedBy ;
    sh:name "owned by" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:class schema:Organization ;
    sh:message "ado:ownedBy must reference a schema:Organization."@en .

ads:UsedBySh
    a sh:PropertyShape ;
    sh:path ado:usedBy ;
    sh:name "used by" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:class schema:Organization ;
    sh:message "ado:usedBy must reference a schema:Organization."@en .

ads:HasResidentSh
    a sh:PropertyShape ;
    sh:path ado:hasResident ;
    sh:name "has resident" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:class schema:Organization ;
    sh:message "ado:hasResident must reference a schema:Organization."@en .


################
# schema:Organization ontology extensions
################
ads:OrganizationOntologyExtensionShape
    a sh:NodeShape ;
    sh:name "Organization Ontology Extension Shape" ;
    sh:targetClass schema:Organization ;
    sh:property ads:HasOrganizationTypeConceptSh .

ads:HasOrganizationTypeConceptSh
    a sh:PropertyShape ;
    sh:path ado:hasOrganizationTypeConcept ;
    sh:name "has organization type" ;
    sh:minCount 0 ;
    sh:nodeKind sh:IRI ;
    sh:message "ado:hasOrganizationTypeConcept must reference a Concept from the Artsdata Organization Types controlled vocabulary (see ads:OrganizationTypeConceptShape)."@en .
