"I knew all these paths once; now they are as twisted as my own ambitions." — The narrator in the Darkest Dungeon
A web service that generates examples of RDF paths retrieved via a SPARQL endpoint.
Send an RDF path serialized in JSON-LD in the body of a POST request. Use the Content-Type header to indicate the MIME type of the POST's body (i.e., application/ld+json). Provide the Accept header to specify the preferred MIME type of the response. Currently, only JSON-LD (i.e. application/ld+json) is supported.
Configuration is sent using the query string parameters. The parameters must be URL-encoded. Supported parameters are:
sparql-endpoint: URL of the SPARQL endpoint to query. This is a mandatory parameter.graph-iri: IRI of the named graph to query. If no value is provided, the default graph is queried.selection-method: ID of the chosen method for selecting examples. Supported values arerandomfor random selection,distinctfor distinct selection, andrepresentativefor representative selection. This is a mandatory parameter.limit: Positive integer indicating the maximum number of examples requested in the response. The response may contain fewer examples (even none), if data in the queried SPARQL endpoint cannot satisfy the RDF path in the request's body. If no value is provided, the default value 5 is used.sampling-factor: Positive integer that is used as the multiplier oflimitwhen a selection method that uses sampling is chosen. If no value is provided, the default value 20 is used.
The application can be compiled to a WAR-file that can be deployed to a web app container, such as Tomcat or Jetty. You will need Git to clone this repository and Leiningen to compile it.
git clone https://github.com/jindrichmynarz/rdf-path-examples.git
cd rdf-path-examples
lein ring uberwar
cp target/rdf-path-examples.war /path/to/container/webappsImmediately, or after restart of the web app container, the application will be available in the rdf-path-examples context (e.g., http://localhost:8080/rdf-path-examples). The application exposes a single endpoint on the path /generate-examples (e.g., http://localhost:8080/rdf-path-examples/generate-examples).
The development of this application was supported by the VŠE IGA project F4/28/2016.
Copyright © 2016 Jindřich Mynarz
Distributed under the Eclipse Public License version 1.0.