use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method post_01.
@Test
public void post_01() {
DatasetAccessor du = connectToService();
du.putModel(model1);
// POST appends
du.add(model2);
Model graph = du.getModel();
Model graph3 = ModelFactory.createDefaultModel();
graph3.add(model1);
graph3.add(model2);
assertFalse(graph.isIsomorphicWith(model1));
assertFalse(graph.isIsomorphicWith(model2));
assertTrue(graph.isIsomorphicWith(graph3));
// Empty it.
du.deleteDefault();
graph = du.getModel();
assertTrue(graph.isEmpty());
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method put_03.
@Test
public void put_03() {
DatasetAccessor du = connectToService();
du.putModel(model1);
// PUT overwrites
du.putModel(model2);
Model graph = du.getModel();
assertFalse(graph.isIsomorphicWith(model1));
assertTrue(graph.isIsomorphicWith(model2));
// Empty it.
du.deleteDefault();
graph = du.getModel();
assertTrue(graph.isEmpty());
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method delete_03.
@Test
public void delete_03() {
DatasetAccessor du = connectToDataset();
du.deleteDefault();
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method clearup_1.
@Test
public void clearup_1() {
DatasetAccessor du = connectToService();
du.deleteDefault();
du.deleteModel(gn1);
du.deleteModel(gn2);
du.deleteModel(gn99);
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method post_02.
@Test
public void post_02() {
DatasetAccessor du = connectToService();
du.add(model1);
du.add(model2);
Model graph = du.getModel();
Model graph3 = ModelFactory.createDefaultModel();
graph3.add(model1);
graph3.add(model2);
assertFalse(graph.isIsomorphicWith(model1));
assertFalse(graph.isIsomorphicWith(model2));
assertTrue(graph.isIsomorphicWith(graph3));
// Empty it.
du.deleteDefault();
graph = du.getModel();
assertTrue(graph.isEmpty());
}
Aggregations