Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.layout.format

public Class Authors

extends AbstractParamLayoutFormatter
Class Inheritance
Imports
java.util.ArrayList, .List, .Locale, java.util.regex.Pattern, org.jabref.logic.layout.AbstractParamLayoutFormatter, org.jabref.model.entry.Author, .AuthorList

Versatile author name formatter that takes arguments to control the formatting style.

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private boolean
private static final String
private static final String
private static final List<String>
private static final List<String>
private static final List<String>
private int
private static final String
private static final String
private String
private static final int
private boolean
private int
private static final int
private static final List<String>
private String
private boolean
private String
private static final int
private int
private boolean
private static final Pattern
private static final String
private static final String
private String
private static final List<String>
private boolean
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
addSingleName(StringBuilder sb, Author a, boolean firstFirst)

private static boolean

Returns:

true if the strings are deemed equal
comp
(String
The first string - whitespace is trimmed
one
,
String
The second string
two
)

Check for case-insensitive equality between two strings after removing white space at the beginning and end of the first string.

public String
format(String fieldText)

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

Failure Mode:

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

private void
public void
setArgument(String arg)

Implements org.jabref.logic.layout.ParamLayoutFormatter.setArgument.

Method for setting the argument of this formatter.

Inherited from org.jabref.logic.layout.AbstractParamLayoutFormatter:
parseArgument

Field Detail

abbrDotsback to summary
private boolean abbrDots
abbreviateback to summary
private boolean abbreviate
abbrSpacesback to summary
private boolean abbrSpaces
AMPback to summary
private static final String AMP
ANDback to summary
private static final String AND
AUTHOR_ABRVback to summary
private static final List<String> AUTHOR_ABRV
AUTHOR_ORDERback to summary
private static final List<String> AUTHOR_ORDER
AUTHOR_PUNCback to summary
private static final List<String> AUTHOR_PUNC
authorNumberEtAlback to summary
private int authorNumberEtAl
COLONback to summary
private static final String COLON
COMMAback to summary
private static final String COMMA
etAlStringback to summary
private String etAlString
FIRST_FIRSTback to summary
private static final int FIRST_FIRST
firstInitialOnlyback to summary
private boolean firstInitialOnly
flModeback to summary
private int flMode
LAST_FIRSTback to summary
private static final int LAST_FIRST
LAST_SEPARATORSback to summary
private static final List<String> LAST_SEPARATORS
lastFirstSeparatorback to summary
private String lastFirstSeparator
lastNameOnlyback to summary
private boolean lastNameOnly
lastSeparatorback to summary
private String lastSeparator
LF_FFback to summary
private static final int LF_FF
maxAuthorsback to summary
private int maxAuthors
middleInitialback to summary
private boolean middleInitial
NUMBER_PATTERNback to summary
private static final Pattern NUMBER_PATTERN
OXFORDback to summary
private static final String OXFORD
SEMICOLONback to summary
private static final String SEMICOLON
separatorback to summary
private String separator
SEPARATORSback to summary
private static final List<String> SEPARATORS
setMaxAuthorsback to summary
private boolean setMaxAuthors
setSepback to summary
private boolean setSep

Constructor Detail

Authorsback to summary
public Authors()

Method Detail

addSingleNameback to summary
private void addSingleName(StringBuilder sb, Author a, boolean firstFirst)
compback to summary
private static boolean comp(String one, String two)

Check for case-insensitive equality between two strings after removing white space at the beginning and end of the first string.

Parameters
one:String

The first string - whitespace is trimmed

two:String

The second string

Returns:boolean

true if the strings are deemed equal

formatback to summary
public String format(String fieldText)

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
handleArgumentback to summary
private void handleArgument(String key, String value)
setArgumentback to summary
public void setArgument(String arg)

Implements org.jabref.logic.layout.ParamLayoutFormatter.setArgument.

Doc from org.jabref.logic.layout.ParamLayoutFormatter.setArgument.

Method for setting the argument of this formatter.

Annotations
@Override