Skip to content

Instantly share code, notes, and snippets.

@tommorris
Created June 19, 2010 23:51

Revisions

  1. tommorris created this gist Jun 19, 2010.
    21 changes: 21 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>

    SELECT ?name, ?depiction, ?thumbnail, ?influences, ?abstract

    WHERE {
    <http://dbpedia.org/resource/Isaac_Newton> rdfs:label ?name;
    foaf:depiction ?depiction ;
    <http://dbpedia.org/ontology/thumbnail> ?thumbnail;
    <http://dbpedia.org/ontology/abstract> ?abstract.

    FILTER langMatches( lang(?name), "EN" ) .
    FILTER langMatches( lang(?abstract), "EN" ) .
    }




    # as a URL...

    http://dbpedia.org/sparql?query=PREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0APREFIX%20foaf%3A%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0A%0ASELECT%20%3Fname%2C%20%3Fdepiction%2C%20%3Fthumbnail%2C%20%3Finfluences%2C%20%3Fabstract%0A%0AWHERE%20%7B%0A%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FIsaac_Newton%3E%20rdfs%3Alabel%20%3Fname%3B%0A%20%20%20%20foaf%3Adepiction%20%3Fdepiction%20%3B%0A%20%20%20%20%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2Fthumbnail%3E%20%3Fthumbnail%3B%0A%20%20%20%20%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2Fabstract%3E%20%3Fabstract.%0A%0AFILTER%20langMatches%28%20lang%28%3Fname%29%2C%20%22EN%22%20%29%20.%0AFILTER%20langMatches%28%20lang%28%3Fabstract%29%2C%20%22EN%22%20%29%20.%0A%7D&format=json