Skip to content

GitLotus Web service handling SPARQL queries on RDF-converted Git repositories

License

Notifications You must be signed in to change notification settings

git2RDFLab/sparql-query-prototype

Repository files navigation

GitLotus

GitLotus component -- Web service handling SPARQL queries on RDF-converted Git repositories

The component is available as a Docker image superdose/git2rdf-query-service. See the repository project-deployment-compose for a prepared Docker container starting and configuration script.

Build and execution environment

The Spring Boot service can be created using Apache Maven.

git clone git@github.com:git2RDFLab/sparql-query-prototype.git
cd sparql-query-prototype
mvn package

See the folder target for the executable JAR file.

Dependency notice: To remove duplicate database JPA definitions, a shared database commons project was introduced. See database-shared-common for installing this GitLotus-specific dependency.

Environment Variables

Environment Variables Description
SPRING_DATASOURCE_URL The fully qualified URL to the database. Expects the database connection string as of the defined schema by the used database. This project expects per default a PostgreSQL database. A default value is given for local deployments.
SPRING_DATASOURCE_PASSWORD The password of the database. A default value is given for local deployments.

Spring Initializr Template

Example requests

CURL example to perform a SPARQL query and to get JSON result

curl -XPOST -H "Content-type: application/sparql-query" -d $'PREFIX git: <git://>\n\nSELECT ?commit WHERE { ?commit git:AuthorName "emmanuel" . }' localhost:7080/query-service/api/v1/github/rdf/query/{id} -o "query-result.json"

SPARQL query execution alternatives

SPARQL queries can also be performed by using https://yasgui.triply.cc/.

Contribute

We are happy to receive your contributions. Please create a pull request or an issue. As this tool is published under the MIT license, feel free to fork it and use it in your own projects.

Disclaimer

This tool just temporarily stores the image data. It is provided "as is" and without any warranty, express or implied.

About

GitLotus Web service handling SPARQL queries on RDF-converted Git repositories

Topics

Resources

License

Stars

Watchers

Forks

Languages