public abstract class BaseAttachmentContentExtractor extends Object implements Extractor2
Constructor and Description |
---|
BaseAttachmentContentExtractor() |
Modifier and Type | Method and Description |
---|---|
Collection<FieldDescriptor> |
extractFields(Object searchable)
Extract fields from the searchable object.
|
protected abstract String |
extractText(InputStream is,
com.atlassian.bonnie.search.SearchableAttachment attachment) |
StringBuilder |
extractText(Object searchable)
Returns a buffer of text that will be appended onto the end of a larger buffer of text that will eventually
become the searchable body text.
|
protected Optional<CharSequence> |
extractText(com.atlassian.bonnie.search.SearchableAttachment attachment) |
protected abstract boolean |
shouldExtractFrom(String fileName,
String contentType) |
@Nonnull protected Optional<CharSequence> extractText(com.atlassian.bonnie.search.SearchableAttachment attachment)
public Collection<FieldDescriptor> extractFields(Object searchable)
Extractor2
extractFields
in interface Extractor2
searchable
- a searchable objectpublic StringBuilder extractText(Object searchable)
Extractor2
extractText
in interface Extractor2
searchable
- a searchable objectprotected abstract String extractText(InputStream is, com.atlassian.bonnie.search.SearchableAttachment attachment) throws com.atlassian.bonnie.search.extractor.ExtractorException
is
- a stream containing the attachment contentsattachment
- contains useful attachment metadata, e.g. filenamecom.atlassian.bonnie.search.extractor.ExtractorException
- if there is a problem with converting the attachment content into text. A wrapper
around the original exception.Copyright © 2003–2023 Atlassian. All rights reserved.
View cookie preferences