@prefix : <https://ontology.inferal.com/modules/commercial-intelligence/> .
@prefix conf: <https://ontology.inferal.com/modules/confidence/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:ProductServiceOfferingShape
    a sh:NodeShape ;
    rdfs:label "product/service offering shape" ;
    rdfs:comment "Validates product/service offerings with labels and optional category, customer, and use-case metadata." ;
    sh:targetClass :ProductServiceOffering ;
    sh:property [
        sh:path rdfs:label ;
        sh:minCount 1 ;
    ] ;
    sh:property [
        sh:path :offeringDescription ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
    ] ;
    sh:property [
        sh:path :offeringCategory ;
        sh:class skos:Concept ;
    ] ;
    sh:property [
        sh:path :offeringClassification ;
        sh:class :OfferingClassification ;
    ] ;
    sh:property [
        sh:path :targetCustomerSegment ;
        sh:class :CustomerSegment ;
    ] ;
    sh:property [
        sh:path :useCase ;
        sh:class :UseCase ;
    ] ;
    sh:property [
        sh:path :revenueModel ;
        sh:class :RevenueModel ;
    ] ;
    sh:property [
        sh:path :source ;
        sh:class prov:Entity ;
    ] ;
    sh:property [
        sh:path :confidenceAssessment ;
        sh:class conf:ConfidenceAssessment ;
        sh:maxCount 1 ;
    ] .

:ProductShape
    a sh:NodeShape ;
    rdfs:label "product shape" ;
    rdfs:comment "Basic validation for products." ;
    sh:targetClass :Product ;
    sh:property [
        sh:path rdfs:label ;
        sh:minCount 1 ;
    ] .

:ServiceShape
    a sh:NodeShape ;
    rdfs:label "service shape" ;
    rdfs:comment "Basic validation for services." ;
    sh:targetClass :Service ;
    sh:property [
        sh:path rdfs:label ;
        sh:minCount 1 ;
    ] .

:BusinessActivityShape
    a sh:NodeShape ;
    rdfs:label "business activity shape" ;
    rdfs:comment "Basic validation for business activity concepts." ;
    sh:targetClass :BusinessActivity ;
    sh:property [
        sh:path rdfs:label ;
        sh:minCount 1 ;
    ] .

:CustomerSegmentShape
    a sh:NodeShape ;
    rdfs:label "customer segment shape" ;
    rdfs:comment "Basic validation for customer segments." ;
    sh:targetClass :CustomerSegment ;
    sh:property [
        sh:path rdfs:label ;
        sh:minCount 1 ;
    ] .

:UseCaseShape
    a sh:NodeShape ;
    rdfs:label "use case shape" ;
    rdfs:comment "Basic validation for use cases." ;
    sh:targetClass :UseCase ;
    sh:property [
        sh:path rdfs:label ;
        sh:minCount 1 ;
    ] .

:RevenueModelShape
    a sh:NodeShape ;
    rdfs:label "revenue model shape" ;
    rdfs:comment "Basic validation for revenue models." ;
    sh:targetClass :RevenueModel ;
    sh:property [
        sh:path rdfs:label ;
        sh:minCount 1 ;
    ] .

:OfferingClassificationShape
    a sh:NodeShape ;
    rdfs:label "offering classification shape" ;
    rdfs:comment "Validates evidence-bearing offering classifications with a classified offering, assigned concept, optional source code, and supporting source." ;
    sh:targetClass :OfferingClassification ;
    sh:property [
        sh:path :classifiedOffering ;
        sh:class :ProductServiceOffering ;
        sh:minCount 1 ;
        sh:maxCount 1 ;
    ] ;
    sh:property [
        sh:path :classifiedAs ;
        sh:nodeKind sh:IRI ;
        sh:minCount 1 ;
        sh:maxCount 1 ;
    ] ;
    sh:property [
        sh:path :classificationScheme ;
        sh:nodeKind sh:IRI ;
        sh:maxCount 1 ;
    ] ;
    sh:property [
        sh:path :classificationCode ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
    ] ;
    sh:property [
        sh:path :classificationRationale ;
        sh:datatype xsd:string ;
        sh:maxCount 1 ;
    ] ;
    sh:property [
        sh:path :source ;
        sh:class prov:Entity ;
        sh:minCount 1 ;
    ] ;
    sh:property [
        sh:path :confidenceAssessment ;
        sh:class conf:ConfidenceAssessment ;
        sh:maxCount 1 ;
    ] .

:CustomerRelationshipShape
    a sh:NodeShape ;
    rdfs:label "customer relationship shape" ;
    rdfs:comment "Validates sourced customer relationships with seller, customer, source, and optional purchased offering." ;
    sh:targetClass :CustomerRelationship ;
    sh:property [
        sh:path :seller ;
        sh:nodeKind sh:BlankNodeOrIRI ;
        sh:minCount 1 ;
        sh:maxCount 1 ;
    ] ;
    sh:property [
        sh:path :customer ;
        sh:nodeKind sh:BlankNodeOrIRI ;
        sh:minCount 1 ;
        sh:maxCount 1 ;
    ] ;
    sh:property [
        sh:path :purchasedOffering ;
        sh:class :ProductServiceOffering ;
        sh:maxCount 1 ;
    ] ;
    sh:property [
        sh:path :source ;
        sh:class prov:Entity ;
        sh:minCount 1 ;
    ] ;
    sh:property [
        sh:path :validFrom ;
        sh:datatype xsd:date ;
        sh:maxCount 1 ;
    ] ;
    sh:property [
        sh:path :validThrough ;
        sh:datatype xsd:date ;
        sh:maxCount 1 ;
    ] .
