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

public Class ConvertMSCCodesFormatter

extends Formatter
implements LayoutFormatter, KeywordSeparatorAware
Class Inheritance
All Implemented Interfaces
org.jabref.logic.cleanup.KeywordSeparatorAware, org.jabref.logic.layout.LayoutFormatter
Imports
java.util.List, .Optional, org.jabref.logic.cleanup.KeywordSeparatorAware, org.jabref.logic.formatter.Formatter, org.jabref.logic.l10n.Localization, org.jabref.logic.layout.LayoutFormatter, org.jabref.logic.msc.MscCodeRepository, org.jabref.logic.preferences.JabRefCliPreferences, org.jabref.logic.util.MscCodeUtils, org.jabref.model.entry.Keyword, .KeywordList, com.airhacks.afterburner.injection.Injector, com.google.common.annotations.VisibleForTesting, org.jspecify.annotations.NonNull, .Nullable

Field Summary

Modifier and TypeField and Description
private final @Nullable JabRefCliPreferences
private final @Nullable Character

Constructor Summary

AccessConstructor and Description
public
pack-priv
private

Method Summary

Modifier and TypeMethod and Description
public @NonNull String
format(@NonNull String text)

Implements org.jabref.logic.layout.LayoutFormatter.format.

Failure Mode:

Formatters should be robust in the sense that they always return some relevant string.

private JabRefCliPreferences
public String
getDescription()

Implements abstract org.jabref.logic.formatter.Formatter.getDescription.

Returns a description of the formatter.

public String
getExampleInput()

Implements abstract org.jabref.logic.formatter.Formatter.getExampleInput.

Returns an example input string of the formatter.

public String
getKey()

Implements abstract org.jabref.logic.formatter.Formatter.getKey.

Returns a unique key for the formatter that can be used for its identification

public String
getName()

Implements abstract org.jabref.logic.formatter.Formatter.getName.

Returns a human readable name of the formatter usable for e.g. in the GUI

public static void
public Formatter
Inherited from org.jabref.logic.formatter.Formatter:
equalsformathashCode

Field Detail

cliPreferencesback to summary
private final @Nullable JabRefCliPreferences cliPreferences
keywordSeparatorback to summary
private final @Nullable Character keywordSeparator

Constructor Detail

ConvertMSCCodesFormatterback to summary
public ConvertMSCCodesFormatter()
ConvertMSCCodesFormatterback to summary
pack-priv ConvertMSCCodesFormatter(@Nullable JabRefCliPreferences cliPreferences)
ConvertMSCCodesFormatterback to summary
private ConvertMSCCodesFormatter(@Nullable JabRefCliPreferences cliPreferences, @Nullable Character keywordSeparator)

Method Detail

formatback to summary
public @NonNull String format(@NonNull String text)

Implements org.jabref.logic.layout.LayoutFormatter.format.

Doc from org.jabref.logic.layout.LayoutFormatter.format.

Failure Mode:

Formatters should be robust in the sense that they always return some relevant string.

If the formatter can detect an invalid input it should return the original string otherwise it may simply return a wrong output.

Annotations
@Override
getCliPreferencesback to summary
private JabRefCliPreferences getCliPreferences()
getDescriptionback to summary
public String getDescription()

Implements abstract org.jabref.logic.formatter.Formatter.getDescription.

Doc from org.jabref.logic.formatter.Formatter.getDescription.

Returns a description of the formatter.

Annotations
@Override
getExampleInputback to summary
public String getExampleInput()

Implements abstract org.jabref.logic.formatter.Formatter.getExampleInput.

Doc from org.jabref.logic.formatter.Formatter.getExampleInput.

Returns an example input string of the formatter. This example is used as input to the formatter to demonstrate its functionality

Annotations
@Override
getKeyback to summary
public String getKey()

Implements abstract org.jabref.logic.formatter.Formatter.getKey.

Doc from org.jabref.logic.formatter.Formatter.getKey.

Returns a unique key for the formatter that can be used for its identification

Annotations
@Override
getNameback to summary
public String getName()

Implements abstract org.jabref.logic.formatter.Formatter.getName.

Doc from org.jabref.logic.formatter.Formatter.getName.

Returns a human readable name of the formatter usable for e.g. in the GUI

Annotations
@Override
setMscCodesback to summary
public static void setMscCodes(MscCodeRepository repository)
Annotations
@VisibleForTesting
withKeywordSeparatorback to summary
public Formatter withKeywordSeparator(@NonNull Character keywordSeparator)

Implements org.jabref.logic.cleanup.KeywordSeparatorAware.withKeywordSeparator.

Annotations
@Override