public class RepresentationIterator extends Object implements Iterator<eu.europeana.cloud.common.model.Representation>
DataSetServiceClient#getRepresentationIteratorForProvider(String providerId, String dataSetId)
method.
Iterator obtains Representation objects in chunks, obtaining new
chunk only if needed, inside overridden Iterator class methods.| Constructor and Description |
|---|
RepresentationIterator(DataSetServiceClient client,
String providerId,
String dataSetId)
Creates instance of RepresentationIterator.
|
public RepresentationIterator(DataSetServiceClient client, String providerId, String dataSetId)
client - properly initialised client for internal communication with
MCS server (required)providerId - id of the provider (required)dataSetId - data set identifier (required)public boolean hasNext()
true if the iteration has more elements.
The first call to this method might take longer time than the others, as
there might be a need to obtain first chunk of data. If data set does not
exists, first call to this method will throw DriverException with
inner exception: DataSetNotExistsException.public eu.europeana.cloud.common.model.Representation next()
DriverException with inner
exception: DataSetNotExistsException.next in interface Iterator<eu.europeana.cloud.common.model.Representation>NoSuchElementException - if there are no more elementsCopyright © 2013–2017 Europeana Cloud Development Team. All rights reserved.