Class ThesaurusExtractionComponent
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.extraction.component.AbstractExtractionComponent
-
- org.ametys.plugins.extraction.component.ThesaurusExtractionComponent
-
- All Implemented Interfaces:
ExtractionComponent,Configurable,LogEnabled,Serviceable
public class ThesaurusExtractionComponent extends AbstractExtractionComponent
This class represents a thesaurus component of the extraction module
-
-
Field Summary
-
Fields inherited from class org.ametys.plugins.extraction.component.AbstractExtractionComponent
_contentTypeExtensionPoint, _contentTypesHelper, _subComponents, _tagName, _thesaurusDAO, EXTRACTION_ITEM_PATH_SEPARATOR, JOIN_HIERARCHY_ELEMENT, JOIN_HIERARCHY_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description ThesaurusExtractionComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Configuration thesaurus)voidexecuteComponent(ContentHandler contentHandler, ExtractionExecutionContext context)Execute the extraction of the componentMap<String,Object>getComponentDetailsForTree()Retrieves the details of the component for treeSet<String>getContentTypes()Retrieves the list of content types defined for this componentprotected StringgetDefaultTagName()Retrieves the default tag nameprotected StringgetLogsPrefix()Retrieves the prefix to use in exceptions thrown by this componentintgetMaxLevel()Retrieves the maximum level of specific terms to look atStringgetMicroThesaurusId()Retrieves the component microthesaurus idvoidservice(ServiceManager serviceManager)voidsetMaxLevel(int maxLevel)Set the maximum level of specific terms to look atvoidsetMicroThesaurusId(String microThesaurusId)Set the microthesaurus id-
Methods inherited from class org.ametys.plugins.extraction.component.AbstractExtractionComponent
addSubComponent, execute, executeSubComponents, getSubComponents, getTagName, prepareComponentExecution, setTagName
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Constructor Detail
-
ThesaurusExtractionComponent
public ThesaurusExtractionComponent()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractExtractionComponent- Throws:
ServiceException
-
configure
public void configure(Configuration thesaurus) throws ConfigurationException
- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classAbstractExtractionComponent- Throws:
ConfigurationException
-
executeComponent
public void executeComponent(ContentHandler contentHandler, ExtractionExecutionContext context) throws Exception
Description copied from class:AbstractExtractionComponentExecute the extraction of the component- Specified by:
executeComponentin classAbstractExtractionComponent- Parameters:
contentHandler- result documentcontext- context of the extraction component- Throws:
Exception- if an error occurs
-
getContentTypes
public Set<String> getContentTypes()
Description copied from interface:ExtractionComponentRetrieves the list of content types defined for this component- Returns:
- a list of content types id
-
getComponentDetailsForTree
public Map<String,Object> getComponentDetailsForTree()
Description copied from interface:ExtractionComponentRetrieves the details of the component for tree- Specified by:
getComponentDetailsForTreein interfaceExtractionComponent- Overrides:
getComponentDetailsForTreein classAbstractExtractionComponent- Returns:
- a
Mapcontaining component details
-
getDefaultTagName
protected String getDefaultTagName()
Description copied from class:AbstractExtractionComponentRetrieves the default tag name- Specified by:
getDefaultTagNamein classAbstractExtractionComponent- Returns:
- the default tag name
-
getLogsPrefix
protected String getLogsPrefix()
Description copied from class:AbstractExtractionComponentRetrieves the prefix to use in exceptions thrown by this component- Specified by:
getLogsPrefixin classAbstractExtractionComponent- Returns:
- the prefix for exceptions
-
getMicroThesaurusId
public String getMicroThesaurusId()
Retrieves the component microthesaurus id- Returns:
- The microthesaurus id
-
setMicroThesaurusId
public void setMicroThesaurusId(String microThesaurusId)
Set the microthesaurus id- Parameters:
microThesaurusId- The microthesaurus id to set
-
getMaxLevel
public int getMaxLevel()
Retrieves the maximum level of specific terms to look at- Returns:
- The maximum level
-
setMaxLevel
public void setMaxLevel(int maxLevel)
Set the maximum level of specific terms to look at- Parameters:
maxLevel- The maximum level to set
-
-