- Parsing LDPath programs
- /find Requests
This will get a new optional parameter "ldpath". If present the value is considered as LDPath program to be executed on results.
- Example: Find Entities with an English label starting with "Bischofsh" and selecting the english label, as well as the types and location
@prefix geo : <http://www.w3.org/2003/01/geo/wgs84_pos#> ;
name = rdfs:label[@en] :: xsd:string;
type = rdf:type :: xsd:anyURI;
lat = geo:lat :: xsd:double;
long = geo:lat :: xsd:double;
the same LDPath URLEncoded
curl -X POST -d "name=Bishofsh*&lang=en&ldpath=
Responses will use the fields defines in the LDPath program as properties.
- FieldQuery requests ("/query")
"ldpath" : "
" can be used instead/in addition to the "selected" : ["field1","fieldn"] as currently used.
Results will include selected fields as well as fields defined by LDPath. If the same field is defined by "selected" AND the parsed LDPath program a response with the status BAD_REQUEST MUST BE returned.
As soon as LDPath supports URIs as fields (see https://code.google.com/p/ldpath/issues/detail?id=5) and FIELDNAMES and FIELDTYPES are optional (see https://code.google.com/p/ldpath/issues/detail?id=2) the currently used "selected" property will be deprecated.