int count = 0;
for (ReferenceContainer<HostReference> references: idx) {
prop.put("list_" + count + "_term", ASCII.String(references.getTermHash()));
Iterator<HostReference> referenceIterator = references.entries();
StringBuilder s = new StringBuilder();
HostReference reference;
while (referenceIterator.hasNext()) {
reference = referenceIterator.next();
s.append(reference.toPropertyForm());
if (referenceIterator.hasNext()) s.append(",");
}
prop.put("list_" + count + "_references", s.toString());
prop.put("list_" + count + "_comma", 1);
count++;