# baseURI: http://www.workingontologist.org/Examples/Chapter8/Library

@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix Library1:    <http://www.workingontologist.org/Examples/Chapter8/Library1#> .
@prefix Library2:    <http://www.workingontologist.org/Examples/Chapter8/Library2#> .
@prefix lib:    <http://www.workingontologist.org/Examples/Chapter8/Library#> .
@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/Chapter8/Library>
      a       owl:Ontology .

lib:Patron a rdfs:Class ; rdfs:label "Patron" .
lib:Book a rdfs:Class ; rdfs:label "Book" .



Library1:borrows a rdf:Property; rdfs:label "borrows"; rdfs:subPropertyOf Library2:checkedOut ;
  rdfs:domain lib:Patron ; rdfs:range lib:Book .

Library2:checkedOut a rdf:Property; rdfs:label "checked out"; rdfs:subPropertyOf Library1:borrows ;
  rdfs:domain lib:Patron ; rdfs:range lib:Book .

Library1:borrows rdfs:subPropertyOf lib:hasPossession .
Library2:checkedOut rdfs:subPropertyOf lib:hasPossession .

lib:signedTo a rdf:Property ; rdfs:domain lib:Book; rdfs:range lib:Patron ;
   rdfs:label "signed to" .

lib:signedOut a rdf:Property; rdfs:label "signed out" .

lib:signedTo owl:inverseOf lib:signedOut .

lib:signedOut rdfs:subPropertyOf lib:hasPossession .
Library1:borrows rdfs:subPropertyOf lib:hasPossession .




lib:Amit Library1:borrows lib:MobyDick .
lib:Marie Library1:borrows lib:Orlando .
lib:LeavesOfGrass lib:signedTo lib:Jim .
lib:WutheringHeights lib:signedTo lib:Yoshi .


lib:possessedBy a rdf:Property; rdfs:label "possessed by" .

lib:signedTo rdfs:subPropertyOf lib:possessedBy .
Library1:borrows rdfs:subPropertyOf lib:hasPossession .
lib:possessedBy owl:inverseOf lib:hasPossession .
lib:hasPossession rdfs:label "has possession" ; a rdf:Property . 


lib:lentTo owl:inverseOf Library1:borrows ; rdfs:label "lent to" .
lib:lentTo rdfs:subPropertyOf lib:possessedBy .





