Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.citation.repository

public Class MVStoreBibEntryRelationRepository

extends Object
implements BibEntryRelationRepository
Class Inheritance
All Implemented Interfaces
org.jabref.logic.citation.repository.BibEntryRelationRepository
Imports
java.time.Clock, .LocalDateTime, .ZoneId, java.util.LinkedHashSet, .List, javafx.beans.property.ObjectProperty, org.jabref.logic.bibtex.FieldPreferences, org.jabref.logic.importer.ImportFormatPreferences, org.jabref.logic.importer.fetcher.citation.CitationFetcherType, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, com.google.common.annotations.VisibleForTesting, org.h2.mvstore.MVMap, .MVStore, org.h2.mvstore.type.BasicDataType, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

This class is responsible for storing and retrieving relations between BibEntry objects. It uses an MVStore to store the relations.

Field Summary

Modifier and TypeField and Description
private final ObjectProperty<CitationFetcherType>
private static final Clock
private final MVMap<String, LocalDateTime>
private static final Logger
private static final String
private final MVMap<String, LinkedHashSet<BibEntry>>
private final int
private static final ZoneId

Constructor Summary

AccessConstructor and Description
pack-priv
MVStoreBibEntryRelationRepository(MVStore mvStore, String mapName, int storeTTLInDays, BibEntryTypesManager entryTypesManager, ImportFormatPreferences importFormatPreferences, FieldPreferences fieldPreferences, ObjectProperty<CitationFetcherType> citationFetcherTypeProperty)

pack-priv
MVStoreBibEntryRelationRepository(MVStore mvStore, String mapName, int storeTTLInDays, BasicDataType<LinkedHashSet<BibEntry>> serializer, ObjectProperty<CitationFetcherType> citationFetcherTypeProperty)

Method Summary

Modifier and TypeMethod and Description
public synchronized void
addRelations(@NonNull BibEntry entry, @NonNull List<BibEntry> relations)

Implements org.jabref.logic.citation.repository.BibEntryRelationRepository.addRelations.

Allows insertion of empty list in order to keep track of insertion date for an entry.

public synchronized boolean
public List<BibEntry>
public synchronized boolean
pack-priv boolean
shouldUpdate(final BibEntry entry, final Clock clock)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

citationFetcherPropertyTypeback to summary
private final ObjectProperty<CitationFetcherType> citationFetcherPropertyType
CLOCKback to summary
private static final Clock CLOCK
insertionTimeStampMapback to summary
private final MVMap<String, LocalDateTime> insertionTimeStampMap
LOGGERback to summary
private static final Logger LOGGER
MAP_SUFFIX_TIME_STAMPback to summary
private static final String MAP_SUFFIX_TIME_STAMP
relationsMapback to summary
private final MVMap<String, LinkedHashSet<BibEntry>> relationsMap
storeTTLInDaysback to summary
private final int storeTTLInDays
TIME_STAMP_ZONE_IDback to summary
private static final ZoneId TIME_STAMP_ZONE_ID

Constructor Detail

MVStoreBibEntryRelationRepositoryback to summary
pack-priv MVStoreBibEntryRelationRepository(MVStore mvStore, String mapName, int storeTTLInDays, BibEntryTypesManager entryTypesManager, ImportFormatPreferences importFormatPreferences, FieldPreferences fieldPreferences, ObjectProperty<CitationFetcherType> citationFetcherTypeProperty)
Annotations
@VisibleForTesting
MVStoreBibEntryRelationRepositoryback to summary
pack-priv MVStoreBibEntryRelationRepository(MVStore mvStore, String mapName, int storeTTLInDays, BasicDataType<LinkedHashSet<BibEntry>> serializer, ObjectProperty<CitationFetcherType> citationFetcherTypeProperty)
Annotations
@VisibleForTesting

Method Detail

addRelationsback to summary
public synchronized void addRelations(@NonNull BibEntry entry, @NonNull List<BibEntry> relations)

Implements org.jabref.logic.citation.repository.BibEntryRelationRepository.addRelations.

Allows insertion of empty list in order to keep track of insertion date for an entry.

Annotations
@Override
containsKeyback to summary
public synchronized boolean containsKey(BibEntry entry)

Implements org.jabref.logic.citation.repository.BibEntryRelationRepository.containsKey.

Annotations
@Override
getRelationsback to summary
public List<BibEntry> getRelations(BibEntry entry)

Implements org.jabref.logic.citation.repository.BibEntryRelationRepository.getRelations.

Annotations
@Override
shouldUpdateback to summary
public synchronized boolean shouldUpdate(BibEntry entry)

Overrides default org.jabref.logic.citation.repository.BibEntryRelationRepository.shouldUpdate.

Annotations
@Override
shouldUpdateback to summary
pack-priv boolean shouldUpdate(final BibEntry entry, final Clock clock)
Annotations
@VisibleForTesting