public class DocumentCategorizationServiceImpl extends DefaultComponent implements DocumentCategorizationService
Modifier and Type | Field and Description |
---|---|
static String |
ANY2TEXT |
static String |
CATEGORIZERS_XP_NAME |
Constructor and Description |
---|
DocumentCategorizationServiceImpl() |
Modifier and Type | Method and Description |
---|---|
String |
extractTextContent(DocumentModel doc) |
void |
registerExtension(Extension extension)
Registers the given 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, unregisterContribution
public static final String CATEGORIZERS_XP_NAME
public static final String ANY2TEXT
public void registerExtension(Extension extension) throws Exception
Extensible
registerExtension
in interface Extensible
registerExtension
in class DefaultComponent
extension
- the extension to registerException
- if any error occurspublic void unregisterExtension(Extension extension) throws Exception
Extensible
unregisterExtension
in interface Extensible
unregisterExtension
in class DefaultComponent
extension
- the extension to unregisterException
- if any error occurspublic List<DocumentModel> updateCategories(CoreSession session, List<DocumentRef> docRefs) throws Exception
DocumentCategorizationService
updateCategories
in interface DocumentCategorizationService
session
- the Core session used to fetch the documentdocRefs
- the list of documents to processException
- if there is a problem while extracting the text contentpublic List<DocumentModel> updateCategories(List<DocumentModel> documents) throws Exception
DocumentCategorizationService
updateCategories
in interface DocumentCategorizationService
documents
- the list of documents to processException
- if there is a problem while extracting the text contentpublic String extractTextContent(DocumentModel doc) throws Exception
Exception
Copyright © 2013 Nuxeo SA. All Rights Reserved.