Search in sources :

Example 1 with UpdateExecBuilder

use of org.apache.jena.sparql.exec.UpdateExecBuilder in project jena by apache.

the class AbstractTestRDFLink 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 (RDFLink link = link()) {
        UpdateExecBuilder updateBuilder = link.newUpdate();
        UpdateExec uExec = updateBuilder.update(update).build();
        Txn.executeWrite(link, () -> uExec.execute());
    }
}
Also used : UpdateRequest(org.apache.jena.update.UpdateRequest) UpdateExecBuilder(org.apache.jena.sparql.exec.UpdateExecBuilder) UpdateExec(org.apache.jena.sparql.exec.UpdateExec) Test(org.junit.Test)

Aggregations

UpdateExec (org.apache.jena.sparql.exec.UpdateExec)1 UpdateExecBuilder (org.apache.jena.sparql.exec.UpdateExecBuilder)1 UpdateRequest (org.apache.jena.update.UpdateRequest)1 Test (org.junit.Test)1