# Two defects in an issue tracker, on the pattern's own scenario: TRK-4821 has been reproduced,
# so it must carry an assignee and a priority, while TRK-4902 has not and must carry neither.
# Each defect is in exactly one state, and the states are the members of one state set.

@prefix objectwithstates: <http://delicias.dia.fi.upm.es/ontologies/ObjectWithStates.owl#> .
@prefix set: <http://www.ontologydesignpatterns.org/cp/owl/set.owl#> .
@prefix situation: <http://www.ontologydesignpatterns.org/cp/owl/situation.owl#> .
@prefix ex: <https://w3id.org/ontoboard/example/object-with-states#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

ex:DefectTrk4821 a owl:NamedIndividual , objectwithstates:Object ;
    rdfs:label "defect TRK-4821: the CSV export drops the last row" ;
    objectwithstates:hasState ex:Confirmed .

ex:DefectTrk4902 a owl:NamedIndividual , objectwithstates:Object ;
    rdfs:label "defect TRK-4902: the login page times out on slow links" ;
    objectwithstates:hasState ex:Unconfirmed .

ex:Unconfirmed a owl:NamedIndividual , objectwithstates:State ;
    rdfs:label "unconfirmed: reported, not yet reproduced, so no assignee and no priority" ;
    <http://ontologydesignpatterns.org/cp/owl/collectionentity.owl#isMemberOf> ex:DefectWorkflowStates .

ex:Confirmed a owl:NamedIndividual , objectwithstates:State ;
    rdfs:label "confirmed: reproduced, so an assignee and a priority are required" ;
    <http://ontologydesignpatterns.org/cp/owl/collectionentity.owl#isMemberOf> ex:DefectWorkflowStates .

ex:Closed a owl:NamedIndividual , objectwithstates:State ;
    rdfs:label "closed: fixed and verified, nothing left to assign" ;
    <http://ontologydesignpatterns.org/cp/owl/collectionentity.owl#isMemberOf> ex:DefectWorkflowStates .

ex:DefectWorkflowStates a owl:NamedIndividual , objectwithstates:StateSet ;
    rdfs:label "the states a defect in this tracker can be in" ;
    set:size 3 .

# Only one direction of each inverse pair is asserted: hasState/isStateOf. A reasoner adds the other.
