Path: / {BASE} / ldpath / program

Evaluate a LDPath program using the program string passed as argument and starting at the resource identified by the uri. Returns a map from field names to lists of RDF nodes using the same syntax as RDF/JSON, i.e.
  • { "type": "uri", "value": "..." } for resources
  • { "type": "literal", "value": "...", "language": "...", "datatype": "..."} for literals (datatype and language optional)


Resource Methods
Method Summary
NameDescription
GET /{BASE}/ldpath/program?program=…&uri=…Evaluate a LDPath program using the program string passed as argument and starting at the resource identified by the uri.
POST /{BASE}/ldpath/program?uri=…Evaluate a LDPath program using the program string passed as argument and starting at the resource identified by the uri.

Method Detail

GET /{BASE}/ldpath/program

Evaluate a LDPath program using the program string passed as argument and starting at the resource identified by the uri. Returns a map from field names to lists of RDF nodes using the same syntax as RDF/JSON, i.e.

  • { "type": "uri", "value": "..." } for resources
  • { "type": "literal", "value": "...", "language": "...", "datatype": "..."} for literals (datatype and language optional)

HTTP Example:
GET /{BASE}/ldpath/program?program=…&uri=…
API Example:

LDPathWebService.evaluateProgramQuery({'program': /* program the program to evaluate */,
  'uri': /* resourceUri the URI of the resource where to start */});

Output:
Response - a map from field names to lists of rdf nodes in rdf/json format
Query parameters:
program - the program to evaluate
uri - the URI of the resource where to start
Produces:
application/json
HTTP return codes:
404 - in case the resource with the given URI does not exist
400 - in case the path could not be parsed or the resource is not a valid URI
200 - in case the query was evaluated successfully

POST /{BASE}/ldpath/program

Evaluate a LDPath program using the program string passed as argument and starting at the resource identified by the uri. Returns a map from field names to lists of RDF nodes using the same syntax as RDF/JSON, i.e.

  • { "type": "uri", "value": "..." } for resources
  • { "type": "literal", "value": "...", "language": "...", "datatype": "..."} for literals (datatype and language optional)

HTTP Example:
POST /{BASE}/ldpath/program?uri=…
API Example:

LDPathWebService.evaluateProgramQuery({'uri': /* resourceUri the URI of the resource where to start */,
  '$entity': /* body the program to evaluate */});

Input:
InputStream - the program to evaluate
Output:
Response - a map from field names to lists of rdf nodes in rdf/json format
Query parameters:
uri - the URI of the resource where to start
Produces:
application/json
HTTP return codes:
404 - in case the resource with the given URI does not exist
400 - in case the path could not be parsed or the resource is not a valid URI
200 - in case the query was evaluated successfully