DatasetGraphFilteredView extends DatasetGraphReadOnly implements DatasetGraphWrapperView { @Override public Iterator<Node> listGraphNodes() { return visibleGraphs.iterator(); } DatasetGraphFilteredView(DatasetGraph dsg, Predicate<Quad> filter, Collection<Node> visibleGraphs); @Override Graph getDefaultGraph(); @Override Graph getGraph(Node graphNode); @Override Iterator<Node> listGraphNodes(); @Override long size(); @Override Graph getUnionGraph(); @Override Iterator<Quad> find(); @Override Iterator<Quad> find(Node g, Node s, Node p, Node o); @Override Iterator<Quad> find(Quad quad); @Override Iterator<Quad> findNG(Node g, Node s, Node p , Node o); @Override boolean contains(Node g, Node s, Node p , Node o); @Override boolean contains(Quad quad); @Override boolean isEmpty(); @Override String toString();  }
@Test public void filtered1() { Predicate<Quad> filter = x->true; Txn.executeRead(basedsg, ()->{ DatasetGraph dsg = new DatasetGraphFilteredView(basedsg, filter, Iter.toList(basedsg.listGraphNodes())); assertSame(basedsg, dsg); }); }