Stanbol
  1. Stanbol
  2. STANBOL-408 Add LDPath support to the Entityhub
  3. STANBOL-417

Support execution of LDPath programs on Results of Entityhub /find and /query requests

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0-incubating
    • Component/s: Entityhub
    • Labels:
      None

      Description

      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.

        Activity

        Hide
        Rupert Westenthaler added a comment -
        1. Parsing LDPath programs
          1. /find Requests

        This will get a new optional parameter "ldpath". If present the value is considered as LDPath program to be executed on results.

            1. 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.

          1. 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.

        Show
        Rupert Westenthaler added a comment - 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.
        Hide
        Rupert Westenthaler added a comment -

        Implemented with revision #1214701

        Show
        Rupert Westenthaler added a comment - Implemented with revision #1214701

          People

          • Assignee:
            Rupert Westenthaler
            Reporter:
            Rupert Westenthaler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development