}
// Choose content versions to return
List<WGContentKey> contentsToReturn = new ArrayList<WGContentKey>();
for (Map<String,WGContentKey> pageMap : pages.values()) {
WGContentKey chosenContent = null;
if (pageMap.size() == 1) {
chosenContent = pageMap.values().iterator().next();
}
else {
for (WGLanguage lang : queryLanguages) {
WGContentKey conKey = pageMap.get(lang.getName());
if (conKey != null) {
chosenContent = conKey;
break;
}
}