All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xsparql.base.XSPARQL-50.xsparql Maven / Gradle / Ivy

The newest version!

prefix mo:  
prefix rdf:  
prefix foaf:  
prefix lfm:  
prefix dc:  
prefix rdfs:  
prefix geo:  
prefix event:  

declare variable $user := 'jacktrades'; 

{ 
let $lastfm := fn:concat("http://ws.audioscrobbler.com/2.0/?method=user.gettopartists&api_key=16307daa8ce0d0cc1dab015e0fdab8ec&user=", $user) 
  for $artistInfo in doc($lastfm)//artist[@rank < 6] 
  let $artist := data($artistInfo/name) 
  let $uri := fn:concat("http://lastfm.rdfize.com/artists/", fn:encode-for-uri($artist)) 
  for * from $uri 
  where { $event mo:performer $uri ; a mo:Performance. 
          $event event:place $venue; rdfs:label $label . 
          optional { $venue geo:long $long; geo:lat $lat } } 

return if (fn:string-length($long) != 0) then 
       
        {fn:concat("Concert of ", $label)} 
         {fn:concat($long, ",", $lat, ",0")} 
        
else () 
} 





© 2015 - 2025 Weber Informatics LLC | Privacy Policy