# One man, two roles, a different name in each: Samuel Clemens reported for the Territorial
# Enterprise as "Mark Twain" and held a pilot's licence as "Samuel L. Clemens". The name hangs
# off the role, not off the man, which is what lets the same person answer to both.

@prefix ontology: <https://kastle-labl.org/lod/ontology/> .
@prefix ex: <https://w3id.org/ontoboard/example/roledependentnames#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

ex:SamuelClemens a owl:NamedIndividual , ontology:Agent ;
    rdfs:label "Samuel Langhorne Clemens, 1835-1910" ;
    ontology:assumesAgentRole ex:NewspaperReporterRole , ex:SteamboatPilotRole .

ex:NewspaperReporterRole a owl:NamedIndividual , ontology:AgentRole ;
    rdfs:label "the reporter's job on the Virginia City Territorial Enterprise, from 1862" ;
    ontology:hasRoleUnderName ex:MarkTwain .

ex:SteamboatPilotRole a owl:NamedIndividual , ontology:AgentRole ;
    rdfs:label "the licensed Mississippi steamboat pilot role, held until the war closed the river" ;
    ontology:hasRoleUnderName ex:LegalName .

ex:MarkTwain a owl:NamedIndividual , ontology:Name ;
    rdfs:label "the pen name the reporting and the novels went out under" ;
    ontology:hasNameAsString ex:MarkTwainString .

ex:LegalName a owl:NamedIndividual , ontology:Name ;
    rdfs:label "the name on the pilot's licence" ;
    ontology:hasNameAsString ex:ClemensString .

ex:MarkTwainString a owl:NamedIndividual , <https://kastle-labl.org/lod/ontology/xsd:string> ;
    rdfs:label "the string \"Mark Twain\"" .

ex:ClemensString a owl:NamedIndividual , <https://kastle-labl.org/lod/ontology/xsd:string> ;
    rdfs:label "the string \"Samuel L. Clemens\"" .

ex:TerritorialEnterprise a owl:NamedIndividual , owl:Thing ;
    rdfs:label "the Virginia City Territorial Enterprise, which gave him the reporter's chair" ;
    ontology:providesAgentRole ex:NewspaperReporterRole .

ex:SteamboatInspectors a owl:NamedIndividual , owl:Thing ;
    rdfs:label "the St. Louis steamboat inspectors, who issued pilots their licences" ;
    ontology:providesAgentRole ex:SteamboatPilotRole .

# hasName is deliberately not asserted anywhere. The pattern defines it as the chain
# assumesAgentRole o hasRoleUnderName, so on the pattern's own terms Clemens hasName both
# "Mark Twain" and his legal name, by way of the role he held under each. That chain is also
# why HermiT refuses this pattern: it and assumesAgentRole are defined through each other, so
# the inference is the pattern's intent rather than something a reasoner will hand back here.
