Top Fields Constructors Methods
org.jabref.logic.integrity

public Class EditionChecker

extends Object
implements ValueChecker
Class Inheritance
All Implemented Interfaces
org.jabref.logic.integrity.ValueChecker
Imports
java.util.Objects, .Optional, java.util.function.Predicate, java.util.regex.Pattern, org.jabref.logic.l10n.Localization, org.jabref.model.database.BibDatabaseContext, org.jabref.model.strings.StringUtil

Field Summary

Modifier and TypeField and Description
private final boolean
private final BibDatabaseContext
private static final String
private static final Predicate<String>
private static final Predicate<String>
private static final Predicate<String>

Constructor Summary

AccessConstructor and Description
public
EditionChecker(BibDatabaseContext bibDatabaseContext, boolean allowIntegerEdition)

Method Summary

Modifier and TypeMethod and Description
public Optional<String>
checkValue(String value)

Implements org.jabref.logic.integrity.ValueChecker.checkValue.

Checks, if field contains only an integer or a literal (biblatex mode) Checks, if the first letter is capitalized (BibTeX mode) biblatex package documentation: The edition of a printed publication.

pack-priv boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allowIntegerEditionback to summary
private final boolean allowIntegerEdition
bibDatabaseContextEditionback to summary
private final BibDatabaseContext bibDatabaseContextEdition
FIRST_EDITIONback to summary
private static final String FIRST_EDITION
FIRST_LETTER_CAPITALIZEDback to summary
private static final Predicate<String> FIRST_LETTER_CAPITALIZED
ONLY_NUMERALSback to summary
private static final Predicate<String> ONLY_NUMERALS
ONLY_NUMERALS_OR_LITERALSback to summary
private static final Predicate<String> ONLY_NUMERALS_OR_LITERALS

Constructor Detail

EditionCheckerback to summary
public EditionChecker(BibDatabaseContext bibDatabaseContext, boolean allowIntegerEdition)

Method Detail

checkValueback to summary
public Optional<String> checkValue(String value)

Implements org.jabref.logic.integrity.ValueChecker.checkValue.

Checks, if field contains only an integer or a literal (biblatex mode) Checks, if the first letter is capitalized (BibTeX mode) biblatex package documentation: The edition of a printed publication. This must be an integer, not an ordinal. It is also possible to give the edition as a literal string, for example "Third, revised and expanded edition". Official BibTeX specification: The edition of a book-for example, "Second". This should be an ordinal, and should have the first letter capitalized.

Returns:Optional<String>

Doc from org.jabref.logic.integrity.ValueChecker.checkValue.

Validation error message

Annotations
@Override
isFirstCharDigitback to summary
pack-priv boolean isFirstCharDigit(String input)