On 01/03/2023 13:16, Ghinwa FAKIH wrote:
Hello,
I was trying to load a toy example on named graphs approach in Jena and
test it using some queries.
While doing this, the syntax below didn't work for me:
|ex:G rdfg:isGraph { ex:B ex:prop2 ex:C } |
That's N3 syntax for a graph as an element inside a data graph (N3 calls
this a "formula")
This is not part of RDF 1.1.
A named graph - which is a pair of (name, graph) looks like;
GRAPH ex:G {
ex:B ex:prop2 ex:C
}
in TriG syntax. (Lang.TRIG)
But instead this syntax using GraphLiteral works.
ex:G rdfg:isGraph "ex:B ex:prop2 ex:C"^^rdfl:GraphLiteral
That is a literal with a datatype.
Why the curly brackets are not supported? Is there a particular
configuration or something I do to be used in Jena for named graphs.
There is a N3 parser for Jena
This is not part of the Jena project nor in the Jena distribution.
https://github.com/william-vw/jen3
(The Jena codebase just has the hooks needed for this to integrate)
Thank you
Andy