So - no one else on the users list wishes to add anything? - 2 of 2 people
seem to think predetermined queries are a necessary function - any thoughts
on whether this might end up as a Marmotta capability (module) , or at a
minimum as a Use Case for Marmotta that should be articulated?

Should I take this to the dev list to see if any of the developer's have
thought about this - or are you all represented here?

Cheers
Rob Atkinson


On Wed, 17 Feb 2016 at 20:41 Rob Atkinson <r...@metalinkage.com.au> wrote:

>
> Actually - thats pretty much what I want - its the ad-hoc part of the LDA
> API I eschewed - I really cant see how a user can form a meaningful ad-hoc
> query (and this applies to SPARQL, SQL, WSDL and OGC spatial Web services)
> without something providing metadata about what the information model is,
> and how its populated.
>
> Parameterised queries (where annotations can be provided for the
> parameters) seems to be a basic requirement and quite simple to build and
> use - hence my probing here to see if its already in Marmotta (but not
> immediately visible) - or in some roadmap or available third-party
> extension.
>
> Rob
>
> On Wed, 17 Feb 2016 at 17:13 Robson, Alan <alan.rob...@viasat.com> wrote:
>
>> I meant to build a query by fetching a query template from LDP and
>> enriching it with arguments from the GET parameters in the web service
>> request. That process would involve just the little application I wrote
>> accessing marmotta’s existing LDP API.
>>
>> What I put together is not a marmotta module and I don’t think it
>> addresses your desire for a general purpose query API (in fact, it
>> deliberately does not support ad-hoc queries, just pre-approved ones)
>>
>>
>>
>> Cheers
>>
>>
>>
>> Alan
>>
>>
>>
>> *From:* Rob Atkinson [mailto:r...@metalinkage.com.au]
>> *Sent:* Tuesday, February 16, 2016 10:04 PM
>>
>>
>> *To:* users@marmotta.apache.org
>> *Subject:* Re: Support for RDF-shapes, Linked data API
>>
>>
>>
>> Do you mean 'to build a query if that functionality was available in a
>> marmotta module'? Or am i missing something :-)
>>
>>
>>
>> On Wed, 17 Feb 2016 4:09 pm Robson, Alan <alan.rob...@viasat.com> wrote:
>>
>> Maybe the linked data caching feature of Marmotta will provide the
>> federation necessary.
>>
>> Or perhaps one could use a single instance of marmotta to build a query
>> and then send the query to a federation of endpoints using fed-x:
>> http://www2.informatik.uni-freiburg.de/~mschmidt/docs/iswc11_fedx.pdf
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www2.informatik.uni-2Dfreiburg.de_-7Emschmidt_docs_iswc11-5Ffedx.pdf&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=R2jBNjzFDI8TFOPKdpk4qyIsnkrpWIAGHVAlc04_fWs&s=_eoMKuRMARivxGSiF3L2jFqO7rI6qOyU20s1Ozl8Pog&e=>
>>
>>
>>
>>
>>
>> Alan
>>
>>
>>
>> *From:* Rob Atkinson [mailto:r...@metalinkage.com.au]
>> *Sent:* Tuesday, February 16, 2016 8:51 PM
>> *To:* users@marmotta.apache.org
>> *Subject:* Re: Support for RDF-shapes, Linked data API
>>
>>
>>
>> Thanks Alan
>>
>>
>>
>> this is indeed the sort of functionality I'm looking for.
>>
>> I have been using a subset of the functionality of the LinkedDataAPI -
>> for which implementations exist (ELDA, Puelia) - against Sesame and
>> Triplify backends.
>>
>>
>>
>> https://code.google.com/archive/p/linked-data-api/wikis/Specification.wiki
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__code.google.com_archive_p_linked-2Ddata-2Dapi_wikis_Specification.wiki&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=YcjMBFlQEV1Twmm2_suPJX4D_RGWXZsWPCg8XTyQFW0&s=GMD14ltrtdU51q-8_cOeSZrcfTssDPt6nSulAGDzX5E&e=>
>>
>>
>>
>> LDA works nicely enough, modulo a few things
>>
>>
>>
>> There are a few issues with this:
>>
>> 1)  it would be nice if the LDA spec was supported by a SDO
>>
>> 2)  implementation was supported by a larger developer community
>>
>> 3) and it didnt mean a whole set of additional dependency wrangling for
>> system requirements, imported components and licences - all of which would
>> be solved if the equivalent functionality was in Marmotta :-)
>>
>> 4) it supported CONSTRUCT queries to transform statements inject default
>> and calculated values into the result.
>>
>> 5) it supported querying over blank nodes (which we find all the time
>> when there is an OWL model as part of the graph - and OWL is really useful
>> for many things)
>>
>> 6) LDA itself could be factored into core and extensions
>>
>>
>>
>> Given Marmotta's modular architecture - a module with this functionality
>> seems a fairly good fit.
>>
>>
>>
>> The main hurdle I see is that Marmotta is keen to bind to a single
>> repository - whereas I specifically want to combine data from triple-stores
>> and existing RDBMS environments. Decoupling APIs against separate SPARQL
>> endpoints works fine for this. IMHO If the Marmotta build configured APIs
>> by default against its configured SPARQL endpoint, but allowed additional
>> APIs to be configured against alternative SPARQL endpoints then all would
>> be bliss.
>>
>>
>>
>> Rob
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Wed, 17 Feb 2016 at 13:33 Robson, Alan <alan.rob...@viasat.com> wrote:
>>
>> This may be way off base…
>>
>>
>>
>> I wrote a small java EE application that accepts a get request with
>> parameters, it then searches for an RDF record in LDP that matches the name
>> of the query, validates the parameters according to the instructions it
>> finds in the RDF, formulates a SPARQL query then returns the results/errors.
>>
>>
>>
>> Here’s an example record representing an allowable query – I just made up
>> the vocabulary…
>>
>>
>>
>> *@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.w3.org_2000_01_rdf-2Dschema-23&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=YcjMBFlQEV1Twmm2_suPJX4D_RGWXZsWPCg8XTyQFW0&s=PCyJ1Crd5ubX_3ZtYBPfC50412u_Qxn3e5VRbx6im9Y&e=>>
>> .*
>>
>> *@prefix foaf: <http://xmlns.com/foaf/0.1/
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__xmlns.com_foaf_0.1_&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=YcjMBFlQEV1Twmm2_suPJX4D_RGWXZsWPCg8XTyQFW0&s=kUU78ZVQ1QGo56Zx8Sp60brKF7U58hCnnxlaGMGbP9Q&e=>>
>> .*
>>
>> *@prefix dlq: <http://unfortunate.name/2015/query#
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__unfortunate.name_2015_query-23&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=YcjMBFlQEV1Twmm2_suPJX4D_RGWXZsWPCg8XTyQFW0&s=FSy2Ot3Aks_NIVKd3OGX308BMB2XQuqArOiA1pv9RfU&e=>>
>> .*
>>
>>
>>
>> *<> a dlq:sparqlQuery;*
>>
>> *    rdfs:label "Returns a list of names of individuals who have attained
>> the age of majority and hence are considered to be adults.";*
>>
>> *    dlq:param [ dlq:paramName "majority"; dlq:dataType dlq:unsignedInt;
>> dlq:maxValue "150"; dlq:defaultValue "18"; rdfs:label "age of majority" ];*
>>
>> *    dlq:sparql "PREFIX foaf: <http://xmlns.com/foaf/0.1/
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__xmlns.com_foaf_0.1_&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=YcjMBFlQEV1Twmm2_suPJX4D_RGWXZsWPCg8XTyQFW0&s=kUU78ZVQ1QGo56Zx8Sp60brKF7U58hCnnxlaGMGbP9Q&e=>>
>> SELECT ?name  WHERE {?i a foaf:Person . ?i foaf:name ?name . ?i foaf:age
>> ?age . FILTER (?age >= majority)}"; .*
>>
>>
>>
>> I post the above ttl file to marmotta so that it can be found via LDP at:
>>
>>
>> * http://ldp:8080/marmotta/ldp/QUERIES/findAdults
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__ldp-3A8080_marmotta_ldp_QUERIES_findAdults&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=R2jBNjzFDI8TFOPKdpk4qyIsnkrpWIAGHVAlc04_fWs&s=jr00Vl2x2DHWDYKUBdlNXM02wQ62ZoSTXx555YomGwQ&e=>*
>>
>>
>>
>> My SPARQL proxy sits on tomcat alongside marmotta and when it gets a
>> query like:
>>
>>
>>
>> http://ldp:8080/proxy/Services/findAdults?majority=21
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__ldp-3A8080_proxy_Services_findAdults-3Fmajority-3D21&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=YcjMBFlQEV1Twmm2_suPJX4D_RGWXZsWPCg8XTyQFW0&s=RnFLwo-2Gev42YD9-eJzs98OeUealDGZG2cH0uw5400&e=>
>>
>>
>>
>> It looks up the above record in LDP by appending findAdults to the path,
>> then it validates the “majority” parameter and builds a SPARQL query,
>> substituting in the parameter where it is named then executes it and
>> returns the result (or of course an error message if anything is out of
>> kilter)
>>
>>
>>
>> I also went ahead and added a few dummy records with people of various
>> ages so that the SPARQL query had something to work with.
>>
>>
>>
>> Right now it only supports simple validations like integer ranges, but it
>> could be extended to other types.
>>
>>
>>
>> I built it because while don’t mind users having SPARQL access in my dev
>> environment, I want only canned queries in my production environment
>> because I have seen how unfettered queries can bog down other databases. I
>> was not so worried about security as performance.
>>
>>
>>
>> The only interfaces between marmotta and the query proxy are marmotta’s
>> standard REST APIs, so the proxy need not be hosted on the same machine as
>> marmotta.
>>
>>
>>
>> Is this along the lines of what you wanted ?
>>
>>
>>
>> Alan
>>
>> *From:* Rob Atkinson [mailto:r...@metalinkage.com.au]
>> *Sent:* Monday, February 15, 2016 4:55 AM
>> *To:* users@marmotta.apache.org
>> *Subject:* Support for RDF-shapes, Linked data API
>>
>>
>>
>> Hi
>>
>>
>>
>> I am looking at linked data applications to add value to data exposed via
>> Web Services, to add the missing semantics about the exposed content needed
>> to actually discover and use those services.
>>
>> i need to be able to traverse graphs composed of things like VoiD,
>> RDF-Datacube etc.
>>
>> The RDF-shapes scope covers this, and there are some elements of Marmotta
>> such as LDPath that are relevant. I've previously built the functionality I
>> needed using the LinkedDataAPI (
>> https://github.com/UKGovLD/linked-data-api
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_UKGovLD_linked-2Ddata-2Dapi&d=BQMFaQ&c=jcv3orpCsv7C4ly8-ubDob57ycZ4jvhoYZNDBA06fPk&r=xN9AnMDZvO_QvUZQZcoply6WFqSJuNcpv-dDu2fA4Ac&m=sJnASXMUIR0ucnEHlcG3kM1GZ5TFHlhGyAhkYT45qfY&s=StoV4m3FfnN5m7Y1JgL1aSFxde0mEhsWqxXB6i_H-FA&e=>
>> ).
>>
>> Is there anything in Marmotta to support parameterised SPARQL queries
>> accessed via URL based APIs, and building a response by traversing paths
>> from the query results?  (i've looked but not found anything - any pointers
>> to descriptions of the marnotta core would be helpful!)
>>
>>
>>
>> Regards
>>
>> Rob Atkinson
>>
>>

Reply via email to