namespace <<http://www.wsmo.org/ontologies/trainConnection#>>
      dc:<<http://purl.org/dc/elements/1.1#>>
      dt:<<http://www.wsmo.org/ontologies/dateTime#>>
      prs:<<http://www.wsmo.org/2004/d3/d3.2/v0.1/20041004/resources/owlPersonMediator.wsml>>
      loc:<<http://www.wsmo.org/ontologies/location#>>
      geo:<<http://www.wsmo.org/2004/d3/d3.2/v0.1/20041004/resources/owlGeoMediator.wsml#>>
      xsd:<<http://www.w3.org/2001/XMLSchema#>>

ontology <<http://www.wsmo.org/ontologies/trainConnection>>

      nonFunctionalProperties
            dc:title hasValue "International Train Connections Ontology"
            dc:creator hasValue <<http://www.deri.org/foaf#deri>>
            dc:subject hasValues {"Train", "Itinerary", "Train Connection", "Ticket"}
            dc:description hasValue "International Train Connections"
            dc:publisher hasValue <<http://www.deri.org/foaf#deri>>
            dc:contributor hasValues {<<http://www.deri.org/foaf#stollberg>>,
                  <<http://homepage.uibk.ac.at/~C703225/foaf.rdf>>,
                  <<http://homepage.uibk.ac.at/~c703240/foaf.rdf>>,
                  <<http://www.deri.org/foaf#polleres>>}
            dc:date hasValue "2004-10-04"
            dc:type hasValue <<http://www.wsmo.org/2004/d2#ontologies>>
            dc:format hasValue "text/html"
            dc:identifier hasValue <<http://www.wsmo.org/ontologies/trainConnection>>
            dc:source hasValue <<http://www.daml.org/2001/06/itinerary/itinerary-ont>>
            dc:language hasValue "en-US"
            dc:relation hasValues {<<http://www.daml.org/2001/06/itinerary/itinerary-ont>>,
                  <<http://daml.umbc.edu/ontologies/ittalks/person>>,
                  <<http:://www.wsmo.org/ontologies/dateTime>>,
                  <<http:://www.wsmo.org/ontologies/location>>,
                  <<http://www.daml.org/2001/02/geofile/geofile-ont>>,
                  <<http://www.daml.org/2001/02/geofile/geofile-ont>>}
            dc:coverage hasValue "ID:7029392 Name:World"
            dc:rights hasValue <<http://www.deri.org/privacy.html>>
            version hasValue "$Revision: 1.10 $"
      endNonFunctionalProperties

      importedOntologies {<<http://www.wsmo.org/ontologies/dateTime>>,
            <<http://www.wsmo.org/ontologies/location>>}

      usedMediators {<<http://www.wsmo.org/2004/d3/d3.2/v0.1/20041004/resources/owlPersonMediator.wsml>>,
            <<http://www.wsmo.org/2004/d3/d3.2/v0.1/20041004/resources/owlFactBookMediator.wsml>>}
            
 
      concept station subConceptOf geo:geographicLocation
            nonFunctionalProperties
                  dc:description hasValue "Train station"
            endNonFunctionalProperties
            code ofType xsd:string
                  nonFunctionalProperties
                        dc:description hasValue "Code of the station"
                  endNonFunctionalProperties
            borderToCountry ofType loc:border
                  nonFunctionalProperties
                        dc:description hasValue "For stations located at the border"
                  endNonFunctionalProperties
      
      concept itinerary
            nonFunctionalProperties
                  dc:description hasValue "An itinerary between two locations"
            endNonFunctionalProperties
            passenger ofType prs:person
                  nonFunctionalProperties
                        dc:description hasValue "prs:person is a subset of vCard (http://www.ietf.org/rfc/rfc2425.txt)"
                  endNonFunctionalProperties
            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 loc:distance 
            
      concept trainTrip subConceptOf trip
            nonFunctionalProperties
                  dc:description hasValue "A train trip"       
            endNonFunctionalProperties
            start ofType station
            end ofType station
            via ofType set station
            seat ofType xsd:string
            train ofType xsd:string
            class ofType xsd:string

      axiom stationCountry
            nonFunctionalProperties
                  dc:description hasValue "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"
            endNonFunctionalProperties
            definedBy
                  constraint
                        ?S[
                              locatedIn hasValue ?L,
                              country hasValue ?C
                        ]memberOf station
                        and not ?L[
                              country hasValue ?C
                        ]memberOf loc:location .

      axiom departureBeforeArrival
            nonFunctionalProperties
                  dc:description hasValue "Integrity Constraint: departure has to be before arrival"
            endNonFunctionalProperties
            definedBy
             constraint
                   ?T[
                         departure hasValue ?D,
                         arrival hasValue ?A
                   ]memberOf trip
                   and ?A <= ?D.

      axiom startNotEqualEnd
            nonFunctionalProperties
                  dc:description hasValue "Integrity Constraint: the start and end of a trip have to be different"
            endNonFunctionalProperties
            definedBy
             constraint
                   ?T[
                         start hasValue ?Start,
                         end hasValue ?End
                   ]memberOf trip 
                   and ?Start = ?End.

      instance innsbruckHbf memberOf station
            nonFunctionalProperties
                  dc:description hasValue "Innsbruck central station"
            endNonFunctionalProperties
            name hasValue "Innsbruck Hbf"^^xsd:string
            code hasValue "INN"^^xsd:string
            locatedIn hasValues {loc:innsbruck}
            
      instance frankfurtHbf memberOf station
            name hasValue "Frankfurt Hbf"^^xsd:string
            code hasValue "FKF"^^xsd:string
            locatedIn hasValues {loc:frankfurt}