use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method put_02.
@Test
public void put_02() {
DatasetAccessor du = connectToService();
du.putModel(gn1, model1);
boolean exists = du.containsModel(gn1);
assertTrue(exists);
exists = du.containsModel(gn2);
assertFalse("Expected gn2 not to exist", exists);
Model graph = du.getModel();
assertTrue(graph.isEmpty());
graph = du.getModel(gn1);
assertTrue(graph.isIsomorphicWith(model1));
du.deleteModel(gn1);
exists = du.containsModel(gn1);
assertFalse("Expected gn1 not to exist", exists);
graph = du.getModel(gn1);
assertNull(graph);
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method get_04.
@Test
public void get_04() {
DatasetAccessor du = connectToDataset();
Model graph = du.getModel(gn1);
assertNull(graph);
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method head_01.
@Test
public void head_01() {
DatasetAccessor du = connectToService();
boolean b = du.containsModel(gn1);
assertFalse("Blank remote dataset as a named graph", b);
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method test_404_3.
@Test
public void test_404_3() {
// Right service, wrong graph
DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceGSP());
Model graph = du.getModel(gn99);
assertNull(graph);
}
use of org.apache.jena.query.DatasetAccessor in project jena by apache.
the class TestDatasetAccessorHTTP method test_404_2.
@Test
public void test_404_2() {
DatasetAccessor du = DatasetAccessorFactory.createHTTP(datasetURI_not_2);
Model graph = du.getModel(gn99);
assertNull(graph);
}
Aggregations