String query = "select id, name where InCollection('" + collection + "') and branch = '" + branch + "'";
VariantKey[] keys = queryManager.performQueryReturnKeys(query, Locale.getDefault());
for (VariantKey key : keys) {
Document doc = repository.getDocument(key, false);
Version version = doc.getLiveVersion();
if (version == null) {
continue;
}
for (Part part : version.getParts().getArray()) {