}
}
else
{
DSpaceObject dso = HandleManager.resolveToObject(context,
uuid);
if (dso == null)
{
throw new IllegalArgumentException("Invalid handle: "
+ uuid + " DSpace object not found");
}
statBean.setObject(dso);
statBean.setObjectName(dso.getName());
statBean.setObjectURL(ConfigurationManager
.getProperty("dspace.url") + "/handle/" + uuid);
statBean.setType(dso.getType());
switch (dso.getType())
{
case Constants.ITEM:
StatComponentsService serviceItem = researcher.getItemStatsComponents();
retrieveResults(dateType, dateStart, dateEnd, gap,
selectedObject, topObject, dso, serviceItem);
statBean.setStatURL(ConfigurationManager
.getProperty("dspace.url")
+ "/cris/stats/item.html?handle=" + uuid);
break;
case Constants.COLLECTION:
StatComponentsService serviceColl = researcher.getCollectionStatsComponents();
retrieveResults(dateType, dateStart, dateEnd, gap,
selectedObject, topObject, dso, serviceColl);
statBean.setStatURL(ConfigurationManager
.getProperty("dspace.url")
+ "/cris/stats/collection.html?handle=" + uuid);
break;
case Constants.COMMUNITY:
StatComponentsService serviceComm = researcher.getCommunityStatsComponents();
retrieveResults(dateType, dateStart, dateEnd, gap,
selectedObject, topObject, dso, serviceComm);
statBean.setStatURL(ConfigurationManager
.getProperty("dspace.url")
+ "/cris/stats/community.html?handle=" + uuid);
break;
default:
throw new IllegalArgumentException("Invalid handle: "
+ uuid + " DSpace object of type: "
+ dso.getType() + " is not allowed");
}
}
addStatDataBean(statBean, selectedObject, topObject);
}