Is SPARQL DESCRIBE sufficient? The concept of CBD also includes blank
node closure resolution, but nothing is really part of a standard but
common sense.
So, iterating over all (relevant) resources and getting their CBD or
incoming/outgoing triples via CONSTRUCT query should work. I don't think
I have to say that it takes linear amount of time depending on the size
of your data? And indeed, this can lead to redundant data
So, SPARQL is one way to go.
Indeed you could also fetch outgoing statements via JENA RDF API, i.e.
model.getStatements(s, null, (RDFNode) null) will return all those
statements for a given subject s - those statements can be added to a
new model
Does this already help?
On 19.07.21 13:39, Roland Bailly wrote:
Thank you for your swift answer.
Yes exactly. The idea is to get the sub graph from a given a node.
-----Original Message-----
From: LB <conpcompl...@googlemail.com.INVALID>
Sent: lundi 19 juillet 2021 13:27
To: dev@jena.apache.org
Subject: Re: Retrieve all sub resources from one resource in one model
--- This is an incoming mail from an EXTERNAL DOMAIN. Please verify sender
before you open attachments or access links. ---
what is a "sub-resource" in RDF? Are you talking about CBDs? Like what SPARQL
DESCRIBE returns (to some extend)?
On 19.07.21 13:18, Roland Bailly wrote:
Hello,
Currently I am working with a huge RDF file.
I would like to retrieve all sub resources from one resource and put everything
in one model.
The idea with that is to convert the model to JSON LD FRAMING to create a java
object.
I don't want to convert my huge RDF file in JSON LD, but only the part I need.
With Jena I can already retrieve my root object with model.getResource("id")
but it doesn't contain the sub resources.
Please, do you know how to retrieve the subresources ?
Roland Bailly
Analyst - Programmer
Email:
roland.bai...@arhs-dev-be.com
Mobil:
04 97 28 38 16
Fax:
+32 2 774 88 31
[http://www.arhs-group.com/wp-content/uploads/2017/03/arhs-dev-be.png]
Woluwedal 30
B-1932 Zaventem
www.arhs-dev-be.com<http://www.arhs-dev-be.com/>