Skip to content

Example using DBpedia SPARQL Endpoint #11

@kidehen

Description

@kidehen

Wondering anyone could make an example using DBpedia via its SPARQL endpoint?

Here is a SPARQL CONSTRUCT Query example that could be used to create the GraphQL mapping file.

PREFIX : <https://github.com/dbcls/grasp/ns/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX db: <http://purl.jp/bio/03/dbcatalog/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbpedia: <http://dbpedia.org/resource/> 
PREFIX dbp: <http://dbpedia.org/property/> 

CONSTRUCT {
                ?iri :iri ?iri ;
                    rdfs:label ?title ;
                    dbp:author ?author . 
                ?author rdfs:label ?authorName . 
         }

WHERE
{
    ?iri a schema:Book ;
            rdfs:label ?title ;
            dbp:author ?author . 
    FILTER (LANG(?title) = 'en')

    ?author rdfs:label ?authorName . 
    FILTER (LANG(?authorName) = 'en')
}

Live Query Results Page Links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions