try
{
Collection[] itemCollections = item.getCollections();
for (Collection col : itemCollections)
{
ReferenceSet s = new DSpaceSet(col);
sets.add(s);
for (Community com : collectionsService.flatParentCommunities(col))
if (!coms.contains(com))
coms.add(com);
}
for (Community com : coms)
{
ReferenceSet s = new DSpaceSet(com);
sets.add(s);
}
}
catch (SQLException e)
{