ontology http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/tc.wsml

namespace
      default=http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/tc.wsml#,
      dc=http://purl.org/dc/elements/1.1#,
      wsml=http://www.wsmo.org/2004/d16/d16.1/v0.2/20040418#,
      dt=http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/dt.wsml#,
      prs=http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/owlPersonMediator.wsml,
      loc=http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/loc.wsml#,
      xsd=http://www.w3.org/2001/XMLSchema#

non-functional-properties 
      dc:title "International Train Connections Ontology"
      dc:creator "DERI International"
      dc:subject "Train", "Itinerary", "Train Connection", "Ticket"
      dc:description "International Train Itineraries"
      dc:publisher "DERI International"
      dc:contributor "Michael Stollberg", "Ruben Lara", "Holger Lausen",
            "Axel Polleres"
      dc:date "2004-05-31"
      dc:type http://www.wsmo.org/2004/d2/v0.3/20040329/#ontos
      dc:format "text/plain"
      dc:language "en-US"
      dc:relation 
            http://www.daml.org/2001/06/itinerary/itinerary-ont,
            http://daml.umbc.edu/ontologies/ittalks/person,
            http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/dt.wsml,
            http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/loc.wsml
      dc:coverage "ID:7029392 Name:World"
      dc:rights http://www.deri.org/privacy.html
      version "$Revision: 1.4 $"
      
       
      usedMediators
            http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/owlPersonMediator.wsml,
            http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/owlFactBookMediator.wsml,
            http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/dt.wsml,
            http://www.wsmo.org/2004/d3/d3.2/v0.1/20040607/resources/loc.wsml
            
conceptDefinitions
      
      concept station subconceptOf loc:location
            non-functional-properties
                  dc:description "Train station"
            code oftype xsd:string
                  non-functional-properties
                        dc:description "Code of the station"
            locatedIn oftype set loc:location
            borderToCountry oftype set loc:country
                  non-functional-properties
                        dc:description "For stations located at the border"
      
      concept itinerary
            non-functional-properties
                  dc:description "An itinerary between two locations"
            passenger oftype prs:person
                  non-functional-properties
                        dc:description "prs:person is a subset of vCard (http://www.ietf.org/rfc/rfc2425.txt)"
            recordLocatorNumber oftype xsd:string
            trip oftype trip
            
      concept trip
            start oftype loc:location
            end oftype loc:location
            via oftype set loc:location
            departure oftype dt:dateAndTime
            arrival oftype dt:dateAndTime
            duration oftype dt:interval
            distance oftype distance 
            
      concept trainTrip subconceptOf trip
            start oftype station
            end oftype station
            via oftype set station
            seat oftype xsd:string
            train oftype set  xsd:string
            class oftype class
      
      concept distance
            non-functional-properties
                  dc:description "Distance between two points"
            amount oftype xsd:float 
            units oftype xsd:string
            method kilometers
                  non-functional-properties
                        dc:description "Method that returns the distance (amount) in kilometers"
                  range DistanceKm oftype xsd:float
            method miles
                  range DistanceMiles oftype xsd:float
                  non-functional-properties
                        dc:description "Method that returns the distance (amount) in miles"

            
      concept class
            non-functional-properties
                  dc:description "Class of the seat for the itinerary"
            name oftype xsd:string
            service oftype set service
            
      concept service
            non-functional-properties
                  dc:description "Services included in a trip"
            name oftype xsd:string
            description oftype xsd:string
            
      concept meal subconceptOf service


axiomDefinitions

      axiom stationCountry
            non-functional-properties
                  dc:description "Integrity constraint: if a station is located in a place
                        which is located in a given country, the country of the station is the
                        same"
            logical-expression
            "<-
                   S memberOf station[
                         locatedIn hasvalue L,
                         country hasvalue C]
                   and L[
                         country hasvalue C2]
                   and C=C2."

      axiom depatureBeforeArrival
            non-functional-properties
                  dc:description "Integrity Constraint: departure has to be before arrival"
            logical-expression
            "<-
                   T memberOf trip[
                         departure hasvalue D,
                         arrival hasvalue A]
                         and dt:afterDateAndTime(A, D)."
                   
      axiom validDistance
            non-functional-properties
                  dc:description "The amount in a distance cannot be less than 0.
                        We only accept kilometers and miles."
            logical-expression
            "<-
                   D memberOf distance[
                         amount hasvalue A,
                         units hasvalue U]
                   and A >= 0
                   and (U="Kilometers" or U="Miles")."

      axiom kilometers
            non-functional-properties
                  dc:description "Converts miles to kilometers"
            logical-expression
            "DistanceKm <-
                               Self memberOf distance[
                                     amount hasvalue A,
                                     units hasvalue U] and
                               (U="Miles"
                                    and DistanceKm=A*1.609344) or
                               (U="Kilometers"
                                    and DistanceKm=A)."
                                    
      axiom miles
            non-functional-properties
                  dc:description "Converts kilometers to miles"
            logical-expression
            "DistanceMiles <-
                               Self memberOf distance[
                                     amount hasvalue A,
                                     units hasvalue U] and
                               (U="Miles"
                                    and DistanceMiles/1.609344=A) or
                               (U="Kilometers"
                                    and DistanceKm=A)."                                    
                   
      axiom equalityDistance
            non-functional-properties
                  dc:description "Computes equality of a distance"
            logical-expression
                  "X = Y <-
                         X memberOf distance and Y memberOf distance and
                         X.kilometers = Y.kilometers."                  

      axiom lessThanDistance
            non-functional-properties
                  dc:description "Computes -less than- for a distance"
            logical-expression
                  "X = Y <-
                         X memberOf distance and Y memberOf distance and
                         X.kilometers < Y.kilometers."                        

      axiom moreThanDistance
            non-functional-properties
                  dc:description "Computes -more than- for a distance"
            logical-expression
                  "X = Y <-
                         X memberOf distance and Y memberOf distance and
                         X.kilometers > Y.kilometers."                   
 
instanceDefinitions

      comment: A link to large set of instances is missing in WSMO.
       Therefore, in this version of the ontology we only include
       some example instances. The inclusion of links to large
       set of instances will be considered in future versions of
       WSMO

      instance innsbruckHbf memberOf station
            name hasvalue "Innsbruck Hbf"
            code hasvalue "INN"
            locatedIn hasvalues {loc:innsbruck}
            
      instance frankfurtHbf memberOf station
            name hasvalue "Frankfurt Hbf"
            code hasvalue "FKF"
            locatedIn hasvalues {loc:frankfurt}