GetLegendGraphicProducerSpi factory;
for (Iterator iter = producers.iterator(); iter.hasNext();) {
factory = (GetLegendGraphicProducerSpi) iter.next();
if (factory.canProduce(outputFormat)) {
return factory.createLegendProducer(outputFormat);
}
}
throw new WmsException("There is no support for creating legends in " + outputFormat