@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix schema: <https://schema.org/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix gedcom: <http://www.w3.org/2000/10/swap/pim/gedcom#> .

<#DatasetShape>
    a sh:NodeShape ;
    sh:targetClass schema:WebPage ;
    sh:property [
        sh:path schema:url ;
        sh:minCount 1 ;
        sh:nodeKind sh:IRIOrLiteral
    ] ;
    sh:property [
        sh:path schema:mainEntity ;
        sh:minCount 1
    ] ;
    sh:property [
        sh:path dcterms:modified ;
        sh:minCount 1
    ] .

<#PersonShape>
    a sh:NodeShape ;
    sh:targetClass schema:Person ;
    sh:property [
        sh:path schema:name ;
        sh:minCount 1
    ] ;
    sh:property [
        sh:path schema:sameAs ;
        sh:nodeKind sh:IRIOrLiteral
    ] .

<#OrganizationShape>
    a sh:NodeShape ;
    sh:targetClass schema:Organization ;
    sh:property [
        sh:path schema:name ;
        sh:minCount 1
    ] ;
    sh:property [
        sh:path schema:url ;
        sh:minCount 1
    ] .

<#ConceptShape>
    a sh:NodeShape ;
    sh:targetClass skos:Concept ;
    sh:property [
        sh:path skos:prefLabel ;
        sh:minCount 1
    ] ;
    sh:property [
        sh:path owl:sameAs ;
        sh:nodeKind sh:IRIOrLiteral
    ] .

# Genealogy shapes. Every individual carries a name and kinship edges; living
# individuals expose name + relationships only, so dated/placed fields are
# optional (present for the deceased).
<#IndividualShape>
    a sh:NodeShape ;
    sh:targetClass gedcom:Individual ;
    sh:property [
        sh:path schema:name ;
        sh:minCount 1
    ] ;
    sh:property [
        sh:path schema:parent ;
        sh:nodeKind sh:IRI
    ] ;
    sh:property [
        sh:path schema:children ;
        sh:nodeKind sh:IRI
    ] ;
    sh:property [
        sh:path schema:sibling ;
        sh:nodeKind sh:IRI
    ] ;
    sh:property [
        sh:path schema:spouse ;
        sh:nodeKind sh:IRI
    ] ;
    sh:property [
        sh:path schema:birthDate ;
        sh:maxCount 1
    ] ;
    sh:property [
        sh:path schema:deathDate ;
        sh:maxCount 1
    ] .

<#FamilyShape>
    a sh:NodeShape ;
    sh:targetClass gedcom:Family ;
    sh:property [
        sh:path gedcom:husband ;
        sh:nodeKind sh:IRI ;
        sh:maxCount 1
    ] ;
    sh:property [
        sh:path gedcom:wife ;
        sh:nodeKind sh:IRI ;
        sh:maxCount 1
    ] ;
    sh:property [
        sh:path gedcom:child ;
        sh:nodeKind sh:IRI
    ] .
