public ArrayList<VociBusinessObject> performQuery( String query,
ContentType type, int projectId ) throws ImportException
{
if ((type == ContentType.COMMUNITY) && (!query.startsWith("id:")))
{
throw new ImportException("Invalid query. Repository imports "
+ "can only be done by id.");
}
else if ((type == ContentType.COLLECTION)
&& (!((query.startsWith("id:")) || (query.startsWith("repo:")))))
{
throw new ImportException("Invalid query. Collection imports "
+ "must be done individually by id, or collectively "
+ "by repository.");
}
else if ((type == ContentType.ITEM)
&& (!((query.startsWith("id:")) || (query.startsWith("coll:")))))
{
throw new ImportException("Invalid query. Item imports "
+ "must be done individually by id, or collectively "
+ "by collection.");
}
Document document = null;