# Base: http://protege.stanford.edu/swbp/flight.n3#
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .

:Flight
      a       owl:Class .

:UA_1377_3
      a       :FinalFlightSegment ;
      :destination :JFK .

:flight_sequence
      a       owl:ObjectProperty , owl:FunctionalProperty ;
      rdfs:domain :Flight ;
      rdfs:range :FlightSegment .

:JFK
      a       :Airport .

:UA_1377
      a       :Flight ;
      :flight_sequence
              :UA_1377_1 .

:DFW
      a       :Airport .

:LAX
      a       :Airport .

:FinalFlightSegment
      a       owl:Class ;
      rdfs:comment "The last flight segment has no next_segment"^^<http://www.w3.org/2001/XMLSchema#string> ;
      rdfs:subClassOf :FlightSegment ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:maxCardinality "0"^^<http://www.w3.org/2001/XMLSchema#int> ;
                owl:onProperty :next_segment
              ] .

:UA_1377_2
      a       :FlightSegment ;
      :destination :DFW ;
      :next_segment :UA_1377_3 .

:UA_1377_1
      a       :FlightSegment ;
      :destination :LAX ;
      :next_segment :UA_1377_2 .

:FlightSegment
      a       owl:Class ;
      rdfs:subClassOf owl:Thing ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:cardinality "1"^^<http://www.w3.org/2001/XMLSchema#int> ;
                owl:onProperty :destination
              ] ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:allValuesFrom :Airport ;
                owl:onProperty :destination
              ] .

:next_segment
      a       owl:ObjectProperty , owl:FunctionalProperty ;
      rdfs:domain :FlightSegment ;
      rdfs:range :FlightSegment .

:Airport
      a       owl:Class .

<http://protege.stanford.edu/swbp/flight.owl>
      a       owl:Ontology .

:destination
      a       owl:ObjectProperty , owl:FunctionalProperty ;
      rdfs:domain :FlightSegment .
