On 22/11/12 15:20, Dick Murray wrote:
Hi all.

Looking further I found the UpdateProcessorBase and wrote the following
wrapper;

context = ARQ.getContext().copy();
put(u4EndpointIDSymbol, endpointGetID());
uProc = new UpdateProcessorBase(updateRequest,
GraphStoreFactory.create(graphDataset), context, updateEngineFactory);
execute();

Which is basically what private static UpdateProcessor make(UpdateRequest
updateRequest, GraphStore graphStore, Binding initialBinding, Context
context) does.

I still create my custom UpdateEngineFactory but I don't register it with
UpdateEngineRegistry.get().add(updateEngineFactory);

Anyone see any issues with this?

No - looks OK.

There should a method on UpdateProcess to expose the per-execution context (the copy of the global ARQ.getContext() ,merged with any per graph store (which means the original dataset).

Added in SVN.  It was missing in the interface.

The dataset can also have it's own context - that's copied into the execution one (another fix around the copy of ARQ.getContext)

        Andy


Dick.


On 22 November 2012 14:16, Dick Murray <[email protected]> wrote:

Hi all.

I need the UpdateEngineFactory accept(..) to query a user defined value in
the passed Context or is there a way that I can get a user defined Symbol
into the Context at the point I submit an UpdateAction?

The UpdateEngineFactory accept(..) is triggered via a call to
UpdateAction.execute(..).

Prior to this call I need to put a Symbol into the context for the
accept(..) to retrieve.

But I cannot see how to achieve this.

Looking at the Jena code.

UpdateAction.execute(..) calls

UpdateAction.execute$(..) calls

UpdateExecutionFactory.create(..) calls with Context parameter as null

UpdateExecutionFactory.make(..)

make(..) is private. and according to the Eclipse call hierachy make(..)
is only called by create(..) which means the Context always ends up being a
copy of ARQ.getContext() because the first lines of make(..) code are...

         if ( context == null )
             context = ARQ.getContext().copy();

I've looked at
http://jena.apache.org/documentation/javadoc/arq/com/hp/hpl/jena/sparql/util/class-use/Context.htmlbut
 nothing obvious springs out...

Regards Dick.



Reply via email to