@prefix : <#> .
@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 xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .

<> a owl:Ontology ;
    dcterms:title "Semantic Mapping Vocabulary" ;
    dcterms:description "An ontology for defining semantic mapping rules between different vocabularies and data sources" ;
    dcterms:created "2025-11-17"^^xsd:date ;
    owl:versionInfo "1.0" .

:RuleSet a owl:Class ;
    rdfs:label "Rule Set" ;
    rdfs:comment "A collection of semantic mapping rules that apply to a specific subweb or resource scope" .

:Rule a owl:Class ;
    rdfs:label "Rule" ;
    rdfs:comment "A single semantic mapping rule that defines a relationship between a premise, inference type, and conclusion" .

:ruleSetLocation a owl:ObjectProperty ;
    rdfs:label "rule set location" ;
    rdfs:comment "The URI location of the rule set resource" ;
    rdfs:domain rdfs:Resource ;
    rdfs:range rdfs:Resource .

:subweb a owl:DatatypeProperty ;
    rdfs:label "subweb" ;
    rdfs:comment "A URI template pattern defining the scope of resources this rule set applies to" ;
    rdfs:domain :RuleSet ;
    rdfs:range xsd:string .

:rule a owl:ObjectProperty ;
    rdfs:label "rule" ;
    rdfs:comment "Links a rule set to one of its semantic mapping rules" ;
    rdfs:domain :RuleSet ;
    rdfs:range :Rule .

:premise a owl:ObjectProperty ;
    rdfs:label "premise" ;
    rdfs:comment "The source resource or concept that triggers the rule" ;
    rdfs:domain :Rule ;
    rdfs:range rdfs:Resource .

:inference a owl:ObjectProperty ;
    rdfs:label "inference" ;
    rdfs:comment "The type of semantic relationship or inference to apply (e.g., skos:closeMatch, owl:sameAs)" ;
    rdfs:domain :Rule ;
    rdfs:range rdfs:Resource .

:conclusion a owl:DatatypeProperty ;
    rdfs:label "conclusion" ;
    rdfs:comment "The resulting value or mapping after applying the rule" ;
    rdfs:domain :Rule .

:Rule a owl:Class ;
    rdfs:subClassOf [
        a owl:Restriction ;
        owl:onProperty :premise ;
        owl:cardinality "1"^^xsd:nonNegativeInteger
    ] ;
    rdfs:subClassOf [
        a owl:Restriction ;
        owl:onProperty :inference ;
        owl:cardinality "1"^^xsd:nonNegativeInteger
    ] ;
    rdfs:subClassOf [
        a owl:Restriction ;
        owl:onProperty :conclusion ;
        owl:cardinality "1"^^xsd:nonNegativeInteger
    ] .
