use of org.apache.stanbol.enhancer.servicesapi.Chain in project stanbol by apache.
the class EventJobManagerImpl method enhanceContent.
@Override
public void enhanceContent(ContentItem ci) throws EnhancementException {
Chain defaultChain = chainManager.getDefault();
if (defaultChain == null) {
throw new ChainException("Unable to enhance ContentItem '" + ci.getUri() + "' because currently no enhancement chain is active. Please" + "configure a Chain or enable the default chain");
}
enhanceContent(ci, defaultChain);
}
use of org.apache.stanbol.enhancer.servicesapi.Chain in project stanbol by apache.
the class EventJobManagerImpl method getActiveEngines.
@Override
public List<EnhancementEngine> getActiveEngines() {
//This implementation return the list of active engined for the default
//Chain in the order they would be executed
Chain defaultChain = chainManager.getDefault();
if (defaultChain == null) {
throw new IllegalStateException("Currently no enhancement chain is " + "active. Please configure a Chain or enable the default chain");
}
ImmutableGraph ep;
try {
ep = defaultChain.getExecutionPlan();
} catch (ChainException e) {
throw new IllegalStateException("Unable to get Execution Plan for " + "default enhancement chain (name: '" + defaultChain.getName() + "'| class: '" + defaultChain.getClass() + "')!", e);
}
return ExecutionPlanHelper.getActiveEngines(engineManager, ep);
}
Aggregations