/** 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 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 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) ; }
/** 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 appropriate to the datasetGraph, or null if no available factory to make an UpdateProcessor * @param update * @param datasetGraph * @return UpdateProcessor or null */ public static UpdateProcessor create(Update update, DatasetGraph datasetGraph) { return create(new UpdateRequest(update), datasetGraph) ; }
/** 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) ; }
/** 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 * @param client HTTP client * @return Remote Update processor */ public static UpdateProcessor createRemoteForm(Update update, String remoteEndpoint, Context context, HttpClient client) { return createRemoteForm(new UpdateRequest(update), remoteEndpoint, null, client) ; }
/** 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 * @param client HTTP client * @param httpContext HTTP Context * @return Remote Update processor */ public static UpdateProcessor createRemoteForm(Update update, String remoteEndpoint, Context context, HttpClient client, HttpContext httpContext) { return createRemoteForm(new UpdateRequest(update), remoteEndpoint, null, client, httpContext) ; } /** Create an UpdateProcessor that sends the update request to a remote SPARQL Update service using an HTML form
/** Execute a SPARQL Update. * * @param update */ @Override public default void update(Update update) { update(new UpdateRequest(update)); }
/** 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) ; }
/** 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 ; }
/** 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 UpdateRequest by parsing from an InputStream. * See also <tt>read</tt> operations for parsing contents of a file. * @param usingList The list of externally defined USING statements * @param input The source of the update request (must be UTF-8). * @param baseURI The base URI for resolving relative URIs. * @param syntax The update language syntax */ public static UpdateRequest read(UsingList usingList, InputStream input, String baseURI, Syntax syntax) { UpdateRequest request = new UpdateRequest() ; make(request, usingList, input, baseURI, syntax) ; return request ; }
/** Execute a SPARQL Update. * * @param update */ @Override public default void update(Update update) { update(new UpdateRequest(update)); }
private static void execute$(Update update, DatasetGraph datasetGraph, Binding inputBinding) { UpdateRequest request = new UpdateRequest() ; request.add(update) ; execute$(request, datasetGraph, inputBinding) ; }
/** * Build as an UpdateRequest with prefix mapping set. * * @return a new UpdateRequest */ public UpdateRequest buildRequest() { UpdateRequest req = new UpdateRequest(build()); req.setPrefixMapping(prefixHandler.getPrefixes()); return req; }
/** * Build as an UpdateRequest with prefix mapping set. * * @return a new UpdateRequest */ public UpdateRequest buildRequest() { UpdateRequest req = new UpdateRequest(build()); req.setPrefixMapping(prefixHandler.getPrefixes()); return req; }
public static UpdateRequest transform(UpdateRequest update, ElementTransform transform, ExprTransform exprTransform) { UpdateRequest req = new UpdateRequest() ; req.getPrefixMapping().setNsPrefixes(update.getPrefixMapping()) ; for (Update up : update.getOperations()) { up = transform(up, transform, exprTransform) ; req.add(up) ; } return req ; }
@Test public void update_03() { UpdateRequest update = new UpdateRequest(); update.add("INSERT DATA { <urn:x:s> <urn:x:p> <urn:x:o>}"); try ( RDFConnection conn = connection() ) { conn.update(update); } }
@Test public void update_04() { UpdateRequest update = new UpdateRequest(); update.add("INSERT DATA { <urn:x:s> <urn:x:p> <urn:x:o>}"); try ( RDFConnection conn = connection() ) { Txn.executeWrite(conn, ()->conn.update(update)); } } // Not all Transactional support abort.