use of org.apache.jena.update.UpdateProcessor in project jena by apache.
the class TestServerReadOnly method update_readonly.
@Test()
public void update_readonly() {
FusekiTest.exec404(() -> {
UpdateRequest update = UpdateFactory.create("INSERT DATA {}");
UpdateProcessor proc = UpdateExecutionFactory.createRemote(update, serviceUpdate());
proc.execute();
});
}
use of org.apache.jena.update.UpdateProcessor in project jena by apache.
the class TestDatasets method setup.
@Before
public void setup() {
UpdateRequest up = UpdateFactory.create(TestDatasets.data);
UpdateProcessor processor = UpdateExecutionFactory.create(up, this.dsg);
processor.execute();
}
use of org.apache.jena.update.UpdateProcessor in project jena by apache.
the class AbstractTestUpdateGraph method testDeleteData1.
@Test
public void testDeleteData1() {
DatasetGraph gStore = getEmptyDatasetGraph();
defaultGraphData(gStore, graph1);
QuadDataAcc acc = new QuadDataAcc();
acc.addTriple(triple2);
UpdateDataDelete delete = new UpdateDataDelete(acc);
UpdateProcessor uProc = UpdateExecutionFactory.create(delete, gStore);
uProc.execute();
assertFalse(graphEmpty(gStore.getDefaultGraph()));
assertTrue(graphContains(gStore.getDefaultGraph(), triple1));
assertFalse(graphContains(gStore.getDefaultGraph(), triple2));
}
use of org.apache.jena.update.UpdateProcessor in project jena by apache.
the class AbstractTestUpdateGraph method testDeleteData2.
@Test
public void testDeleteData2() {
DatasetGraph gStore = getEmptyDatasetGraph();
defaultGraphData(gStore, graph1);
QuadDataAcc acc = new QuadDataAcc();
acc.addTriple(triple1);
UpdateDataDelete delete = new UpdateDataDelete(acc);
UpdateProcessor uProc = UpdateExecutionFactory.create(delete, gStore);
uProc.execute();
assertTrue(graphEmpty(gStore.getDefaultGraph()));
assertFalse(graphContains(gStore.getDefaultGraph(), triple1));
}
use of org.apache.jena.update.UpdateProcessor in project jena by apache.
the class AbstractTestUpdateGraph method testInsertData1.
@Test
public void testInsertData1() {
DatasetGraph gStore = getEmptyDatasetGraph();
defaultGraphData(gStore, graph1);
QuadDataAcc acc = new QuadDataAcc();
acc.addTriple(triple2);
UpdateDataInsert insert = new UpdateDataInsert(acc);
UpdateProcessor uProc = UpdateExecutionFactory.create(insert, gStore);
uProc.execute();
assertFalse(graphEmpty(gStore.getDefaultGraph()));
assertTrue(graphContains(gStore.getDefaultGraph(), triple1));
assertTrue(graphContains(gStore.getDefaultGraph(), triple2));
}
Aggregations