/** Parse a string containing SPARQL Update operations, and execute the operations. * @param updateString * @param dataset * @param inputBinding */ public static void parseExecute(String updateString, DatasetGraph dataset, Binding inputBinding) { UpdateRequest req = UpdateFactory.create(updateString) ; execute(req, dataset, inputBinding) ; }
/** Create an UpdateProcessor that sends the update to a remote SPARQL Update service. * @param update Updates * @param remoteEndpoint Endpoint URL * @param context Context * @param client HTTP client * @param httpContext HTTP Context * @return Remote Update processor */ public static UpdateProcessor createRemote(Update update, String remoteEndpoint, Context context, HttpClient client, HttpContext httpContext) { return createRemote(new UpdateRequest(update), remoteEndpoint, context, client) ; }
private void exec(String endpoint, UpdateRequest req) { UpdateProcessor proc = UpdateExecutionFactory.createRemote(req, endpoint) ; proc.execute() ; }
/** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor * @param update * @param datasetGraph * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify) * @return UpdateProcessor or null */ public static UpdateProcessor create(Update update, DatasetGraph datasetGraph, Binding inputBinding) { return create(new UpdateRequest(update), datasetGraph, inputBinding) ; }
private static void execute$(Update update, DatasetGraph datasetGraph, Binding inputBinding) { UpdateRequest request = new UpdateRequest() ; request.add(update) ; execute$(request, datasetGraph, inputBinding) ; }
/** Read a file containing SPARQL Update operations, and execute the operations. * @param filename * @param dataset * @param inputBinding */ public static void readExecute(String filename, Dataset dataset, QuerySolution inputBinding) { UpdateRequest req = UpdateFactory.read(filename) ; execute(req, dataset, inputBinding) ; }
/** Create an UpdateProcessor that sends the update request to a remote SPARQL Update service using an HTML form * @param update Updates * @param remoteEndpoint Endpoint URL * @param context Context * @return Remote Update processor */ public static UpdateProcessor createRemoteForm(Update update, String remoteEndpoint, Context context) { return createRemoteForm(new UpdateRequest(update), remoteEndpoint, context, null) ; }
/** Create an UpdateRequest by parsing from a string. * See also <tt>read</tt> operations for parsing contents of a file. * @param string The update request as a string. * @param baseURI The base URI for resolving relative URIs. * @param syntax The update language syntax */ public static UpdateRequest create(String string, String baseURI, Syntax syntax) { UpdateRequest request = new UpdateRequest() ; make(request, string, baseURI, syntax) ; return request ; }
/** Read a file containing SPARQL Update operations, and execute the operations. * @param filename * @param datasetGraph * @param inputBinding */ public static void readExecute(String filename, DatasetGraph datasetGraph, Binding inputBinding) { UpdateRequest req = UpdateFactory.read(filename) ; execute$(req, datasetGraph, inputBinding) ; }
/** Create an UpdateProcessor that sends the update to a remote SPARQL Update service. * @param update Updates * @param remoteEndpoint Endpoint URL * @param client HTTP client * @return Remote Update processor */ public static UpdateProcessor createRemote(Update update, String remoteEndpoint, HttpClient client, HttpContext httpContext) { return createRemote(new UpdateRequest(update), remoteEndpoint, null, client, httpContext) ; }
/** Create an UpdateProcessor appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor * @param update * @param dataset * @return UpdateProcessor or null */ public static UpdateProcessor create(Update update, Dataset dataset) { return create(new UpdateRequest(update), dataset) ; }
/** Create an UpdateProcessor that sends the update to a remote SPARQL Update service. * @param update Updates * @param remoteEndpoint Endpoint URL * @return Remote Update processor */ public static UpdateProcessor createRemote(Update update, String remoteEndpoint) { return createRemote(new UpdateRequest(update), remoteEndpoint, null, null, null) ; }
/** Create an UpdateProcessor that sends the update to a remote SPARQL Update service. * @param update Updates * @param remoteEndpoint Endpoint URL * @param context Context * @return Remote Update processor */ public static UpdateProcessor createRemote(Update update, String remoteEndpoint, Context context) { return createRemote(new UpdateRequest(update), remoteEndpoint, context, null) ; }