Verified Owner
Top Description Constructors Methods
org.jabref.logic.formatter.bibtexfields

public final Class KeywordSeparatorMigration

extends Object
Class Inheritance
Annotations
@NullMarked
Imports
java.util.ArrayList, .List, .Optional, org.jabref.model.FieldChange, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, .KeywordList, org.jabref.model.entry.field.StandardField, org.jabref.model.groups.AbstractGroup, .AutomaticKeywordGroup, .WordKeywordGroup, org.jabref.model.metadata.MetaData, org.jspecify.annotations.NullMarked

Migrates keyword-aware data when a library's keyword separator changes.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static List<FieldChange>
migrateEntryFields(BibDatabaseContext databaseContext, Character previousSeparator, Character newSeparator)

Rewrites keywords and groups fields using the new separator.

private static Optional<FieldChange>
migrateField(BibEntry entry, StandardField field, Character previousSeparator, Character newSeparator)

public static void
migrateGroupSeparators(MetaData metaData, Character newSeparator)

Updates group definitions that capture a keyword separator.

private static AbstractGroup
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

KeywordSeparatorMigrationback to summary
private KeywordSeparatorMigration()

Method Detail

migrateEntryFieldsback to summary
public static List<FieldChange> migrateEntryFields(BibDatabaseContext databaseContext, Character previousSeparator, Character newSeparator)

Rewrites keywords and groups fields using the new separator.

migrateFieldback to summary
private static Optional<FieldChange> migrateField(BibEntry entry, StandardField field, Character previousSeparator, Character newSeparator)
migrateGroupSeparatorsback to summary
public static void migrateGroupSeparators(MetaData metaData, Character newSeparator)

Updates group definitions that capture a keyword separator.

Records nothing: the nodes are edited in place, and a record holding them would be undone silently once a later group operation installed a fresh tree. The caller records the tree, or the metadata holding it, as a whole.

withKeywordSeparatorback to summary
private static AbstractGroup withKeywordSeparator(AbstractGroup group, Character newSeparator)