@josd showed me the following code to translate n4 code (NQuads with prefixes and relative URLs to translate it to n3.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix graph: <http://www.w3.org/2000/10/swap/graph#>.
@prefix : <urn:example:>.
:a :b :c :g1.
:d :e :f :g1.
:g :h :i :g1.
:j :k :l :g2.
:e :f :g .
{
?S ?P ?O ?G.
({?A ?B ?C} {?A ?B ?C ?G} ?L) log:collectAllIn ?SCOPE.
?GT graph:list ?L.
} => {
?G :graphTerm ?GT.
}.
to run with
> eye --quiet --nope collect.n3 --pass-only-new
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix graph: <http://www.w3.org/2000/10/swap/graph#>.
@prefix : <urn:example:>.
<urn:example:g1> <urn:example:graphTerm> {
<urn:example:a> <urn:example:b> <urn:example:c>.
<urn:example:d> <urn:example:e> <urn:example:f>.
<urn:example:g> <urn:example:h> <urn:example:i>.
}.
<urn:example:g2> <urn:example:graphTerm> {
<urn:example:j> <urn:example:k> <urn:example:l>.
}.
So I looked for the documentation of the various pieces and found
Notation3 Builtin Functions but could not find graph and the namespace for graph returns a 404.
- The builtins should be linked to from the front page of this repo I think - quite useful
- should
graph be part of the builtins? It is used twice in the repo (though mentioned quite a few more times)
find . -name "*.n3" -exec grep -q "graph:\w" {} \; -print
./tests/dogfood/run_reason_tests.n3
./tests/dogfood/run_parser_tests.n3
- the
string:matches will be very useful for many access control use cases. I wonder how much the "perl/python" regex syntax matches or differs from the java/js style? or if libs are easily available for these... @philarcher was the specialist of this, having developed POWDER spec. He pointed me to some relevant documents yesterday... Mostly, they will have some good feedback on how compatible regexes are. I hope it is not too complicated...
I was wondering how I could get the above n3 to also publish a copy of the triples in the graph (not just the transformed quads)... So I can translate jsonld to n3 more easily from issue 204
@josd showed me the following code to translate n4 code (NQuads with prefixes and relative URLs to translate it to n3.
to run with
So I looked for the documentation of the various pieces and found
Notation3 Builtin Functions but could not find
graphand the namespace forgraphreturns a 404.graphbe part of the builtins? It is used twice in the repo (though mentioned quite a few more times)string:matcheswill be very useful for many access control use cases. I wonder how much the "perl/python" regex syntax matches or differs from the java/js style? or if libs are easily available for these... @philarcher was the specialist of this, having developed POWDER spec. He pointed me to some relevant documents yesterday... Mostly, they will have some good feedback on how compatible regexes are. I hope it is not too complicated...I was wondering how I could get the above n3 to also publish a copy of the triples in the graph (not just the transformed quads)... So I can translate jsonld to n3 more easily from issue 204