Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Listing statements with multiple selectors using models

$
0
0
Hi,

I'm new to Jena, and I've been able to get around the platform looking at
the documentation fairly nicely, but I couldn't find a solution to the
following:

I would be able to make a query like:

SELECT ?subfunction WHERE {
?subject x:function x:knownFunction .
?subject x:subfunction ?subfunction

Here, a subject holds a "function" and a "subfunction". In this query, I'd
select all subjects with a determined function and within those subjects
list their subfunctions, therefore being able to list all subfunctions for
determined function, something that wouldn't be able to be queried directly.

Using Jena models, I'd be able to perform .listStatements() to find all
subjects that have determined function, but I wouldn't be able to find the
subfunctions among them. Is there a way of doing it with the Model API, or
would I really have to perform a query or iterate through found statements
and find, for each item, a subfunction?

Thank you,
Daniel.

Viewing all articles
Browse latest Browse all 5648

Trending Articles