Verified Owner
Top Constructors Methods
org.jabref.model.entry

public Class CanonicalBibEntry

extends Object
Class Inheritance
Imports
java.util.HashMap, .Locale, .Map, .Map.Entry, .SortedSet, .StringJoiner, .TreeSet, org.jabref.model.entry.field.Field, .InternalField

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String
getCanonicalRepresentation(BibEntry entry)

This returns a canonical BibTeX serialization.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CanonicalBibEntryback to summary
private CanonicalBibEntry()

Method Detail

getCanonicalRepresentationback to summary
public static String getCanonicalRepresentation(BibEntry entry)

This returns a canonical BibTeX serialization. The result is close to BibTeX, but not a valid BibTeX representation in all cases

  • Serializes all fields, even the JabRef internal ones.
  • Does NOT serialize "KEY_FIELD" as field, but as key.
  • Special characters such as "{" or "&" are NOT escaped, but written as is.
  • New lines are written as is.
  • String constants are not handled. That means, month = apr in a bib file gets month = {#apr#}. This indicates that the month field is correctly stored.