@Test public void dynamicAndUnion1() { try { TDB.getContext().setTrue(TDB.symUnionDefaultGraph) ; testCount("SELECT * "+ "FROM NAMED <graph:3> FROM NAMED <graph:4> "+ "{ GRAPH ?g { ?s <uri:q> ?o }}", 2, dataset) ; TDB.getContext().unset(TDB.symUnionDefaultGraph) ; } finally { TDB.getContext().unset(TDB.symUnionDefaultGraph) ; } }
@Test public void dynamicAndUnion6() { try { TDB.getContext().setTrue(TDB.symUnionDefaultGraph) ; testCount("SELECT * "+ "FROM <graph:1>"+ "FROM NAMED <graph:3> FROM NAMED <graph:4> "+ "{ GRAPH <urn:x-arq:DefaultGraph> { ?s <uri:p> ?o } }", 1, dataset) ; } finally { TDB.getContext().unset(TDB.symUnionDefaultGraph) ; } }
@Test public void dynamicAndUnion8() { try { TDB.getContext().setTrue(TDB.symUnionDefaultGraph) ; testCount("SELECT * "+ "FROM <graph:1>"+ "FROM NAMED <graph:3> FROM NAMED <graph:4> "+ "{ GRAPH <urn:x-arq:UnionGraph> { ?s <uri:p> ?o } }", 2, dataset) ; } finally { TDB.getContext().unset(TDB.symUnionDefaultGraph) ; } }
@Test public void dynamicAndUnion2() { try { TDB.getContext().setTrue(TDB.symUnionDefaultGraph) ; testCount("SELECT * "+ "FROM NAMED <graph:3> FROM NAMED <graph:4> "+ "{ ?s <uri:q> ?o }", // Same in each graph 1, dataset) ; } finally { TDB.getContext().unset(TDB.symUnionDefaultGraph) ; } }
@Test public void dynamicAndUnion3() { try { TDB.getContext().setTrue(TDB.symUnionDefaultGraph) ; testCount("SELECT * "+ "FROM NAMED <graph:3> FROM NAMED <graph:4> "+ "{ ?s <uri:p> ?o }", // Different in each graph 2, dataset) ; } finally { TDB.getContext().unset(TDB.symUnionDefaultGraph) ; } }
@Test public void dynamicAndUnion4() { try { TDB.getContext().setTrue(TDB.symUnionDefaultGraph) ; testCount("SELECT * "+ "FROM <graph:1> FROM <graph:2>"+ "FROM NAMED <graph:3> FROM NAMED <graph:4> "+ "{ ?s <uri:p> ?o }", 2, dataset) ; // Only see <graph:1> and <graph:2> as default graph. } finally { TDB.getContext().unset(TDB.symUnionDefaultGraph) ; } }
+ dataDir+"' already exists, but is not a Directory!"); TDB.getContext().set(TDB.symUnionDefaultGraph, true); setDataset( TDBFactory.createDataset(dataDir.getAbsolutePath()) ); graphNameIndex = new ModelGraph(datasetLock, getDataset().getDefaultModel(),true);