747576777879808182838485868788
@Override public Resource next() { if (!hasNext()) { throw new NoSuchElementException("No more resources."); } Resource resource = stack.getLast().next(); while (stack.size()>0 && !stack.getLast().hasNext()) { stack.removeLast(); } Iterator<Resource> iter = resource.getNodes().iterator(); if (iter.hasNext()) { stack.addLast(iter); } return resource; }
5253545556575859606162
private Publishable next; public boolean hasNext() { if (next!=null) return true; while (iterator.hasNext()) { Resource resource = iterator.next(); if (resource instanceof Publishable) { next = (Publishable)resource; return true; } }
159160161162163164165166167168
if (resource==null) { throw new NoSuchElementException(); } totalCount++; passCount++; Resource result = resource; // clear cached record (resource) resource = null; return result; }
6162636465666768697071
public boolean hasNext() { if (next != null) { return true; } while (iterator.hasNext()) { Resource resource = iterator.next(); if (resource instanceof IServiceInfoProvider && ((IServiceInfoProvider) resource).getServiceInfo()!=null) { next = (IServiceInfoProvider) resource; return true; } }
119120121122123124125126127128129
if (!hasNext()) { throw new NoSuchElementException(); } final Iterable<Resource> records = nextOaiRecords; nextOaiRecords = null; return new Resource() { @Override public Iterable<Resource> getNodes() { return records; } };
9596979899100101102103104105
if (!hasNext()) { throw new NoSuchElementException(); } final Iterable<Resource> records = nextCswrecords; nextCswrecords = null; return new Resource() { @Override public Iterable<Resource> getNodes() { return records; } };
111112113114115116117118119120121
if (!hasNext()) { throw new NoSuchElementException(); } final Iterable<Resource> records = nextAgpRecords; nextAgpRecords = null; return new Resource() { @Override public Iterable<Resource> getNodes() { return records; }
6768697071727374757677
@Override public Resource next() { if (nextResource==null) { throw new NoSuchElementException("No more elements."); } Resource r = nextResource; nextResource = null; if (r instanceof FtpFile) { try { FtpFile f = (FtpFile)r; f.getContent();
140141142143144145146147148149150
if (!hasNext()) { throw new NoSuchElementException(); } final Iterable<Resource> records = nextAtomRecords; nextAtomRecords = null; return new Resource() { public Iterable<Resource> getNodes() { return records; } }; }