if (node.isProcessingElement())
{
Set<String> candidates = (Set<String>)node.getAnnotation(AnnotationKeys.CANDIDATE_EXECUTION_ENGINES);
if (candidates == null)
{
throw new TransformationException(
"Processing Element " + node.getName() + " does not " +
"have a candidate execution engines annotation.");
}
if (candidates.isEmpty())
{
throw new TransformationException(
"Processing Element " + node.getName() + " has an " +
"empty set of candidate execution engines.");
}
String executionEngine = (String)node.getAnnotation(AnnotationKeys.EXECUTION_ENGINE);
if (executionEngine != null && !candidates.contains(executionEngine))
{
throw new TransformationException(
"Processing Element " + node.getName() + " has " +
"execution engine annotation "+ executionEngine +
" inconsistent with candidates: " + candidates);
}
}