Search in sources :

Example 1 with UpdateExecutionBuilder

use of org.apache.jena.update.UpdateExecutionBuilder in project jena by apache.

the class AbstractTestRDFConnection method update_05.

@Test
public void update_05() {
    UpdateRequest update = new UpdateRequest();
    update.add("INSERT DATA { <urn:ex:s> <urn:ex:p> <urn:ex:o>}");
    try (RDFConnection conn = connection()) {
        UpdateExecutionBuilder updateBuilder = conn.newUpdate();
        UpdateExecution uExec = updateBuilder.update(update).build();
        Txn.executeWrite(conn, () -> uExec.execute());
    }
}
Also used : UpdateRequest(org.apache.jena.update.UpdateRequest) UpdateExecutionBuilder(org.apache.jena.update.UpdateExecutionBuilder) UpdateExecution(org.apache.jena.update.UpdateExecution) Test(org.junit.Test)

Aggregations

UpdateExecution (org.apache.jena.update.UpdateExecution)1 UpdateExecutionBuilder (org.apache.jena.update.UpdateExecutionBuilder)1 UpdateRequest (org.apache.jena.update.UpdateRequest)1 Test (org.junit.Test)1