ArrayList itemmd = new ArrayList();
if(dso.getType() == Constants.ITEM)
{
itemmd.add(dso.getID());
exporter = new MetadataExport(context, new ItemIterator(context, itemmd),true);
}
else if(dso.getType() == Constants.COLLECTION)
{
Collection collection = (Collection)dso;
ItemIterator toExport = collection.getAllItems();
exporter = new MetadataExport(context, toExport,true);
}
else if(dso.getType() == Constants.COMMUNITY)
{
exporter = new MetadataExport(context, (Community)dso, false);