SortedMap<Integer, String> classKeys = new TreeMap<Integer, String>();
while (iterator.hasNext()){
JsonNode currentNode = iterator.next();
Boolean outputFormatMatch = matchNode(currentNode, "outputFormats", layer.getRequestedFormat().toLowerCase());
if (outputFormatMatch){
String classKey = currentNode.path("classKey").getTextValue();
Integer preference = currentNode.path("preference").getIntValue();
logger.debug("Matched classKey: " + classKey);
if (hasRequirements(classKey, layer)){
logger.debug("requirements met: " + classKey);
classKeys.put(preference, classKey);