use of org.apache.jena.rdfconnection.RDFConnection in project jena by apache.
the class AbstractTestRDFConnection method graph_put_1.
@Test
public void graph_put_1() {
try (RDFConnection conn = connection()) {
conn.put(model1);
Dataset ds1 = conn.fetchDataset();
Model m0 = conn.fetch();
assertTrue("Models not isomorphic", isomorphic(model1, ds1.getDefaultModel()));
Model m = conn.fetch();
assertTrue("Models not isomorphic", isomorphic(model1, m));
}
}
use of org.apache.jena.rdfconnection.RDFConnection in project jena by apache.
the class AbstractTestRDFConnection method graph_post_2.
@Test
public void graph_post_2() {
try (RDFConnection conn = connection()) {
conn.load(model1);
conn.load(model2);
Model m = conn.fetch();
Model m0 = ModelFactory.createUnion(model2, model1);
assertTrue("Models are not isomorphic", isomorphic(m0, m));
}
}
use of org.apache.jena.rdfconnection.RDFConnection in project jena by apache.
the class AbstractTestRDFConnection method named_graph_put_2.
@Test
public void named_graph_put_2() {
try (RDFConnection conn = connection()) {
conn.put(graphName, model1);
conn.put(graphName, model2);
Model m = conn.fetch(graphName);
assertTrue("Models not isomorphic", isomorphic(m, model2));
assertFalse("Models not isomorphic", isomorphic(m, model1));
}
}
use of org.apache.jena.rdfconnection.RDFConnection in project jena by apache.
the class AbstractTestRDFConnection method dataset_post_2.
@Test
public void dataset_post_2() {
try (RDFConnection conn = connection()) {
conn.loadDataset(dataset);
conn.loadDataset(dataset2);
Dataset ds1 = conn.fetchDataset();
long x = Iter.count(ds1.listNames());
assertEquals("NG count", 3, x);
assertFalse("Datasets are isomorphic", isomorphic(dataset, ds1));
assertFalse("Datasets are isomorphic", isomorphic(dataset2, ds1));
}
}
use of org.apache.jena.rdfconnection.RDFConnection in project jena by apache.
the class AbstractTestRDFConnection method graph_put_2.
@Test
public void graph_put_2() {
try (RDFConnection conn = connection()) {
conn.put(model1);
conn.put(model2);
Model m = conn.fetch();
assertTrue("Models not isomorphic", isomorphic(m, model2));
assertFalse("Models not isomorphic", isomorphic(m, model1));
}
}
Aggregations