New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a convenient way to copy arq-context including registries. #1374
Comments
Hi @sszuev , A copy of the context will share the original registries - the way to modify that is to modify the copy of the context. I'd put that code in the PropertyFunctionRegistry, not "teach" context about a specific setting - moie discussion for the PR - the copy operations look useful. The best control over a query setup is via the new (4.3.x) builders which allow a change of context:
Unrelated: there is a problem with some system provided property functions. There is a hardwired translation in the code.
doesn't work - |
There is also a problem (or feature) with the This one is also a reason (although weak) to have obvious way to create ready to use |
Where does
|
Yes.
Ok, I see. But replacing Just found this, didn't dig yet.
Ok. |
Visual inspection only but this looks odd. The PR new |
I think, @afs ? |
Seems reasonable. |
What is appropriate place to such functionality ? In the PR, this is static helper, instance of Maybe, in the case of |
ContextUtils makes sense. If it were each registry, I'd put the code there but to have a function that all three at once is better. |
GH-1374: add copyWithRegisties Context helper method
Closed by #1375. |
…xecutionFactory#create(Query, Graph, Context) helpers
…xecutionFactory#create(Query, Graph, Context) helpers
Version
4.6.0
Suggestion
If we want to execute a query in isolated context with unique set of independent functions and p-functions,
we will encounter some difficulties:
org.apache.jena.sparql.util.Context#copy
performs only shallow copying, not deeporg.apache.jena.query.QueryExecution
So we have to spend some time to find the proper way.
I think this can be simplified by adding two new helper-methods:
Context#copyWithFunctionRegistries(Context)
- the method to create a copy ofContext
with copied function and p-function registriesQueryExecutionFactory#create(Query, Graph, Context)
- the method to createQueryExceution
for aGraph
with the given contextAre you interested in contributing a solution yourself?
Yes
The text was updated successfully, but these errors were encountered: