sequenceowlontologysemantic-weblinked-data

Sequence in OWL using protege


I'm trying to define a sequence of action in OWL using protege. I have read the following topics:

The problem I have is that an individual can be in different course of action. I hope the following example helps:

I have the class "Action" and class "Course of Action".

For Action I have the following individuals: "Say Hello", "Give Your Name", "Ask a question", "Say Good Bye"

For Course of Action I want to have 2 different sequences:

  1. Say Hello - Give your Name - Say Good Bye
  2. Say Hello - Ask a question - Say Good Bye

"Say Hello" will be linked to two individual by the property hasNext and I will not be able to find the exact course of action. Is it possible to do what I want in OWL?


Solution

  • This is something you can model, but you'll need to distinguish between the actual sequences and the steps within them. This is typically modeled by a linked list. RDFS defines a list vocabulary with rdf:first, rdf:rest and rdf:nil, but you probably don't want to co-opt that terminology in your OWL ontology. Instead, you'd do something like this

    :seq1step1 :hasAction :SayHello ;
               :hasNextStep :seq1step2 .
    
    :seq1step2 :hasAction :GiveYourName ;
               :hasNextStep :seq1step3 .
    
    :seq1step3 :hasAction :SayGoodbye ;
               :hasNextStep :emptySeq .
    
    
    :seq2step1 :hasAction :SayHello ;
               :hasNextStep :seq2step2 .
    
    :seq2step2 :hasAction :AskAQuestion ;
               :hasNextStep :seq2step3 .
    
    :seq2step3 :hasAction :SayGoodbye ;
               :hasNextStep :emptySeq .
    

    This does mean your queries need to be in terms of steps rather than the specific actions, but that's actually necessary because otherwise:

    "Say Hello" will be linked to two individual by the property hasNext and I will not be able to find the exact course of action.