public class ThesaurusExtractionComponent extends AbstractExtractionComponent
Modifier and Type | Field and Description |
---|---|
private I18nUtils |
_i18nUtils |
private int |
_maxLevel |
private ContentType |
_microThesaurus |
private String |
_microThesaurusId |
private Thesaurus |
_thesaurus |
_contentTypeExtensionPoint, _contentTypesHelper, _subComponents, _tagName, _thesaurusDAO, EXTRACTION_METADATA_PATH_SEPARATOR, JOIN_HIERARCHY_ELEMENT, JOIN_HIERARCHY_SEPARATOR
Constructor and Description |
---|
ThesaurusExtractionComponent() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
_initializeThesaurus() |
private void |
_processChildren(ContentHandler contentHandler,
AmetysObjectIterable<Content> children,
int currentLevel,
ExtractionExecutionContext context) |
void |
configure(Configuration thesaurus) |
void |
executeComponent(ContentHandler contentHandler,
ExtractionExecutionContext context)
Execute the extraction of the component
|
Map<String,Object> |
getComponentDetailsForTree()
Retrieves the details of the component for tree
|
Set<String> |
getContentTypes()
Retrieves the list of content types defined for this component
|
protected String |
getDefaultTagName()
Retrieves the default tag name
|
protected String |
getLogsPrefix()
Retrieves the prefix to use in exceptions thrown by this component
|
int |
getMaxLevel()
Retrieves the maximum level of specific terms to look at
|
String |
getMicroThesaurusId()
Retrieves the component microthesaurus id
|
void |
service(ServiceManager serviceManager) |
void |
setMaxLevel(int maxLevel)
Set the maximum level of specific terms to look at
|
void |
setMicroThesaurusId(String microThesaurusId)
Set the microthesaurus id
|
addSubComponent, execute, executeSubComponents, getSubComponents, getTagName, prepareComponentExecution, setTagName
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private String _microThesaurusId
private Thesaurus _thesaurus
private ContentType _microThesaurus
private int _maxLevel
private I18nUtils _i18nUtils
public ThesaurusExtractionComponent()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class AbstractExtractionComponent
ServiceException
public void configure(Configuration thesaurus) throws ConfigurationException
configure
in interface Configurable
configure
in class AbstractExtractionComponent
ConfigurationException
void _initializeThesaurus()
public void executeComponent(ContentHandler contentHandler, ExtractionExecutionContext context) throws Exception
AbstractExtractionComponent
executeComponent
in class AbstractExtractionComponent
contentHandler
- result documentcontext
- context of the extraction componentException
- if an error occurspublic Set<String> getContentTypes()
ExtractionComponent
private void _processChildren(ContentHandler contentHandler, AmetysObjectIterable<Content> children, int currentLevel, ExtractionExecutionContext context) throws Exception
Exception
public Map<String,Object> getComponentDetailsForTree()
ExtractionComponent
getComponentDetailsForTree
in interface ExtractionComponent
getComponentDetailsForTree
in class AbstractExtractionComponent
Map
containing component detailsprotected String getDefaultTagName()
AbstractExtractionComponent
getDefaultTagName
in class AbstractExtractionComponent
protected String getLogsPrefix()
AbstractExtractionComponent
getLogsPrefix
in class AbstractExtractionComponent
public String getMicroThesaurusId()
public void setMicroThesaurusId(String microThesaurusId)
microThesaurusId
- The microthesaurus id to setpublic int getMaxLevel()
public void setMaxLevel(int maxLevel)
maxLevel
- The maximum level to set