Verified Owner
Top Fields Constructors Methods
org.jabref.logic.git.merge.planning.util

public final Class AutoPlan

extends Object
Class Inheritance
Imports
java.util.List, .Map, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.Field

Field Summary

Modifier and TypeField and Description
private static final FieldPatchComputer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
generateAutoPlanForKey(String key, BibEntry baseEntry, BibEntry localEntry, BibEntry remoteEntry, Map<String, Map<Field, String>> fieldPatches, List<BibEntry> newEntries, List<String> deletedEntryKeys)

Generate the safe auto-merge plan for a single citation key.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

PATCHERback to summary
private static final FieldPatchComputer PATCHER

Constructor Detail

AutoPlanback to summary
public AutoPlan()

Method Detail

generateAutoPlanForKeyback to summary
public static void generateAutoPlanForKey(String key, BibEntry baseEntry, BibEntry localEntry, BibEntry remoteEntry, Map<String, Map<Field, String>> fieldPatches, List<BibEntry> newEntries, List<String> deletedEntryKeys)

Generate the safe auto-merge plan for a single citation key.

Precondition

this key has passed the semantic conflict gate.

Rules:

  • base == null: B0) only local added -> NO-OP (remote − base is empty) B1) both added & no overlapping-field disagreement -> add union entry B2) only remote added -> add remote entry
  • base != null: B3) remote deleted -> accept deletion if local kept base OR local also deleted B4) otherwise field-level patch: (remote − base) applied where local == base

Notes:

  • We mutate the supplied collections (fieldPatches/newEntries/deletedEntryKeys).
  • This method is side-effect free for all other state.