Mobile Query Service

This webpage represents the online documentation for the submission "A Mobile Query Service for Integrated Access to Large Numbers of Online Semantic Web Data Sources" to the Journal of Web Semantics. This documentation contains all resources related to the experiments, including the experiment queries and dataset.

Contact: William Van Woensel

Queries

<< back to top

Below, you can find the experiment queries.

        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        PREFIX wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>
        PREFIX fb: <http://rdf.freebase.com/ns/>
        PREFIX dbp: <http://dbpedia.org/property/>
        PREFIX dbo: <http://dbpedia.org/ontology/>
        SELECT ?shoppingCentre ?name ?lat ?long ?town ?photos
        WHERE { 
          ?shoppingCentre rdf:type fb:location.location .
          ?shoppingCentre rdfs:label ?name .

          ?shoppingCentre wgs:lat ?lat ;
            wgs:long ?long ;
            fb:business.shopping_center.address ?address .
          ?address fb:location.mailing_address.citytown ?town .

          OPTIONAL { 
            ?shoppingCentre dbp:hasPhotoCollection ?photos .
          }
        }
    
Query 1. The first query returns all shopping centres together with their names, absolute coordinates, town and (optionally) photos.


    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    SELECT ?person ?group ?img ?account
    WHERE {
      ?group rdf:type foaf:Group .
      ?group foaf:member ?person .
      ?person rdf:type foaf:Person .

      OPTIONAL {
        ?img foaf:depicts ?person .
      } 
      OPTIONAL {
        ?person foaf:holdsAccount ?account .
        ?account rdf:type foaf:OnlineChatAccount .
      } 
    }
    
Query 2. The second query selects all persons and the groups they are member of, optionally with images depicting these persons and their online chat accounts.


    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX geo: <http://www.geonames.org/ontology#> 
    PREFIX sch: <http://schema.org/>
    PREFIX wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>
    SELECT DISTINCT ?airport ?lat ?long 
    WHERE {
      ?airport rdf:type sch:Airport .

      ?airport wgs:geometry ?shape ;
        wgs:lat ?lat ;
        wgs:long ?long .
    }
    
Query 3. The third query returns all airports, together with their absolute coordinates.


    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX am: <http://purl.org/collections/nl/am/>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    SELECT ?exhibition ?name ?from ?to ?venue ?piece ?pieceName
    WHERE {
      ?exhibition rdf:type am:Exhibition .
      ?exhibition rdfs:label ?name ;
        am:exhibitionDateStart ?from ;
        am:exhibitionDateEnd ?to ;
        am:exhibitionVenue ?venue .

      ?piece am:exhibition ?exhibition ;
        am:title ?pieceName .
    }
    
Query 4. The fourth query finds all exhibitions, together with their names, start- and end-dates, venues, displayed pieces and their names.


    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX gr: <http://purl.org/goodrelations/v1#>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
    SELECT ?offering ?price ?manufacturer ?name ?comment
    WHERE {
      ?offering gr:hasPriceSpecification ?priceSpec ;
        gr:includesObject ?object .

      ?priceSpec gr:hasCurrency "USD" ;
        gr:hasCurrencyValue ?price .
      FILTER (xsd:double(?price) < 20)

      ?object gr:typeOfGood ?goodType .
      ?goodType gr:hasMakeAndModel ?model .
      ?model rdf:type gr:ProductOrServiceModel .

      ?model gr:hasManufacturer ?manufacturer .

      ?model rdfs:label ?name ;
        rdfs:comment ?comment .
    };
    
Query 5. The fifth and final query selects products below 20 dollars, their price, manufacturer, name and comments.

Dataset

<< back to top

You can find the experiment dataset here.