public abstract class AbstractExtractionComponent extends AbstractLogEnabled implements ExtractionComponent, Serviceable, Configurable
Modifier and Type | Field and Description |
---|---|
protected ContentTypeExtensionPoint |
_contentTypeExtensionPoint
Content types extension point
|
protected ContentTypesHelper |
_contentTypesHelper
Helper for content types
|
protected List<ExtractionComponent> |
_subComponents
The list of sub components
|
protected String |
_tagName
the tag name
|
protected ThesaurusDAO |
_thesaurusDAO
Thesaurus DAO
|
protected static String |
EXTRACTION_METADATA_PATH_SEPARATOR
Metadata path separator used in extraction definition
|
protected static String |
JOIN_HIERARCHY_ELEMENT
Hierarchy level element representation for join expression
|
protected static String |
JOIN_HIERARCHY_SEPARATOR
Hierarchy level separator for join expression
|
Constructor and Description |
---|
AbstractExtractionComponent() |
Modifier and Type | Method and Description |
---|---|
void |
addSubComponent(ExtractionComponent subComponent)
Add sub component
|
void |
configure(Configuration configuration) |
void |
execute(ContentHandler contentHandler,
ExtractionExecutionContext context)
Execute the extraction of the component
|
protected abstract void |
executeComponent(ContentHandler contentHandler,
ExtractionExecutionContext context)
Execute the extraction of the component
|
void |
executeSubComponents(ContentHandler contentHandler,
ExtractionExecutionContext context,
ExtractionExecutionContextHierarchyElement currentContextHierarchyElement)
Execute the sub components
|
Map<String,Object> |
getComponentDetailsForTree()
Retrieves the details of the component for tree
|
protected abstract String |
getDefaultTagName()
Retrieves the default tag name
|
protected abstract String |
getLogsPrefix()
Retrieves the prefix to use in exceptions thrown by this component
|
List<ExtractionComponent> |
getSubComponents()
Retrieves sub components of the component
|
String |
getTagName()
Retrieves the component tag name
|
void |
prepareComponentExecution(ExtractionExecutionContext context)
Prepare the execution of the component
|
void |
service(ServiceManager serviceManager) |
void |
setTagName(String tagName)
Sets the component tag name
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContentTypes
protected static final String JOIN_HIERARCHY_SEPARATOR
protected static final String JOIN_HIERARCHY_ELEMENT
protected static final String EXTRACTION_METADATA_PATH_SEPARATOR
protected List<ExtractionComponent> _subComponents
protected ContentTypesHelper _contentTypesHelper
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
protected ThesaurusDAO _thesaurusDAO
public AbstractExtractionComponent()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
ServiceException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
protected abstract String getDefaultTagName()
public void prepareComponentExecution(ExtractionExecutionContext context) throws Exception
ExtractionComponent
prepareComponentExecution
in interface ExtractionComponent
context
- context of the extraction componentException
- if an error occurspublic final void execute(ContentHandler contentHandler, ExtractionExecutionContext context) throws Exception
ExtractionComponent
execute
in interface ExtractionComponent
contentHandler
- result documentcontext
- context of the extraction componentException
- if an error occursprotected abstract void executeComponent(ContentHandler contentHandler, ExtractionExecutionContext context) throws Exception
contentHandler
- result documentcontext
- context of the extraction componentException
- if an error occurspublic void executeSubComponents(ContentHandler contentHandler, ExtractionExecutionContext context, ExtractionExecutionContextHierarchyElement currentContextHierarchyElement) throws Exception
contentHandler
- result documentcontext
- context of the extraction componentcurrentContextHierarchyElement
- the current contextException
- if an error occurspublic void addSubComponent(ExtractionComponent subComponent)
ExtractionComponent
addSubComponent
in interface ExtractionComponent
subComponent
- the sub components to addpublic List<ExtractionComponent> getSubComponents()
ExtractionComponent
getSubComponents
in interface ExtractionComponent
public Map<String,Object> getComponentDetailsForTree()
ExtractionComponent
getComponentDetailsForTree
in interface ExtractionComponent
Map
containing component detailsprotected abstract String getLogsPrefix()
public String getTagName()
public void setTagName(String tagName)
tagName
- The tag name to set