public class DocumentCategorizationServiceImpl extends DefaultComponent implements DocumentCategorizationService
Modifier and Type | Field and Description |
---|---|
static String |
ANY2TEXT |
static String |
CATEGORIZERS_XP_NAME |
protected ConversionService |
conversionService |
protected BlobsExtractor |
extractor |
protected Map<String,CategorizerDescriptor> |
mergedCategorizers |
protected List<CategorizerDescriptor> |
registeredCategorizers |
lastModified
Constructor and Description |
---|
DocumentCategorizationServiceImpl() |
Modifier and Type | Method and Description |
---|---|
String |
extractTextContent(DocumentModel doc) |
protected ConversionService |
getConversionService() |
protected Map<String,CategorizerDescriptor> |
getMergedDescriptors() |
protected void |
registerCategorizerDescriptor(CategorizerDescriptor descriptor,
Extension extension) |
void |
registerExtension(Extension extension)
Registers the given extension.
|
protected void |
unregisterCategorizerDescriptor(CategorizerDescriptor descriptor,
Extension extension) |
void |
unregisterExtension(Extension extension)
Unregisters the given extension.
|
List<DocumentModel> |
updateCategories(CoreSession session,
List<DocumentRef> docRefs)
Run all registered document categorizers on the given documents fetched using the provided session.
|
List<DocumentModel> |
updateCategories(List<DocumentModel> documents)
Run all registered document categorizers on the given documents.
|
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerContribution, setLastModified, setModifiedNow, unregisterContribution
public static final String CATEGORIZERS_XP_NAME
public static final String ANY2TEXT
protected Map<String,CategorizerDescriptor> mergedCategorizers
protected final List<CategorizerDescriptor> registeredCategorizers
protected final BlobsExtractor extractor
protected ConversionService conversionService
public DocumentCategorizationServiceImpl()
public void registerExtension(Extension extension)
Extensible
registerExtension
in interface Extensible
registerExtension
in class DefaultComponent
extension
- the extension to registerpublic void unregisterExtension(Extension extension)
Extensible
unregisterExtension
in interface Extensible
unregisterExtension
in class DefaultComponent
extension
- the extension to unregisterprotected void registerCategorizerDescriptor(CategorizerDescriptor descriptor, Extension extension)
protected void unregisterCategorizerDescriptor(CategorizerDescriptor descriptor, Extension extension)
protected Map<String,CategorizerDescriptor> getMergedDescriptors()
public List<DocumentModel> updateCategories(CoreSession session, List<DocumentRef> docRefs)
DocumentCategorizationService
updateCategories
in interface DocumentCategorizationService
session
- the Core session used to fetch the documentdocRefs
- the list of documents to processpublic List<DocumentModel> updateCategories(List<DocumentModel> documents)
DocumentCategorizationService
updateCategories
in interface DocumentCategorizationService
documents
- the list of documents to processpublic String extractTextContent(DocumentModel doc)
protected ConversionService getConversionService()
Copyright © 2015 Nuxeo SA. All rights reserved.