* @param onto the ontology
* @return the Set
* @throws OntologyException
*/
public static Set internaliseSet(AbsAggregate aggregate, Ontology onto) throws OntologyException {
Set ret = new HashSet();
for (int i = 0; i < aggregate.size(); i++) {
Object element = onto.toObject(aggregate.get(i));
// Check if the element is a Term, a primitive an AID or a List
Ontology.checkIsTerm(element);
ret.add(element);
}
return ret;
}