I'm not sure whether you're after is something that corresponds one-to-one between RDF triples and what the user sees, or something more functional, but if you want to see an example of using Jena as data store for an application, it might be interesting to look at our system ADDIS:
https://addis.drugis.org/

We use an RDF data store to persist clinical trials study data in a structured manner, then retrieve it with SPARQL and render it in angularJS. Code is here:
https://github.com/drugis/addis-core

Resultset to Java:
https://github.com/drugis/addis-core/blob/master/src/main/java/org/drugis/addis/trialverse/service/impl/QueryResultMappingServiceImpl.java

Jena graph to and from usable frontend data objects in JS:
https://github.com/drugis/addis-core/blob/master/src/main/webapp/resources/app/js/outcome/outcomeService.js

Note that the system is somewhat large by now so extracting simple examples isn't easy.

Regards,

Daan Reid
http://drugis.org

On 19-03-18 08:31, David Moss wrote:
That is certainly a way to get data from a SPARQL endpoint to display in a 
terminal window.
It does not store it locally or put it into a user-friendly GUI control however.
Looks like I might have to roll my own and face the music publicly if I'm doing 
it wrong.

I think real-world examples of how to use Jena in a user friendly program are 
essential to advancing the semantic web.
Thanks for considering my question.

DM

On 19/3/18, 4:19 pm, "Laura Morales" <laure...@mail.com> wrote:

     As far as I know the only way to query a Jena remotely is via HTTP. So, install Fuseki and 
then send a traditional HTTP GET/POST request to it with two parameters, "query" and 
"format". For example
$ curl --data "format=json&query=..." http://your-endpoint.org Sent: Sunday, March 18, 2018 at 11:26 PM
     From: "David Moss" <admo...@gmail.com>
     To: users@jena.apache.org
     Subject: Re: Example code
On 18/3/18, 6:24 pm, "Laura Morales" <laure...@mail.com> wrote: >> For example, when using data from a SPARQL endpoint, what is the accepted
     >> way to retrieve it, store it locally and make it available through user
     >> interface controls?
>Make a query that returns a jsonld document. How? Do you have some example code showing how this query is retrieved, dealt with locally and made available to an end user through a GUI control?
     What I am looking for here is a bridge between what experts glean from 
reading Javadoc and what ordinary people need to use Jena within a GUI based 
application.
I see this kind of example as the missing link that prevents anyone other than expert using Jena.
     So long as easy to follow examples of how to get from an rdf triplestore 
to information displayed on a screen in a standard GUI way are missing, Jena 
will remain a plaything for expert enthusiasts.
DM

Reply via email to