Verified Owner
Top Fields Constructors Methods
org.jabref.logic.relatedwork

public Class RelatedWorkMatcher

extends Object
Class Inheritance
Annotations
@NullMarked
Imports
java.io.IOException, java.util.ArrayList, .List, .Map, .Optional, org.jabref.logic.FilePreferences, org.jabref.logic.database.DuplicateCheck, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, .LinkedFile, org.jspecify.annotations.NullMarked, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final DuplicateCheck
private static final Logger
private final RelatedWorkReferenceResolver
private final RelatedWorkTextParser

Constructor Summary

AccessConstructor and Description
public
RelatedWorkMatcher(RelatedWorkTextParser relatedWorkTextParser, RelatedWorkReferenceResolver relatedWorkReferenceResolver, DuplicateCheck duplicateCheck)

Method Summary

Modifier and TypeMethod and Description
private List<RelatedWorkMatchResult>
createMatchResults(BibEntry sourceEntry, List<RelatedWorkSnippet> relatedWorkSnippets, Map<String, BibEntry> referencesByMarker, BibDatabaseContext databaseContext)

private Optional<BibEntry>
findDuplicateBibEntry(BibEntry sourceEntry, BibEntry parsedReference, BibDatabaseContext databaseContext)

Find duplicate entry in library by parsedReference

public List<RelatedWorkMatchResult>

Returns:

List of matched result
matchRelatedWork
(BibDatabaseContext databaseContext, BibEntry
selected bib entry in library
sourceEntry
,
LinkedFile linkedFile, String relatedWorkText, FilePreferences filePreferences)

Try to find a matched bib entry in library

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

duplicateCheckback to summary
private final DuplicateCheck duplicateCheck
LOGGERback to summary
private static final Logger LOGGER
relatedWorkReferenceResolverback to summary
private final RelatedWorkReferenceResolver relatedWorkReferenceResolver
relatedWorkTextParserback to summary
private final RelatedWorkTextParser relatedWorkTextParser

Constructor Detail

RelatedWorkMatcherback to summary
public RelatedWorkMatcher(RelatedWorkTextParser relatedWorkTextParser, RelatedWorkReferenceResolver relatedWorkReferenceResolver, DuplicateCheck duplicateCheck)

Method Detail

createMatchResultsback to summary
private List<RelatedWorkMatchResult> createMatchResults(BibEntry sourceEntry, List<RelatedWorkSnippet> relatedWorkSnippets, Map<String, BibEntry> referencesByMarker, BibDatabaseContext databaseContext)
findDuplicateBibEntryback to summary
private Optional<BibEntry> findDuplicateBibEntry(BibEntry sourceEntry, BibEntry parsedReference, BibDatabaseContext databaseContext)

Find duplicate entry in library by parsedReference

matchRelatedWorkback to summary
public List<RelatedWorkMatchResult> matchRelatedWork(BibDatabaseContext databaseContext, BibEntry sourceEntry, LinkedFile linkedFile, String relatedWorkText, FilePreferences filePreferences) throws IOException

Try to find a matched bib entry in library

Parameters
sourceEntry:BibEntry

selected bib entry in library

Returns:List<RelatedWorkMatchResult>

List of matched result