public class LazyTextExtractorField
extends AbstractField
LazyTextExtractorField
implements a Lucene field with a String
value that is lazily initialized from a given Reader
. In addition
this class provides a method to find out whether the purpose of the reader is
to extract text and whether the extraction process is already finished.isExtractorFinished()
Constructor and Description |
---|
LazyTextExtractorField(Parser parser,
org.apache.jackrabbit.core.value.InternalValue value,
Metadata metadata,
Executor executor,
boolean highlighting,
int maxFieldLength)
Creates a new
LazyTextExtractorField with the given
name . |
Modifier and Type | Method and Description |
---|---|
byte[] |
binaryValue() |
void |
dispose()
Releases all resources associated with this field.
|
boolean |
isExtractorFinished()
Checks whether the text extraction task has finished.
|
Reader |
readerValue() |
String |
stringValue()
Returns the extracted text.
|
org.apache.lucene.analysis.TokenStream |
tokenStreamValue() |
public LazyTextExtractorField(Parser parser, org.apache.jackrabbit.core.value.InternalValue value, Metadata metadata, Executor executor, boolean highlighting, int maxFieldLength)
LazyTextExtractorField
with the given
name
.name
- the name of the field.reader
- the reader where to obtain the string from.highlighting
- set to true
to enable result highlighting supportpublic String stringValue()
public Reader readerValue()
null
public byte[] binaryValue()
null
public org.apache.lucene.analysis.TokenStream tokenStreamValue()
null
public boolean isExtractorFinished()
true
if the extracted text is availablepublic void dispose()
Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.