Top Fields Constructors Methods
org.jabref.model.entry.field

public Class FieldFactory

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .Collection, .Collections, .Comparator, .EnumSet, .HashSet, .LinkedHashSet, .List, .SequencedSet, .Set, .TreeSet, java.util.function.Predicate, java.util.stream.Collectors, org.jabref.model.entry.types.EntryType, org.jabref.model.strings.StringUtil, org.jabref.model.util.OptionalUtil

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
FIELD_OR_SEPARATOR

Character separating field names that are to be used in sequence as fallbacks for a single column (e.g. "author/editor" to use editor where author is not set):

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static Set<Field>
public static Set<Field>
getAllFieldsWithOutInternal()

Returns a sorted Set of Fields (by Field#getDisplayName with all fields without internal ones

public static Set<Field>
public static Set<Field>
getCommonFields()

Returns a Set with all standard fields and including some common internal fields

public static List<Field>
getDefaultGeneralFields()

These are the fields JabRef always displays as default org.jabref.preferences.JabRefPreferences#setLanguageDependentDefaultValues()

A user can change them.

private static Set<Field>
public static Set<Field>
public static Collection<Field>
getNotTextFields()

Returns a collection of StandardFields where the content should not be interpreted as "plain" text, but something else (such as links to other fields, numbers, ...)

public static Set<Field>
public static SequencedSet<Field>
getStandardFieldsWithCitationKey()

Returns a list with all standard fields and the citation key field

public static boolean
public static boolean
isLatexField(Field field)

Checks whether the given field contains LaTeX code or something else

public static boolean
isMultiLineField(final Field field, List<Field> nonWrappableFields)

public static <T extends EntryType> Field
parseField(T type, String fieldName)

Type T is an entry type and is used to direct the mapping to the Java field class.

public static Field
parseField(String fieldName)

public static SequencedSet<Field>
parseFieldList(String fieldNames)

public static OrFields
parseOrFields(String fieldNames)

public static SequencedSet<OrFields>
public static String
public static String
public static String
public static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DELIMITERback to summary
private static final String DELIMITER
FIELD_OR_SEPARATORback to summary
private static final String FIELD_OR_SEPARATOR

Character separating field names that are to be used in sequence as fallbacks for a single column (e.g. "author/editor" to use editor where author is not set):

Constructor Detail

FieldFactoryback to summary
public FieldFactory()

Method Detail

getAllFieldsback to summary
private static Set<Field> getAllFields()
getAllFieldsWithOutInternalback to summary
public static Set<Field> getAllFieldsWithOutInternal()

Returns a sorted Set of Fields (by Field#getDisplayName with all fields without internal ones

getBookNameFieldsback to summary
public static Set<Field> getBookNameFields()
getCommonFieldsback to summary
public static Set<Field> getCommonFields()

Returns a Set with all standard fields and including some common internal fields

getDefaultGeneralFieldsback to summary
public static List<Field> getDefaultGeneralFields()

These are the fields JabRef always displays as default org.jabref.preferences.JabRefPreferences#setLanguageDependentDefaultValues()

A user can change them. The change is currently stored in the preferences only and not explicitly exposed as separate preferences object

getFieldsFilteredback to summary
private static Set<Field> getFieldsFiltered(Predicate<Field> selector)
getJournalNameFieldsback to summary
public static Set<Field> getJournalNameFields()
getNotTextFieldsback to summary
public static Collection<Field> getNotTextFields()

Returns a collection of StandardFields where the content should not be interpreted as "plain" text, but something else (such as links to other fields, numbers, ...)

getPersonNameFieldsback to summary
public static Set<Field> getPersonNameFields()
getStandardFieldsWithCitationKeyback to summary
public static SequencedSet<Field> getStandardFieldsWithCitationKey()

Returns a list with all standard fields and the citation key field

isInternalFieldback to summary
public static boolean isInternalField(Field field)
isLatexFieldback to summary
public static boolean isLatexField(Field field)

Checks whether the given field contains LaTeX code or something else

isMultiLineFieldback to summary
public static boolean isMultiLineField(final Field field, List<Field> nonWrappableFields)
parseFieldback to summary
public static <T extends EntryType> Field parseField(T type, String fieldName)

Type T is an entry type and is used to direct the mapping to the Java field class. This somehow acts as filter, BibLaTeX "APA" entry type has field "article", but we want to have StandardField (if not explicitly requested otherwise)

parseFieldback to summary
public static Field parseField(String fieldName)
parseFieldListback to summary
public static SequencedSet<Field> parseFieldList(String fieldNames)
parseOrFieldsback to summary
public static OrFields parseOrFields(String fieldNames)
parseOrFieldsListback to summary
public static SequencedSet<OrFields> parseOrFieldsList(String fieldNames)
serializeFieldsListback to summary
public static String serializeFieldsList(Collection<Field> fields)
serializeOrFieldsback to summary
public static String serializeOrFields(Field... fields)
serializeOrFieldsback to summary
public static String serializeOrFields(OrFields fields)
serializeOrFieldsListback to summary
public static String serializeOrFieldsList(Set<OrFields> fields)