public class ThesaurusExtractionComponent extends AbstractExtractionComponent
Modifier and Type | Field and Description |
---|---|
private int |
_maxLevel |
private MicroThesaurus |
_microThesaurus |
private String |
_microThesaurusName |
private Thesaurus |
_thesaurus |
private String |
_thesaurusName |
_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 |
---|---|
private int |
_getNbTermChildren(AmetysObjectIterable<AmetysObject> children) |
private void |
_processChildren(ContentHandler contentHandler,
AmetysObjectIterable<AmetysObject> 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 |
getMicroThesaurusName()
Retrieves the component microthesaurus name
|
String |
getThesaurusName()
Retrieves the component thesaurus name
|
void |
prepareComponentExecution(ExtractionExecutionContext context)
Prepare the execution of the component
|
void |
setMaxLevel(int maxLevel)
Set the maximum level of specific terms to look at
|
void |
setMicroThesaurusName(String thesaurusName)
Set the microthesaurus name
|
void |
setThesaurusName(String thesaurusName)
Set the thesaurus name
|
addSubComponent, execute, executeSubComponents, getSubComponents, getTagName, service, setTagName
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private String _thesaurusName
private String _microThesaurusName
private int _maxLevel
private Thesaurus _thesaurus
private MicroThesaurus _microThesaurus
public ThesaurusExtractionComponent()
public void configure(Configuration thesaurus) throws ConfigurationException
configure
in interface Configurable
configure
in class AbstractExtractionComponent
ConfigurationException
public void prepareComponentExecution(ExtractionExecutionContext context) throws Exception
ExtractionComponent
prepareComponentExecution
in interface ExtractionComponent
prepareComponentExecution
in class AbstractExtractionComponent
context
- context of the extraction componentException
- if an error occurspublic 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<AmetysObject> children, int currentLevel, ExtractionExecutionContext context) throws Exception
Exception
private int _getNbTermChildren(AmetysObjectIterable<AmetysObject> children)
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 getThesaurusName()
public void setThesaurusName(String thesaurusName)
thesaurusName
- The thesaurus name to setpublic String getMicroThesaurusName()
public void setMicroThesaurusName(String thesaurusName)
thesaurusName
- The microthesaurus name to setpublic int getMaxLevel()
public void setMaxLevel(int maxLevel)
maxLevel
- The maximum level to set