Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.citationstyle

public Class CitationStyleGenerator

extends Object
Class Inheritance
Imports
java.io.IOException, java.util.List, .Optional, org.jabref.logic.l10n.Localization, org.jabref.model.database.BibDatabase, .BibDatabaseContext, .BibDatabaseMode, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, de.undercouch.citeproc.output.Bibliography, org.jbibtex.TokenMgrException, org.slf4j.Logger, .LoggerFactory

Facade to unify the access to the citation style engine. Use these methods if you need rendered BibTeX item(s) in a given journal style. This class uses CSLAdapter to create output.

Field Summary

Modifier and TypeField and Description
private static final CSLAdapter
private static final Logger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected static String
generateBibliography(List<BibEntry> bibEntries, String style, BibEntryTypesManager entryTypesManager)

Generates a bibliography list in HTML format based on a given list of entries and .csl style source content with a default BibDatabaseContext.

public static List<String>
generateBibliography(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager)

Generates a bibliography list based on a given list of entries, .csl style source content and output format with a given BibDatabaseContext.

public static Optional<List<String>>
generateBibliographyEntryIds(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager)

public static Optional<Bibliography>
generateBibliographyObject(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager)

public static String
generateCitation(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager)

Generates a citation based on a given list of entries, .csl style source content and output format with a given BibDatabaseContext.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CSL_ADAPTERback to summary
private static final CSLAdapter CSL_ADAPTER
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

CitationStyleGeneratorback to summary
private CitationStyleGenerator()

Method Detail

generateBibliographyback to summary
protected static String generateBibliography(List<BibEntry> bibEntries, String style, BibEntryTypesManager entryTypesManager)

Generates a bibliography list in HTML format based on a given list of entries and .csl style source content with a default BibDatabaseContext.

Implementation Note

The bibliography is generated using an external library which may take some time, debatable if it is better to call it from outside the main Thread.

generateBibliographyback to summary
public static List<String> generateBibliography(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager)

Generates a bibliography list based on a given list of entries, .csl style source content and output format with a given BibDatabaseContext.

Implementation Note

The bibliographies are generated using an external library which may take some time, debatable if it is better to call it from outside the main Thread.

generateBibliographyEntryIdsback to summary
public static Optional<List<String>> generateBibliographyEntryIds(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager)
generateBibliographyObjectback to summary
public static Optional<Bibliography> generateBibliographyObject(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager)
generateCitationback to summary
public static String generateCitation(List<BibEntry> bibEntries, String style, CitationStyleOutputFormat outputFormat, BibDatabaseContext databaseContext, BibEntryTypesManager entryTypesManager)

Generates a citation based on a given list of entries, .csl style source content and output format with a given BibDatabaseContext.

Implementation Note

The citation is generated using an external library which may take some time, debatable if it is better to call it from outside the main Thread.