@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix test: <http://www.daml.org/2003/06/ruletests/test-ont#> .
@prefix airport-ont: <http://www.daml.org/2001/09/html/airport-ont#> .
@prefix airport: <http://www.daml.org/cgi-bin/airport?> .
@prefix map: <http://www.daml.org/2001/06/map/map-ont#> .
@prefix : <#> .

<> a test:Test;
   owl:versionInfo "$Id: translation-3.n3,v 1.3 2003/08/26 14:23:20 mdean Exp $";
   rdfs:comment "ontology translation/rewriting for visualization (with creation of bnodes).  Extends translation-1 by including bnodes in the body as well as the head." .

:Location a owl:Class;
  rdfs:subClassOf
    [ a owl:Restriction;
      owl:onProperty :latitude;
      owl:allValuesFrom xsd:double ];
  rdfs:subClassOf
    [ a owl:Restriction;
      owl:onProperty :longitude;
      owl:allValuesFrom xsd:double ].

:latitude a owl:DatatypeProperty.
:longitude a owl:DatatypeProperty.

airport:GEG
  a airport-ont:Airport;
  airport-ont:name "Spokane Intl";
  :location
    [ :latitude "47.6197";
      :longitude "-117.5336" ].

:layer a map:DrawingLayer.

:map a map:Map;
     map:name "Airports";
     map:layer :layer.

{ ?airport a airport-ont:Airport;
           :location ?loc;
           airport-ont:name ?name.
  ?loc :latitude ?lat;
       :longitude ?lon.
}
=>
{ 
  :layer map:object [a map:Point;
                     map:location [a map:Location;
                                   map:latitude ?lat;
                                   map:longitude ?lon];
                     map:underlyingObject ?airport;
                     map:label ?name].
}
.

{ :layer map:object ?object }
=>
{ <> test:successful "true" }
.
