Hi all,

I'm a newbie here and I've been reading the docs for some time.
I would like to implement a custom behavior for Fuseki and would appreciate 
some hints on how to proceed.
At a high level, I want to assert that a named graph is special and ensure that 
triples inferred within this special named graph are placed in the same named 
graph.

For example:

Graph :g1 {
      :SuperMan a :Superhero
      :ClarkKent owl:sameAs :Superman
}

:g1 a :SpecialGraph

I would like this to be inferred:

Graph :g1 {
...
:ClarkKent a :Superhero
}

This behavior should be independent of the chosen reasoner which will determine 
the triples that must be created.
From what I've read, it seems that reasoners and the rule syntax don't work 
natively with datasets and quads.
This stack overflow 
thread<https://stackoverflow.com/questions/35428064/reasoning-with-fuseki-tdb-and-named-graphs>
 discusses the same problem without a satisfactory solution.
The solution I've considered is a "wrapper" around the reasoning process, which 
would query for all the "special graphs", for each of them create in-memory 
models, populate the models so that the triples are separated appropriately, 
run inference on these models, and then store the inferred triples.
This thread from the mailing 
list<https://lists.apache.org/thread/fx6pdr7r9xlgyxf1y5bwrgofqlqjr0y1> 
<https://lists.apache.org/thread/fx6pdr7r9xlgyxf1y5bwrgofqlqjr0y1> suggests it 
might be a reasonable approach.

Should I be implementing a custom reasoner to do this?
I'm unsure about how to proceed. Implementing a module seems like a good 
approach to keep things compartmentalized, but does the Module API allow this?
I'd like to avoid embedding the server in another app. My preferred result is a 
fuseki server + this functionality.
I would appreciate any advice.

Thank you all,
Andrea






Reply via email to