From: <sk...@us...> - 2008-06-18 18:25:58
|
Revision: 970 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=970&view=rev Author: sknappe Date: 2008-06-18 11:25:40 -0700 (Wed, 18 Jun 2008) Log Message: ----------- changed the query a bit, so that it works Modified Paths: -------------- trunk/src/music-recommender/ajax.php Modified: trunk/src/music-recommender/ajax.php =================================================================== --- trunk/src/music-recommender/ajax.php 2008-06-18 15:22:27 UTC (rev 969) +++ trunk/src/music-recommender/ajax.php 2008-06-18 18:25:40 UTC (rev 970) @@ -41,8 +41,19 @@ function doSearch($searchString) { // ToDo: execute a SPARQL query (find labels matching search string) by contacting DL-Learner web service - $query = ' - PREFIX geo: <http://www.geonames.org/ontology#> + $query = 'PREFIX geo:<http://www.geonames.org/ontology#> + PREFIX wgs:<http://www.w3.org/2003/01/geo/wgs84_pos#> + SELECT ?a ?place ?lat ?long + WHERE { + ?a a mo:MusicArtist; + foaf:based_near ?place. + ?place geo:name ?name; + geo:population ?population; + wgs:lat ?lat; + wgs:long ?long + } + LIMIT 1'; + /*PREFIX geo: <http://www.geonames.org/ontology#> PREFIX wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#> SELECT DISTINCT ?an ?lat ?long ?name ?population WHERE { @@ -57,7 +68,7 @@ wgs:lat ?lat; wgs:long ?long } - ORDER BY ?population'; + ORDER BY ?population';*/ try { $connection = new DLLearnerConnection(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |