# The tagging pattern on its own scenario: Flickr photo 4312 shows a leopard and carries the tag
# "leopard", added by the user who uploaded it, drawn from Flickr's own tag cloud and dated. The tag
# is about the animal rather than about the picture, so the leopard is the object that plays the
# tagged role; a second photo, tagged "taken in Sicily", points at the situation it was taken in.

@prefix agentrole: <http://www.ontologydesignpatterns.org/cp/owl/agentrole.owl#> .
@prefix classification: <http://www.ontologydesignpatterns.org/cp/owl/classification.owl#> .
@prefix collectionentity: <http://www.ontologydesignpatterns.org/cp/owl/collectionentity.owl#> .
@prefix intensionextension: <http://www.ontologydesignpatterns.org/cp/owl/intensionextension.owl#> .
@prefix objectrole: <http://www.ontologydesignpatterns.org/cp/owl/objectrole.owl#> .
@prefix situation: <http://www.ontologydesignpatterns.org/cp/owl/situation.owl#> .
@prefix tagging: <http://www.ontologydesignpatterns.org/ont/dul/tagging.owl#> .
@prefix timeindexedsituation: <http://www.ontologydesignpatterns.org/cp/owl/timeindexedsituation.owl#> .
@prefix timeinterval: <http://www.ontologydesignpatterns.org/cp/owl/timeinterval.owl#> .
@prefix ex: <https://w3id.org/ontoboard/example/tagging#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

ex:HeikkiLaine a owl:NamedIndividual , agentrole:Agent ;
    rdfs:label "Heikki Laine, the Flickr user who uploaded and tagged the photo" .

ex:TaorminaPhoto a owl:NamedIndividual , situation:Entity ;
    rdfs:label "Flickr photo 7781, tagged \"taken in Sicily\"" ;
    situation:hasSetting ex:SicilianHoliday .

ex:FlickrTagCloud a owl:NamedIndividual , tagging:Folksonomy ;
    rdfs:label "the Flickr tag cloud, the folksonomy the tag was taken from" .

ex:LeopardPhoto a owl:NamedIndividual , intensionextension:InformationObject ;
    rdfs:label "Flickr photo 4312, a leopard asleep in a riverbed" ;
    intensionextension:expresses ex:LeopardConcept .

ex:MaraLeopard a owl:NamedIndividual , objectrole:Object ;
    rdfs:label "the leopard photographed in the Maasai Mara" ;
    objectrole:hasRole ex:TaggedThingRole .

ex:TaggedThingRole a owl:NamedIndividual , objectrole:Role ;
    rdfs:label "the tagged-thing role: what the tag is about, rather than the picture carrying it" .

ex:SicilianHoliday a owl:NamedIndividual , situation:Situation ;
    rdfs:label "the holiday in Sicily, August 2023, the situation the tag \"taken in Sicily\" refers to" ;
    situation:isSettingFor ex:TaorminaPhoto .

ex:LeopardConcept a owl:NamedIndividual , intensionextension:SocialObject ;
    rdfs:label "\"leopard\" as Flickr users understand it - the meaning photo and tag share" .

ex:LeopardTag a owl:NamedIndividual , tagging:Tag ;
    rdfs:label "the tag \"leopard\"" ;
    <http://www.ontologydesignpatterns.org/cp/owl/tagging.owl#isTagUsedIn> ex:TaggingOfPhoto4312 .

ex:TaggingOfPhoto4312 a owl:NamedIndividual , tagging:Tagging ;
    rdfs:label "tagging photo 4312 with \"leopard\"" ;
    <http://www.ontologydesignpatterns.org/cp/owl/tagging.owl#byAgent> ex:HeikkiLaine ;
    tagging:fromCloud ex:FlickrTagCloud ;
    tagging:hasPolarity true .

ex:TaggingOfPhoto7781 a owl:NamedIndividual , timeindexedsituation:TimeIndexedSituation ;
    rdfs:label "tagging photo 7781 with \"taken in Sicily\" - dated, but with no tagger recorded" ;
    timeindexedsituation:atTime ex:August2023 .

ex:August2023 a owl:NamedIndividual , timeinterval:TimeInterval ;
    rdfs:label "August 2023" ;
    timeinterval:hasIntervalDate "2023-08" ;
    timeinterval:hasIntervalEndDate "2023-08-31" ;
    timeinterval:hasIntervalStartDate "2023-08-01" .

# Only one direction of each inverse pair is asserted: atTime/isTimeIndexFor, byAgent/isTaggingAgentIn, expresses/isExpressedBy, forEntity/hasTimeIndexedSetting, fromCloud/isTagCloudOf, hasMember/isMemberOf, hasRole/isRoleOf, isAbout/isReferenceOf, isTagUsedIn/usingTag. A reasoner adds the other.

