public IKeyOrder<ISPO> getKeyOrder() { if (src != null) { return src.getKeyOrder(); } return keyOrder; }
@Override public E next() { return src.next(); }
@Override public E[] nextChunk() { return src.nextChunk(); }
public ISPO[] nextChunk() { if (src != null) { return src.nextChunk(); } final int chunkSize = 10000; ISPO[] s = new ISPO[chunkSize]; int n = 0; while (hasNext() && n < chunkSize) { ISolution<ISPO> solution = solutions.next(); // s[n++] = resolverator.resolve(solution); ISPO spo = solution.get(); spo = new SPO(spo.s(), spo.p(), spo.o()); s[n++] = spo; } // copy so that stmts[] is dense. ISPO[] stmts = new ISPO[n]; System.arraycopy(s, 0, stmts, 0, n); // fill in the explicit/inferred information, sort by SPO key order // since we will use the SPO index to do the value completion stmts = db.bulkCompleteStatements(stmts); // resort into desired order Arrays.sort(stmts, 0, n, this.keyOrder.getComparator()); return stmts; }
public ISPO[] convert(final IChunkedOrderedIterator<ISPO> src) { if (src == null) throw new IllegalArgumentException(); final ISPO[] chunk = src.nextChunk(); if (!tupleSer.getKeyOrder().equals(src.getKeyOrder())) { // Sort unless already in the correct order. Arrays.sort(chunk, tupleSer.getKeyOrder().getComparator()); } return convert(chunk); }
public void remove() { if (canRemove) { src.remove(); } } }
@Override public E next() { return src.next(); }
@Override public E[] nextChunk(IKeyOrder<E> keyOrder) { return src.nextChunk(keyOrder); }
public ISPO[] convert(final IChunkedOrderedIterator<ISPO> src) { if (src == null) throw new IllegalArgumentException(); final ISPO[] chunk = src.nextChunk(); if (!tupleSer.getKeyOrder().equals(src.getKeyOrder())) { // Sort unless already in the correct order. Arrays.sort(chunk, tupleSer.getKeyOrder().getComparator()); } return convert(chunk); }
public void remove() { if (canRemove) { src.remove(); } } }