The iterators returned by GPO can conveniently be used as conventional java iterator objects.
But they can be used more flexibly than that. See the page on striteration for more information.
The iterators are typically returned by the GPO LinkSet object. These iterators crawl
over persistently linked objects. So an iterator can quite happily return many thousands of
objects, retrieving one at a time from the store. In this way they are similar to database
cursor objects.
When processing data streams, it is common to think in terms of filters that are able to apply transformations to the data.
The GPO iterators can be used in the same way.
Filter objects can be added to the iterators to perform calculations to filter out certain
objects, or resolve one object to another, or expand a single value to a number
of values. Many different transformations are supported.
This style of processing enables the filters and iterators to combine to form a set of effective object oriented search and query functions.
Here is a simple example using jython:
songs = album.getLinkSet("song.album").iterator();
vocals = songs.resolve("vocal").makeUnique();
Will return an iteration of all unique vocalists on a specific album.