This module provides LDPath support in the Marmotta plaform.
LDPath querying is exposed via a simple RESTful protocol, using JSON for describing the results. Programs can be evaluated using either GET or POST with slightly different methods (check the web services documentation for any further details), where the context uri must be always sent as query parameter.
The results’ schema is very simple:
Let’s use this very simple program as example, one that lists all the friend of a concrete URI. Using cURL the request will lool like:
curl -X POST --data ' @prefix foaf: <http://xmlns.com/foaf/0.1/> friends=foaf:knows/foaf:name ; ' -H 'Content-Type: text/plain' 'http://localhost:8080/marmotta/ldpath/program?uri=http%3A%2F%2Fwww.wikier.org%2Ffoaf%23wikier'
and should return something like:
{ "friends" : [ { "value":"John Breslin", "type":"literal", "lang":"en" }, { "value":"Richard Cyganiak", "type":"literal", "lang":"en" }, { "value":"Chris Bizer", "type":"literal", "lang":"en" }, ... ] }