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

public final Class KeywordImportNormalizer

extends Object
Class Inheritance
Annotations
@NullMarked
Imports
java.util.HashMap, .LinkedHashSet, .List, .Map, .Optional, .SequencedSet, org.jabref.logic.cleanup.FieldFormatterCleanup, org.jabref.logic.formatter.Formatter, org.jabref.logic.formatter.bibtexfields.NormalizeKeywordDelimitersFormatter, org.jabref.model.entry.BibEntry, .BibEntryPreferences, .Keyword, .KeywordList, org.jabref.model.entry.field.StandardField, org.jspecify.annotations.NonNull, .NullMarked, .Nullable

Field Summary

Modifier and TypeField and Description
private static final List<Character>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Optional<Character>
guessSeparator(Iterable<BibEntry> entries, BibEntryPreferences preferences)

Guesses the separator the given entries already use: the configured import delimiter occurring most often in keyword fields.

public static void
public static void
public static void
public static void
normalizeKeywords(BibEntry entry, BibEntryPreferences preferences, @Nullable Character requestedSeparator)

Applies NormalizeKeywordDelimitersFormatter to the entry, i.e. the same cleanup that is available as a save action.

public static List<Character>
private static List<Character>
splitDelimiters(@NonNull String configuredDelimiters)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_IMPORT_KEYWORD_DELIMITERSback to summary
private static final List<Character> DEFAULT_IMPORT_KEYWORD_DELIMITERS

Constructor Detail

KeywordImportNormalizerback to summary
private KeywordImportNormalizer()

Method Detail

guessSeparatorback to summary
public static Optional<Character> guessSeparator(Iterable<BibEntry> entries, BibEntryPreferences preferences)

Guesses the separator the given entries already use: the configured import delimiter occurring most often in keyword fields. Only effective delimiters count (top level, not escaped, not inside braces), matching how KeywordList parses. Empty if no keyword field contains any delimiter, or if two delimiters are tied (then the caller's fallback applies).

normalizeKeywordsback to summary
public static void normalizeKeywords(Iterable<BibEntry> entries, BibEntryPreferences preferences)

impl->req~import.bibtex.keywords.normalize-delimiters~1

normalizeKeywordsback to summary
public static void normalizeKeywords(Iterable<BibEntry> entries, BibEntryPreferences preferences, @Nullable Character separator)
normalizeKeywordsback to summary
public static void normalizeKeywords(BibEntry entry, BibEntryPreferences preferences)
normalizeKeywordsback to summary
public static void normalizeKeywords(BibEntry entry, BibEntryPreferences preferences, @Nullable Character requestedSeparator)

Applies NormalizeKeywordDelimitersFormatter to the entry, i.e. the same cleanup that is available as a save action.

parseConfiguredDelimitersback to summary
public static List<Character> parseConfiguredDelimiters(@Nullable String configuredDelimiters)
splitDelimitersback to summary
private static List<Character> splitDelimiters(@NonNull String configuredDelimiters)