Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.search.sqlbased.indexing

public final Class DocumentReader

extends Object
Class Inheritance
Imports
java.io.IOException, java.nio.file.Files, .Path, java.util.ArrayList, .List, .Objects, java.util.concurrent.TimeUnit, java.util.regex.Pattern, org.jabref.logic.util.strings.StringUtil, org.apache.lucene.document.Document, org.apache.lucene.document.Field, org.apache.lucene.document.StringField, org.apache.lucene.document.TextField, org.apache.pdfbox.Loader, org.apache.pdfbox.pdmodel.PDDocument, .PDPage, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation, org.apache.pdfbox.text.PDFTextStripper, org.slf4j.Logger, .LoggerFactory, .MDC

Utility class for reading the data from LinkedFiles of a BibEntry for Lucene.

Field Summary

Modifier and TypeField and Description
private static final Pattern
private static final Pattern
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
addContentIfNotEmpty(PDDocument pdfDocument, org.apache.lucene.document.Document newDocument, Path resolvedPath, int pageNumber)

private void
addIdentifiers(org.apache.lucene.document.Document newDocument, String path)

private void
addMetaData(org.apache.lucene.document.Document newDocument, Path resolvedPdfPath, int pageNumber)

private void
addStringField(org.apache.lucene.document.Document newDocument, String field, String value)

private boolean
public static String
public List<org.apache.lucene.document.Document>
readPdfContents(String fileLink, Path resolvedPdfPath)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HYPHEN_LINEBREAK_PATTERNback to summary
private static final Pattern HYPHEN_LINEBREAK_PATTERN
LINEBREAK_WITHOUT_PERIOD_PATTERNback to summary
private static final Pattern LINEBREAK_WITHOUT_PERIOD_PATTERN
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

DocumentReaderback to summary
public DocumentReader()

Method Detail

addContentIfNotEmptyback to summary
private void addContentIfNotEmpty(PDDocument pdfDocument, org.apache.lucene.document.Document newDocument, Path resolvedPath, int pageNumber)
addIdentifiersback to summary
private void addIdentifiers(org.apache.lucene.document.Document newDocument, String path)
addMetaDataback to summary
private void addMetaData(org.apache.lucene.document.Document newDocument, Path resolvedPdfPath, int pageNumber)
addStringFieldback to summary
private void addStringField(org.apache.lucene.document.Document newDocument, String field, String value)
isValidFieldback to summary
private boolean isValidField(String value)
mergeLinesback to summary
public static String mergeLines(String text)
readPdfContentsback to summary
public List<org.apache.lucene.document.Document> readPdfContents(String fileLink, Path resolvedPdfPath)