if ((annotation = clazz.getAnnotation(Result.class)) != null) {
Result r = (Result)annotation;
TermSchema ts = (TermSchema)doAddSchema(r.type(), buildHierarchy);
((AgentActionSchema)schema).setResult(ts);
} else if ((annotation = clazz.getAnnotation(AggregateResult.class)) != null) {
AggregateResult ar = (AggregateResult)annotation;
TermSchema ts = (TermSchema)doAddSchema(ar.type(), buildHierarchy);
((AgentActionSchema)schema).setResult(ts, ar.cardMin(), ar.cardMax());
}
}