private Map<String, Map<ContentVO, List<ReferenceBean>>> groupByContactPerson(Map<ContentVO, List<ReferenceBean>> contactPersons)
{
Map<String, Map<ContentVO, List<ReferenceBean>>> result = new HashMap<String, Map<ContentVO, List<ReferenceBean>>>();
for (Map.Entry<ContentVO, List<ReferenceBean>> entry : contactPersons.entrySet())
{
ContentVO contentVO = entry.getKey();
Map<String, List<ReferenceBean>> referencesByContact = groupByContactPerson(entry.getValue());
for (Map.Entry<String, List<ReferenceBean>> contactsForSiteNode : referencesByContact.entrySet())
{
String contactPerson = contactsForSiteNode.getKey();
Map<ContentVO, List<ReferenceBean>> value = result.get(contactPerson);