@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix schema: <https://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix leptum: <https://mpeters.dev/ns/leptum#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

leptum:EntityShape
  a sh:NodeShape ;
  rdfs:comment "Mirrors Entity (lib/remoteStorage.ts) as written by entityToRdf and read by extractEntity. Person uses foaf:name, Project/Context use schema:name — modeled as two independent optional fields; app code does `name ?? name2` itself. Additional rdf:type values are permitted (ShEx EXTRA a)." ;
  sh:property [
    sh:path rdf:type ;
    sh:qualifiedValueShape [ sh:in ( foaf:Person schema:Project leptum:Context ) ] ;
    sh:qualifiedMinCount 1
  ] ;
  sh:property [
    sh:path foaf:name ;
    sh:datatype xsd:string ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path schema:name ;
    sh:datatype xsd:string ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path schema:description ;
    sh:datatype xsd:string ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:tag ;
    sh:datatype xsd:string
  ] ;
  sh:property [
    sh:path dcterms:created ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1
  ] .
