// Handles can be either items or containers.
if (dso instanceof Item)
return (Item)dso;
else
throw new CrosswalkException("ORE dissemination only available for DSpace Items.");
}
else if (internal != null)
{
// Internal identifier, format: "type:id".
String[] parts = internal.split(":");
if (parts.length == 2)
{
String type = parts[0];
int id = Integer.valueOf(parts[1]);
if ("item".equals(type))
{
Item item = Item.find(context,id);
return item;
}
else
throw new CrosswalkException("ORE dissemination only available for DSpace Items.");
}
}
return null;
}