//To improve scalability, XMLUI only adds item counts if they are cached
if (useCache)
{
try
{ //try to determine Collection size (i.e. # of items)
int size = new ItemCounter(this.dspaceContext).getCount(collection);
createField("dc","format","extent",null, String.valueOf(size));
}
catch(ItemCountException e)
{
IOException ioe = new IOException("Could not obtain Collection item-count");
ioe.initCause(e);
throw ioe;
}
}
}
else if (dso.getType() == Constants.COMMUNITY)
{
Community community = (Community) dso;
String description = community.getMetadata("introductory_text");
String description_abstract = community.getMetadata("short_description");
String description_table = community.getMetadata("side_bar_text");
String identifier_uri = "http://hdl.handle.net/" + community.getHandle();
String rights = community.getMetadata("copyright_text");
String title = community.getMetadata("name");
createField("dc","description",null,null,description);
createField("dc","description","abstract",null,description_abstract);
createField("dc","description","tableofcontents",null,description_table);
createField("dc","identifier","uri",null,identifier_uri);
createField("dc","rights",null,null,rights);
createField("dc","title",null,null,title);
boolean useCache = ConfigurationManager.getBooleanProperty("webui.strengths.cache");
//To improve scalability, XMLUI only adds item counts if they are cached
if (useCache)
{
try
{ //try to determine Community size (i.e. # of items)
int size = new ItemCounter(this.dspaceContext).getCount(community);
createField("dc","format","extent",null, String.valueOf(size));
}
catch(ItemCountException e)
{
IOException ioe = new IOException("Could not obtain Collection item-count");