Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.formatter.casechanger

public Class ProtectTermsFormatter

extends Formatter
Class Inheritance
Imports
java.util.List, org.jabref.logic.formatter.Formatter, org.jabref.logic.l10n.Localization, org.jabref.logic.protectedterms.ProtectedTermsLoader, org.jabref.logic.util.strings.StringLengthComparator, org.jspecify.annotations.NonNull

Adds {} brackets around acronyms, month names and countries to preserve their case. Related formatter: org.jabref.logic.formatter.bibtexfields.RemoveEnclosingBracesFormatter

Field Summary

Modifier and TypeField and Description
private final ProtectedTermsLoader

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private String
format(String text, List<String> listOfWords)

public String
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

Inherited from org.jabref.logic.formatter.Formatter:
equalsformathashCode

Field Detail

protectedTermsLoaderback to summary
private final ProtectedTermsLoader protectedTermsLoader

Constructor Detail

ProtectTermsFormatterback to summary
public ProtectTermsFormatter(ProtectedTermsLoader protectedTermsLoader)

Method Detail

formatback to summary
private String format(String text, List<String> listOfWords)
formatback to summary
public String format(@NonNull String text)
Annotations
@Override
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