[
https://issues.apache.org/jira/browse/STANBOL-417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166831#comment-13166831
]
Rupert Westenthaler commented on STANBOL-417:
---------------------------------------------
# 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
LDPath Program
@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
%40prefix%20geo%20%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23%3E%3Bname%20%3D%20rdfs%3Alabel%5B%40en%5D%20%3A%3A%20xsd%3Astring%3Btype%20%3D%20rdf%3Atype%20%3A%3A%20xsd%3AanyURI%3Blat%20%3D%20geo%3Alat%20%3A%3A%20xsd%3Adouble%3Blong%20%3D%20geo%3Alat%20%3A%3A%20xsd%3Adouble%3B%0A
The Request
curl -X POST -d "name=Bishofsh*&lang=en&ldpath={url-encoded-ldpath}"
http://localhost:8080/entityhub/site/dbpedia/find
Responses will use the fields defines in the LDPath program as properties.
## FieldQuery requests ("/query")
"ldpath" : "{ldpath-program}" 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.
> Support execution of LDPath programs on Results of Entityhub /find and /query
> requests
> --------------------------------------------------------------------------------------
>
> Key: STANBOL-417
> URL: https://issues.apache.org/jira/browse/STANBOL-417
> Project: Stanbol
> Issue Type: Sub-task
> Components: Entity Hub
> Reporter: Rupert Westenthaler
> Assignee: Rupert Westenthaler
>
> Currently it is only possible to select
> * IDs only
> * specific fields
> * all available information
> of found entities.
> The possibility to execute LDPath programs on Entities selected by /find and
> /query requests will provide much more possibilities.
> The implementation will just use each selected Entity as Context for a LDPath
> program parsed with the request.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira