@Override protected ExtendedIterator<Triple> graphBaseFind(Triple triplePattern) { return NullIterator.instance() ; } } ;
/** * An iterator over no elements. * @return A class singleton which doesn't iterate. */ static public <T> ExtendedIterator<T> emptyIterator() { return NullIterator.instance() ; }
/** Answer an iterator over the reification triples of this Reifier, or an empty iterator - if showHidden is false, only the exposed triples, otherwise only the concealed ones. */ public static ExtendedIterator<Triple> findEither(Graph graph, Triple match, boolean showHidden) { if ( showHidden ) return NullIterator.instance() ; else return graph.find(match) ; }
/** Answer an iterator over the reification triples of this Reifier, or an empty iterator - if showHidden is false, only the exposed triples, otherwise only the concealed ones. */ public static ExtendedIterator<Triple> findEither(Graph graph, Triple match, boolean showHidden) { if ( showHidden ) return NullIterator.instance() ; else return graph.find(match) ; }
@Override public ExtendedIterator<String> listGraphs() { history.add("listModels()"); return NullIterator.instance(); }
@Override public ExtendedIterator<Triple> _graphBaseFind(Triple s) { return L.isEmpty() ? NullIterator.instance() : super._graphBaseFind(s); } }
/** Answer an iterator over all the triples in this NTM which have index node <code>o</code>. */ @Override public Iterator<Triple> iterator( Object o, HashCommon.NotifyEmpty container ) { // System.err.println( ">> BOINK" ); // if (true) throw new JenaException( "BOINK" ); TripleBunch s = bunchMap.get( o ); return s == null ? NullIterator.<Triple>instance() : s.iterator( container ); }
@Override public ExtendedIterator<Triple> iterator( Object o, HashCommon.NotifyEmpty container ) { TripleBunch b = bunchMap.get( o ); return b == null ? NullIterator.<Triple>instance() : b.iterator(); }
@Override public ExtendedIterator<Triple> iterator( Object o, HashCommon.NotifyEmpty container ) { TripleBunch b = bunchMap.get( o ); return b == null ? NullIterator.<Triple>instance() : b.iterator(); }
/** Answer an iterator over all the triples in this NTM which have index node <code>o</code>. */ @Override public Iterator<Triple> iterator( Object o, HashCommon.NotifyEmpty container ) { // System.err.println( ">> BOINK" ); // if (true) throw new JenaException( "BOINK" ); TripleBunch s = bunchMap.get( o ); return s == null ? NullIterator.<Triple>instance() : s.iterator( container ); }
@Override public ExtendedIterator<RDFNode> eval(RDFNode focusNode, NodeExpressionContext context) { ExtendedIterator<RDFNode> result = NullIterator.instance(); for(NodeExpression i : inputs) { ExtendedIterator<RDFNode> it = i.eval(focusNode, context); result = result.andThen(it); } return result; }
@Override protected ExtendedIterator<Triple> _graphBaseFind(Triple s) { return L.isEmpty() || R.isEmpty() ? NullIterator.instance() : super._graphBaseFind(s); } }
public void testEmptyToEmptyList() { assertEquals( new ArrayList<>(), IteratorCollection.iteratorToList( NullIterator.instance() ) ); }
public void testEmptyToEmptyList() { assertEquals( new ArrayList<>(), IteratorCollection.iteratorToList( NullIterator.instance() ) ); }
@Override public ExtendedIterator<Triple> iterator( Node index, Node n2, Node n3 ) { TripleBunch s = bunchMap.get( index.getIndexingValue() ); if (s == null) return NullIterator.<Triple>instance(); final Predicate<Triple> filter = f2.filterOn( n2 ).and( f3.filterOn( n3 ) ); return create(s.iterator()).filterKeep(filter); }
protected static ExtendedIterator<Triple> graphBaseFindDft(DatasetGraphTDB dataset, Triple triple) { Iterator<Quad> iterQuads = dataset.find(Quad.defaultGraphIRI, triple.getSubject(), triple.getPredicate(), triple.getObject()) ; if ( iterQuads == null ) return org.apache.jena.util.iterator.NullIterator.instance() ; // Can't be duplicates - fixed graph node.. Iterator<Triple> iterTriples = projectQuadsToTriples(Quad.defaultGraphIRI, iterQuads) ; return WrappedIterator.createNoRemove(iterTriples) ; }
public void testAndThenReturnsArgument() { ExtendedIterator<Object> it = new NiceIterator<>(); assertSame( it, NullIterator.instance().andThen( it ) ); } }
public void testNextFails() { try { NullIterator.instance().next(); fail( "should throw NoSuchElementException" ); } catch (NoSuchElementException e) { pass(); } }
public void testAndThenReturnsArgument() { ExtendedIterator<Object> it = new NiceIterator<>(); assertSame( it, NullIterator.instance().andThen( it ) ); } }
public void testNextFails() { try { NullIterator.instance().next(); fail( "should throw NoSuchElementException" ); } catch (NoSuchElementException e) { pass(); } }