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

public Class BibFieldsIndexer

extends Object
Class Inheritance
Imports
java.sql.Connection, .PreparedStatement, .SQLException, java.util.Arrays, .Collection, .List, .Map, .Optional, .Set, java.util.regex.Pattern, org.jabref.logic.l10n.Localization, org.jabref.logic.util.BackgroundTask, .HeadlessExecutorService, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.AuthorList, .BibEntry, .BibEntryPreferences, .KeywordList, org.jabref.model.entry.field.Field, .FieldProperty, .StandardField, org.jabref.model.search.PostgresConstants, org.jabref.model.strings.LatexToUnicodeAdapter, io.github.thibaultmeyer.cuid.CUID, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final Connection
private final BibDatabaseContext
private static final Set<Field>
private static final Pattern
private final Character
private final String
private static final Logger
private final String
private final String
private final String
private final String

Constructor Summary

AccessConstructor and Description
public
BibFieldsIndexer(BibEntryPreferences bibEntryPreferences, BibDatabaseContext databaseContext, Connection connection)

Method Summary

Modifier and TypeMethod and Description
private static void
addAuthors(String value, PreparedStatement preparedStatementSplitValues, String entryId, Field field)

private static void
addBatch(PreparedStatement preparedStatement, String entryId, Field field, String value)

private static void
addBatch(PreparedStatement preparedStatement, String entryId, Field field, String value, String normalized)

The values are passed as they should be inserted into the database table

private static void
addGroups(String value, PreparedStatement preparedStatementSplitValues, String entryId, Field field)

private static void
addKeywords(String keywordsString, PreparedStatement preparedStatementSplitValues, String entryId, Field field, Character keywordSeparator)

public void
private void
addToIndex(BibEntry bibEntry)

public void
public void
private void
public String
private void
insertField(BibEntry entry, Field field)

private void
removeField(BibEntry entry, Field field)

public void
private void
private void
setup()

Creates a table for the library in the database, and sets up indexes on the columns.

public void
updateEntry(BibEntry entry, Field field)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectionback to summary
private final Connection connection
databaseContextback to summary
private final BibDatabaseContext databaseContext
DATE_FIELDSback to summary
private static final Set<Field> DATE_FIELDS
GROUPS_SEPARATOR_REGEXback to summary
private static final Pattern GROUPS_SEPARATOR_REGEX
keywordSeparatorback to summary
private final Character keywordSeparator
libraryNameback to summary
private final String libraryName
LOGGERback to summary
private static final Logger LOGGER
mainTableback to summary
private final String mainTable
schemaMainTableReferenceback to summary
private final String schemaMainTableReference
schemaSplitValuesTableReferenceback to summary
private final String schemaSplitValuesTableReference
splitValuesTableback to summary
private final String splitValuesTable

Constructor Detail

BibFieldsIndexerback to summary
public BibFieldsIndexer(BibEntryPreferences bibEntryPreferences, BibDatabaseContext databaseContext, Connection connection)

Method Detail

addAuthorsback to summary
private static void addAuthors(String value, PreparedStatement preparedStatementSplitValues, String entryId, Field field)
addBatchback to summary
private static void addBatch(PreparedStatement preparedStatement, String entryId, Field field, String value)
addBatchback to summary
private static void addBatch(PreparedStatement preparedStatement, String entryId, Field field, String value, String normalized)

The values are passed as they should be inserted into the database table

addGroupsback to summary
private static void addGroups(String value, PreparedStatement preparedStatementSplitValues, String entryId, Field field)
addKeywordsback to summary
private static void addKeywords(String keywordsString, PreparedStatement preparedStatementSplitValues, String entryId, Field field, Character keywordSeparator)
addToIndexback to summary
public void addToIndex(List<BibEntry> entries, BackgroundTask<?> task)
addToIndexback to summary
private void addToIndex(BibEntry bibEntry)
closeback to summary
public void close()
closeAndWaitback to summary
public void closeAndWait()
closeIndexback to summary
private void closeIndex()
getTableback to summary
public String getTable()
insertFieldback to summary
private void insertField(BibEntry entry, Field field)
removeFieldback to summary
private void removeField(BibEntry entry, Field field)
removeFromIndexback to summary
public void removeFromIndex(Collection<BibEntry> entries, BackgroundTask<?> task)
removeFromIndexback to summary
private void removeFromIndex(BibEntry entry)
setupback to summary
private void setup()

Creates a table for the library in the database, and sets up indexes on the columns.

updateEntryback to summary
public void updateEntry(BibEntry entry, Field field)
updateOnStartback to summary
public void updateOnStart(BackgroundTask<?> task)