# baseURI: http://www.workingontologist.org/Examples/Chapter12/cableprovider

@prefix d:       <http://www.workingontologist.org/Examples/Chapter12/cableprovider#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix q:       <http://www.workingontologist.org/Examples/Chapter12/questionnaire#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .

<http://www.workingontologist.org/Examples/Chapter12/cableprovider>
      a       owl:Ontology ;
      owl:imports <http://www.workingontologist.org/Examples/Chapter12/questionnaire> .

d:InternetSymptom rdfs:label "InternetSymptom" ;
      q:hasPriority q:Low ; 
      a       q:Question ;
      q:questionText "What problem are you having with your internet?" ;
      q:hasOption d:ISlow, d:INoService, d:IChoppy .


d:ISlow a q:Answer ; rdfs:label "Slow Internet" ;
      q:answerText "Slow connection" .

d:INoService a q:Answer ; rdfs:label "No internet" ;
      q:answerText "No Internet connection" .


d:IChoppy a q:Answer ; rdfs:label "choppy" ;
      q:answerText "Connection drops from time to time" .





d:NTDK rdfs:label "NTDK" ;
      a       q:Answer ;
      q:answerText "I don't know." .

d:NTN rdfs:label "NTN" ;
      a       q:Answer ;
      q:answerText """ No, my neighbors are 
not experiencing 
the same problem.""" . 

d:NTY rdfs:label "NTY" ;
      a       q:Answer ;
      q:answerText """Yes, my neighbors
are experiencing
the same problem.""" .

d:NeighborsToo rdfs:label "NeighborsToo" ;
      a       q:Question ;
      q:hasOption d:NTY , d:NTDK , d:NTN ;
      q:hasPrerequisite d:OYes , d:PTech ;
      q:questionText "Are other customers in your building also experiencing problems?" .

d:ONo rdfs:label "ONo" ;
      a       q:Answer ;
      q:answerText " No." .

d:OYes rdfs:label "OYes" ;
      a       q:Answer ;
      q:answerText "Yes." .

d:PBilling rdfs:label "PBilling" ;
      a       q:Answer ;
      q:answerText "Billing question." .

d:PCancel rdfs:label "PCancel" ;
      a       q:Answer ;
      q:enablesCandidate d:CancelReason ;
      q:answerText "Cancel account" .

d:CancelReason a q:Question ; rdfs:label "cancel reason" ;
      q:hasOption q:Moving, q:TooExpensive, q:NoAnswer ;
      q:questionText "Why do you want to cancel your account?" .


q:Moving a q:Answer ; rdfs:label "moving" ;
    q:answerText "Moving to a new residence"  .

q:TooExpensive a q:Answer; rdfs:label "Too expensive" ;
    q:answerText "Too expensive" .

q:NoAnswer a q:Answer ; rdfs:label "no answer" ;
    q:answerText "prefer not to say" .


d:PNew rdfs:label "PNew" ;
      a       q:Answer ;
      q:answerText "New account" .

d:PTech rdfs:label "PTech" ;
      a       q:Answer ;
      q:enablesCandidate  d:WhatProblem;
      q:answerText "Technical difficulty" .

d:SBoth rdfs:label "SBoth" ;
      a       q:Answer ;
      q:answerText "Both" ;
      q:enablesCandidate d:InternetSymptom , d:TVsymptom .

d:SInternet rdfs:label "SInternet" ;
      a       q:Answer ;
      q:answerText "High-speed Internet" ;
      q:enablesCandidate d:InternetSymptom .

d:STV rdfs:label "STV" ;
      a       q:Answer ;
      q:answerText "Cable TV" ;
      q:enablesCandidate d:TVsymptom .

d:TVSnosound rdfs:label "TVSnosound" ;
      a       q:Answer ;
      owl:differentFrom d:TVSnothing ;
      q:answerText "No Sound" .

d:TVSnothing rdfs:label "TVSnothing" ;
      a       q:Answer ;
      q:answerText "No Picture" .

d:TVSreception rdfs:label "TVSreception" ;
      a       q:Answer ;
      q:answerText "Bad reception" .

d:TVStiling rdfs:label "TVStiling" ;
      a       q:Answer ;
      q:answerText "Tiling" .

d:TVTurnedOn rdfs:label "TVTurnedOn" ;
      a       q:Question ;
      a       [ a       owl:Restriction ;
                owl:cardinality "2"^^xsd:int ;
                owl:onProperty q:hasPrerequisite
              ] ;
      rdfs:label "TVTurned on"^^xsd:string ;
      q:hasPrerequisite d:TVSnosound , d:TVSnothing ;
      q:questionText "Is your television turned on?"^^xsd:string .

d:TVsymptom rdfs:label "TVsymptom" ;
      a       q:HighPriorityItem , q:Question ;
      a       [ a       owl:Restriction ;
                owl:cardinality "1"^^xsd:int ;
                owl:onProperty q:hasPrerequisite
              ] ;
      q:hasOption d:TVSnothing , d:TVSnosound , d:TVStiling , d:TVSreception ;
      q:hasPrerequisite d:STV ;
      q:questionText "What television symptoms are you having?" .

d:WhatProblem rdfs:label "WhatProblem" ;
      a       q:Question ;
      q:hasOption d:SBoth , d:SInternet , d:STV ;
      q:hasPriority q:High ;
      q:questionText "What system are you having trouble with?" .

d:OthersInBuilding rdfs:label "othersinbuilding" ;
      a       q:Question ;
      q:hasOption d:ONo , d:OYes ;
      q:questionText "Do you live in a multi-unit dwelling with other customers?" .

d:WhatIssue rdfs:label "whatIssue" ;
      a       q:Question ;
      a       [ a       owl:Restriction ;
                owl:cardinality "0"^^xsd:int ;
                owl:onProperty q:hasPrerequisite
              ] ;
      q:hasOption d:PNew , d:PCancel , d:PTech , d:PBilling ;
      q:questionText "What can customer service help you with today?" .

q:hasPrerequisite
      rdfs:domain q:Question ;
      rdfs:range q:Answer .
