Search in sources :

Example 1 with UpdateEngineFactory

use of org.apache.jena.sparql.modify.UpdateEngineFactory in project jena by apache.

the class UpdateExecutionFactory method makeStreaming.

// Everything for local updates comes through one of these two make methods
@Deprecated
private static UpdateProcessorStreaming makeStreaming(DatasetGraph datasetGraph, Binding inputBinding, Context context) {
    Prologue prologue = new Prologue();
    Context cxt = Context.setupContextForDataset(context, datasetGraph);
    UpdateEngineFactory f = UpdateEngineRegistry.get().find(datasetGraph, cxt);
    UpdateProcessorStreamingBase uProc = new UpdateProcessorStreamingBase(datasetGraph, inputBinding, prologue, cxt, f);
    return uProc;
}
Also used : Context(org.apache.jena.sparql.util.Context) UpdateEngineFactory(org.apache.jena.sparql.modify.UpdateEngineFactory) Prologue(org.apache.jena.sparql.core.Prologue) UpdateProcessorStreamingBase(org.apache.jena.sparql.modify.UpdateProcessorStreamingBase)

Example 2 with UpdateEngineFactory

use of org.apache.jena.sparql.modify.UpdateEngineFactory in project jena by apache.

the class UpdateExecDatasetBuilder method build.

@Override
public UpdateExec build() {
    Objects.requireNonNull(dataset, "No dataset for update");
    Objects.requireNonNull(updateRequest, "No update request");
    UpdateRequest actualUpdate = updateRequest;
    if (substitutionMap != null && !substitutionMap.isEmpty())
        actualUpdate = UpdateTransformOps.transform(actualUpdate, substitutionMap);
    Context cxt = Context.setupContextForDataset(context, dataset);
    UpdateEngineFactory f = UpdateEngineRegistry.get().find(dataset, cxt);
    if (f == null)
        throw new UpdateException("Failed to find an UpdateEngine");
    UpdateExec uExec = new UpdateExecDataset(actualUpdate, dataset, initialBinding, cxt, f);
    return uExec;
}
Also used : Context(org.apache.jena.sparql.util.Context) UpdateEngineFactory(org.apache.jena.sparql.modify.UpdateEngineFactory) UpdateRequest(org.apache.jena.update.UpdateRequest) UpdateException(org.apache.jena.update.UpdateException)

Aggregations

UpdateEngineFactory (org.apache.jena.sparql.modify.UpdateEngineFactory)2 Context (org.apache.jena.sparql.util.Context)2 Prologue (org.apache.jena.sparql.core.Prologue)1 UpdateProcessorStreamingBase (org.apache.jena.sparql.modify.UpdateProcessorStreamingBase)1 UpdateException (org.apache.jena.update.UpdateException)1 UpdateRequest (org.apache.jena.update.UpdateRequest)1