org.apache.stanbol.enhancer.servicesapi
Interface EnhancementJobManager


public interface EnhancementJobManager

Accept requests for enhancing ContentItems, and processes them either synchronously or asynchronously (as decided by the enhancement engines, the job manager implementation, the execution plan provided by the Chain or by some additional configurations).

The progress of the enhancement process should be made accessible in the ContentItem's metadata.


Method Summary
 void enhanceContent(ContentItem ci)
          Enhances the parsed contentItem by using the default enhancement Chain.
 void enhanceContent(ContentItem ci, Chain chain)
          Processes the parsed ContentItem by using the execution plan provided by the Chain.
 java.util.List<EnhancementEngine> getActiveEngines()
          Deprecated. use the EnhancementEngineManager to get information about currently active Engines and the ChainManager to get active chains. This method will now return active engines of the default chain.
 

Method Detail

enhanceContent

void enhanceContent(ContentItem ci)
                    throws EnhancementException
Enhances the parsed contentItem by using the default enhancement Chain. Create relevant asynchronous requests or enhance content immediately. The result is not persisted right now. The caller is responsible for calling the Store#put(ContentItem) afterwards in case persistence is required.

TODO: define the expected semantics if asynchronous enhancements were to get implemented.

Throws:
EnhancementException - if the enhancement process failed

enhanceContent

void enhanceContent(ContentItem ci,
                    Chain chain)
                    throws EnhancementException
Processes the parsed ContentItem by using the execution plan provided by the Chain.

Parameters:
ci - : ContentItem to be enhanced
chain - : The enhancement Chain used to process the content item
Throws:
EnhancementException - : if an Engine required by the Chain fails to process the ContentItem
ChainException - : if the enhancement process failed

getActiveEngines

@Deprecated
java.util.List<EnhancementEngine> getActiveEngines()
Deprecated. use the EnhancementEngineManager to get information about currently active Engines and the ChainManager to get active chains. This method will now return active engines of the default chain.

Return the unmodifiable list of active registered engine instance that can be used by the manager.



Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.