@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix jd13:  <http://www.workingontologist.com/Examples/Chapter13/JamesDean#> .

jd13:ThreeMovieOwner  a      owl:Class ;
        rdfs:label           "ThreeMovieOwner" ;
        owl:equivalentClass  [ a                owl:Restriction ;
                               rdfs:label       "ownsMovie exactly 3" ;
                               owl:cardinality  "3"^^xsd:nonNegativeInteger ;
                               owl:onProperty   jd13:ownsMovie
                             ] .

jd13:JudiDenchMovie  a    owl:Class ;
        rdfs:label        "Judi dench movie" ;
        rdfs:subClassOf   jd13:Movie ;
        owl:disjointWith  jd13:JudyGarlandMovie , jd13:TomCruiseMovie .

jd13:TomCruiseMovie  a   owl:Class ;
        rdfs:label       "Tom cruise movie" ;
        rdfs:subClassOf  jd13:Movie .

<http://www.workingontologist.com/Examples/Chapter13/JamesDean>
        a       owl:Ontology .

jd13:NotFewMovieOwner
        a           owl:Class ;
        rdfs:label  "NotFewMovieOwner" .

jd13:Movie  a       owl:Class ;
        rdfs:label  "Movie" .

jd13:ownedBy  a     owl:ObjectProperty ;
        rdfs:label  "ownedBy" .

jd13:EastOfEden  a  jd13:JamesDeanMovie ;
        rdfs:label  "East of Eden" .

jd13:JamesDeanExclusive
        a                    owl:Class ;
        rdfs:label           "JamesDeanExclusive" ;
        owl:equivalentClass  [ a                  owl:Restriction ; rdfs:label "ownsMovie only JamesDeanMovie" ;
                               owl:allValuesFrom  jd13:JamesDeanMovie ;
                               owl:onProperty     jd13:ownsMovie
                             ] .

jd13:RimbaudsMovie  a      jd13:JamesDeanMovie ; rdfs:label "RimbaudsMovie" ;
        owl:differentFrom  jd13:EastOfEden , jd13:Giant .

jd13:JudyGarlandMovie
        a                 owl:Class ;
        rdfs:label        "Judy garland movie" ;
        rdfs:subClassOf   jd13:Movie ;
        owl:disjointWith  jd13:JamesDeanMovie , jd13:TomCruiseMovie .

jd13:Rocky  a       jd13:ThreeMovieOwner , jd13:JamesDeanExclusive ;
        rdfs:label  "Rocky" .

jd13:Paul  a    jd13:MovieFan ;
        a       [ a                   owl:Restriction ;
                  rdfs:label          "ownsMovie some TomCruiseMovie" ;
                  owl:onProperty      jd13:ownsMovie ;
                  owl:someValuesFrom  jd13:TomCruiseMovie
                ] ;
        a       [ a                   owl:Restriction ;
                  rdfs:label          "ownsMovie some JudyGarlandMovie" ;
                  owl:onProperty      jd13:ownsMovie ;
                  owl:someValuesFrom  jd13:JudyGarlandMovie
                ] ;
        a       [ a                   owl:Restriction ;
                  rdfs:label          "ownsMovie some JudiDenchMovie" ;
                  owl:onProperty      jd13:ownsMovie ;
                  owl:someValuesFrom  jd13:JudiDenchMovie
                ] ;
        a       [ a                   owl:Restriction ;
                  rdfs:label          "ownsMovie some AntonioBanderasMovie" ;
                  owl:onProperty      jd13:ownsMovie ;
                  owl:someValuesFrom  jd13:AntonioBanderasMovie
                ] ;
        a       [ a                   owl:Restriction ; rdfs:label "ownsMovie some not JamesDeanMovie" ;
                  owl:onProperty      jd13:ownsMovie ;
                  owl:someValuesFrom  [ a                 owl:Class ;
                                        rdfs:label        "not a JamesDeanMovie" ;
                                        owl:complementOf  jd13:JamesDeanMovie
                                      ]
                ] .

jd13:Giant  a       jd13:JamesDeanMovie ;
        rdfs:label  "Giant" .

jd13:Rebel  a       jd13:JamesDeanMovie ;
        rdfs:label  "Rebel Without a Cause" .

jd13:MovieFan  a    owl:Class ;
        rdfs:label  "MovieFan" .

jd13:AntonioBanderasMovie
        a                 owl:Class ;
        rdfs:label        "Antonio banderas movie" , "AntonioBanderasMovie" ;
        rdfs:subClassOf   jd13:Movie ;
        owl:disjointWith  jd13:JudyGarlandMovie , jd13:JudiDenchMovie , jd13:JamesDeanMovie , jd13:TomCruiseMovie .

jd13:PaulsMovies  a          owl:Class ;
        owl:equivalentClass  [ a               owl:Restriction ;  rdfs:label "ownedBy Paul" ;
                               rdfs:label      "ownedBy Paul" ;
                               owl:hasValue    jd13:Paul ;
                               owl:onProperty  jd13:ownedBy
                             ] .

jd13:JamesDeanMovie  a    owl:Class ;
        rdfs:label        "JamesDeanMovie" ;
        rdfs:subClassOf   jd13:Movie , jd13:PaulsMovies ;
        owl:disjointWith  jd13:SpikeLeeMovie , jd13:JudiDenchMovie , jd13:TomCruiseMovie ;
        owl:oneOf         [ rdf:first   jd13:EastOfEden ;
                            rdf:rest    ( jd13:Giant jd13:Rebel ) ;
                            rdfs:label  "(EastOfEden, Giant, Rebel)"
                          ] .

jd13:SpikeLeeMovie  a     owl:Class ;
        rdfs:label        "SpikeLeeMovie" ;
        rdfs:subClassOf   jd13:Movie ;
        owl:disjointWith  jd13:JamesDeanMovie .

jd13:JamesDeanObsessive
        a                   owl:Class ;
        rdfs:label          "JamesDeanObsessive" ;
        owl:intersectionOf  ( jd13:MovieFan
                              [ a                  owl:Restriction ;
                                owl:allValuesFrom  jd13:JamesDeanMovie ;
                                owl:onProperty     jd13:ownsMovie
                              ]
                              [ a                owl:Restriction ;
                                owl:cardinality  "3"^^xsd:nonNegativeInteger ;
                                owl:onProperty   jd13:ownsMovie
                              ]
                            ) .

jd13:ManyMovieOwner  a       owl:Class ;
        rdfs:label           "ManyMovieOwner" ;
        owl:equivalentClass  [ a                   owl:Restriction ; rdfs:label "ownsMovie min 4" ;
                               owl:minCardinality  "4"^^xsd:nonNegativeInteger ;
                               owl:onProperty      jd13:ownsMovie
                             ] .

jd13:DoTheRightThing  a  jd13:SpikeLeeMovie ;
        rdfs:label  "Do the Right Thing" . 

[ a                    owl:AllDifferent ;
  owl:distinctMembers  ( jd13:EastOfEden jd13:Giant jd13:Rebel )
] .

jd13:FewMovieOwner  a        owl:Class ;
        rdfs:label           "FewMovieOwner" ;
        owl:complementOf     jd13:NotFewMovieOwner ;
        owl:equivalentClass  [ a                   owl:Restriction ; rdfs:label "ownsMovie max 3" ;
                               owl:maxCardinality  "3"^^xsd:nonNegativeInteger ;
                               owl:onProperty      jd13:ownsMovie
                             ] .

jd13:SevenMovieOwner  a      owl:Class ;
        rdfs:label           "Seven movie owner" ;
        rdfs:subClassOf      jd13:Movie ;
        owl:equivalentClass  [ a                   owl:Restriction ;
                               rdfs:label          "ownsMovie at least 7" ;
                               owl:minCardinality  "7"^^xsd:int ;
                               owl:onProperty      jd13:ownsMovie
                             ] .

jd13:ownsMovie  a      owl:ObjectProperty ;
        rdfs:domain    jd13:MovieFan ;
        rdfs:label     "ownsMovie" ;
        rdfs:range     jd13:Movie ;
        owl:inverseOf  jd13:ownedBy .

jd13:JamesDeanFan  a         owl:Class ;
        rdfs:label           "JamesDeanFan" ;
        owl:equivalentClass  [ a                   owl:Restriction ;
                               owl:onProperty      jd13:ownsMovie ;
                               owl:someValuesFrom  jd13:JamesDeanMovie
                             ] .


jd13:Rocky a jd13:FewMovieOwner .