Skip to content

A docker-compose file to startup an Ontotext GraphDB triplestore instance with the Pokémon KG.

License

Notifications You must be signed in to change notification settings

pokemon-kg/ontotext-graphdb-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pokémon KG - GraphDB instance

This repository offers a docker-compose file, which provides a running GraphDB instance with the Pokémon KG loaded. Hence, an up-to-date version of Docker is required (or any other equivalent container engine). The khaller/graphdb-free container image is used. The documentation of this image can be found here.

Running GraphDB

Starting the GraphDB instance is as easy as running the following command.

$ docker-compose up

The GraphDB instance can now be found at http://localhost:7270.

Sample queries

Search for Snorlax using FTS index

PREFIX con: <http://www.ontotext.com/connectors/lucene#>
PREFIX con-inst: <http://www.ontotext.com/connectors/lucene/instance#>
PREFIX poke: <https://pokemonkg.org/ontology#>

SELECT ?entity ?p ?o {
    ?entity a poke:Species ;
            ?p ?o .
    [] a con-inst:esm ;
       con:query "Snorlax" ;
       con:entities ?entity .
}
ORDER BY ASC (?entity)

List all Pokémons ordered by Nationl Dex number

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX poke: <https://pokemonkg.org/ontology#>

SELECT ?pokemon ?label {
    <https://pokemonkg.org/instance/pokedex/national> poke:hasPokédexEntry ?entry .
    ?entry poke:describesPokémon ?pokemon ;
    	poke:entryNumber ?nr .
    ?pokemon a poke:Species ;
		rdfs:label ?label .
    FILTER(lang(?label) = "en") .
}
ORDER BY ASC (?nr)

Contact

About

A docker-compose file to startup an Ontotext GraphDB triplestore instance with the Pokémon KG.

Resources

License

Stars

Watchers

Forks