@base         <http://www.w3.org/TR/usdl/interaction#> .
@prefix : <#> .
@prefix ctag:    <http://commontag.org/ns#> .
@prefix dcterms:  <http://purl.org/dc/terms/> .
@prefix dctypes:  <http://purl.org/dc/dcmitype/> .
@prefix foaf:    <http://xmlns.com/foaf/0.1/> .
@prefix gr:      <http://purl.org/goodrelations/v1#> .
@prefix msm:     <http://cms-wg.sti2.org/ns/minimal-service-model#> .
@prefix org:     <http://www.w3.org/ns/org#> .
@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 skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix time:    <http://www.w3.org/2006/time#> .
@prefix usdl-f:  <http://www.w3.org/TR/usdl/foundation#> .
@prefix usdl-func:  <http://www.w3.org/TR/usdl/functional#> .
@prefix usdl-int:  <http://www.w3.org/TR/usdl/interaction#> .
@prefix usdl-legal:  <http://www.w3.org/TR/usdl/legal#> .
@prefix usdl-part:  <http://www.w3.org/TR/usdl/participants#> .
@prefix usdl-price:  <http://www.w3.org/TR/usdl/pricing#> .
@prefix usdl-sl:  <http://www.w3.org/TR/usdl/service-level#> .
@prefix vcard:   <http://www.w3.org/2006/vcard/ns#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .

<http://www.w3.org/TR/usdl/interaction>
      rdf:type owl:Ontology ;
      rdfs:label "Interaction module of USDL v3 M5" ;
      dcterms:contributor :Torsten_Leidig ;
      dcterms:created "2011-04-18"^^xsd:date ;
      dcterms:creator :Torsten_Leidig ;
      dcterms:description "InteractionProtocol represents a concept that captures the externally observable behavior of a service in terms of atomic communication acts, i.e. interactions. The concept is also known as business protocol, public view or conversation protocol.<br> Of course, not every service requires a complex series of interactions in order to successfully provide its capabilities. Hence, InteractionProtocol is an optional element. Nonetheless, a service may choose to expose individual capabilities through dedicated interaction protocols, i.e. have more than one interaction protocol.
" ;
      dcterms:modified "2011-03-29"^^xsd:date ;
      owl:versionInfo "0.1" .

:Torsten_Leidig
      rdf:type foaf:Person ;
      foaf:name "Torsten Leidig";
      foaf:title "Dr";
      foaf:firstName "Torsten";
      foaf:phone "+49 6227 7 52535";
      foaf:lastName "Leidig" .

:InteractionProtocol 
	rdf:type rdfs:Class ;
	rdfs:label "interaction protocol" ;
	rdfs:comment "The class of interaction protocol descriptions of a service" ;
	rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> .

:Phase 
	rdf:type rdfs:Class ;
	rdfs:label "interaction phase" ;
	rdfs:comment "A Phase groups a set of interactions, which together form a logical part of the overall interaction protocol associated with a meaning. The grouping is a simple sequential order.<br> Phases are useful to divide the interaction protocol of long-running and complex process-based services into smaller more comprehensible pieces. Usually separated by milestones, phases give service consumers a clear indication how far along in the execution of the service they are: what is happening, what is required from them and which service results are available at the end of the phase." ;
	rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> .

:Interaction 
	rdf:type rdfs:Class ;
	rdfs:label "interaction" ;
	rdfs:comment "An Interaction represents actual communication between service consumer and service. On a technical level this could translate into calling a Web Service operation. On a professional level, it could mean that consumer and provider meet in person to exchange service parameters or resources involved in the service delivery (e.g. documents that are processed by the provider).<br> Interactions are the lowest-level building blocks of the interaction protocol and expose an atomic point of communication, which when enacted may lead to individual actions being performed. At least one agent partaking in the service's delivery is involved in the enactment of an interaction. This means a communication channel has to be provided and communication with the consumer has to be performed. Note: an interaction does not necessarily need to result in a service action (operation) to be performed. For example, a series of interactions might just collect input data from the consumer before one interaction finally triggers the action.
" ;
	rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> .

:Milestone 
	rdf:type rdfs:Class ;
	rdfs:label "milestone" ;
	rdfs:comment "A Milestone indicates the achievement of an important stage in the execution of a service. Milestones provide a way to express the major states that a service will reach during its execution. States are not necessarily limited to &quote;execution states&quote; of a service (e.g.: invoked, running, suspended, or completed), but could, for example, indicate the progress of processing a certain object. In this sense, states have to be understood as specific to the service's application domain. In consequence, it is possible to reach more than one state at the end of a phase. On the other hand, phases might require certain states to be reached before they can start." ;
	rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> .

:Condition 
	rdf:type rdfs:Class ;
	rdfs:label "condition" ;
	rdfs:comment "The class of conditions for a milstone. Preconditions or postcondition" ;
	rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> .

# Properties

:hasInteractionProtocol
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Interaction protocol of a service" ;
      rdfs:domain usdl-serv:Service ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> ;
      rdfs:label "has interaction protocol"@en ;
      rdfs:range :InteractionProtocol .


:exposedFunction
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Describes which functions are exposed by the interaction protocol" ;
      rdfs:domain :InteractionProtocol ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> ;
      rdfs:label "has access protocol"@en ;
      rdfs:range usdl-func:Function .

:hasPhase
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Phases of an interaction interaction protocl" ;
      rdfs:domain :InteractionProtocol ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> ;
      rdfs:label "has implementation specification"@en ;
      rdfs:range :Phase .

:hasImplementationSpecification
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Link to the formal specification of the interaction protcol, e.g. BPEL" ;
      rdfs:domain :InteractionProtocol ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> ;
      rdfs:label "has implementation specification"@en ;
      rdfs:range usdl-f:TechnicalMetadata .

:hasInteraction
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Interactions that are part of the interaction protocl" ;
      rdfs:domain
              [ rdf:type owl:Class ;
                owl:unionOf (:Phase :InteractionProtocol)
              ] ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interation> ;
      rdfs:label "has implementation specification"@en ;
      rdfs:range :Interaction .


# move to usdl-f

:isOptional
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Indicates whether a phase is optional or mandatory" ;
      rdfs:domain
              [ rdf:type owl:Class ;
                owl:unionOf (:Phase :Interaction)
              ] ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> ;
      rdfs:label "is optional"@en ;
      rdfs:range xsd:boolean . # is that posible or do I have to use rdfs:Literal?

:hasPrecondition
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Preconditions to be fulfilled to perform the phase" ;
      rdfs:domain :Phase ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> ;
      rdfs:label "hase preprecondition"@en ;
      rdfs:range :Milestone .

:hasPostcondition
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Postcondition that holds if the phase was performed sucessfully" ;
      rdfs:domain :Phase ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> ;
      rdfs:label "has postcondition"@en ;
      rdfs:range :Milestone .

:hasCondition
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Conditions to be fulfilled for a milestone" ;
      rdfs:domain :Milestone ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> ;
      rdfs:label "has condition"@en ;
      rdfs:range :Condition .

:hasRole
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Roles of participants which are involved in an interaction" ;
      rdfs:domain :Interaction ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> ;
      rdfs:label "has role"@en ;
      rdfs:range org:Role .

:initiatorRole
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Initiator of an interaction" ;
      rdfs:domain :Interaction ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> ;
      rdfs:label "initiator role"@en ;
      rdfs:range org:Role .

:triggerdFunction
      rdf:type owl:ObjectProperty ;
      rdfs:comment "Functions which are triggered by the interaction" ;
      rdfs:domain :Interaction ;
      rdfs:isDefinedBy <http://www.w3.org/TR/usdl/interaction> ;
      rdfs:label "triggered function"@en ;
      rdfs:range usdl-func:Function .



