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

public Class JabRefItemDataProvider

extends Object
implements de.undercouch.citeproc.ItemDataProvider
Class Inheritance
Imports
java.util.ArrayList, .Collection, .LinkedHashSet, .List, .Locale, .Optional, .SequencedCollection, java.util.stream.Collectors, org.jabref.logic.formatter.bibtexfields.RemoveNewlinesFormatter, org.jabref.logic.integrity.PagesChecker, org.jabref.model.database.BibDatabaseContext, .BibDatabaseMode, org.jabref.model.entry.BibEntry, .BibEntryType, .BibEntryTypesManager, .Month, org.jabref.model.entry.field.Field, .StandardField, org.jabref.model.entry.types.StandardEntryType, org.jabref.model.strings.LatexToUnicodeAdapter, de.undercouch.citeproc.ItemDataProvider, de.undercouch.citeproc.bibtex.BibTeXConverter, de.undercouch.citeproc.csl.CSLItemData, de.undercouch.citeproc.helper.json.StringJsonBuilderFactory, org.jbibtex.BibTeXEntry, org.jbibtex.DigitStringValue, org.jbibtex.Key

Custom ItemDataProvider that allows to set the data so that we don't have to instantiate a new CSL object every time.

Field Summary

Modifier and TypeField and Description
private BibDatabaseContext
private static final de.undercouch.citeproc.bibtex.BibTeXConverter
private final List<BibEntry>
private BibEntryTypesManager
private PagesChecker
private final de.undercouch.citeproc.helper.json.StringJsonBuilderFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private de.undercouch.citeproc.csl.CSLItemData
bibEntryToCSLItemData(BibEntry originalBibEntry, BibDatabaseContext bibDatabaseContext, BibEntryTypesManager entryTypesManager)

Converts the BibEntry into CSLItemData.

public Collection<String>
public de.undercouch.citeproc.csl.CSLItemData
public void
setData(BibDatabaseContext bibDatabaseContext, BibEntryTypesManager entryTypesManager)

Fills the data with all entries in given bibDatabaseContext

public void
setData(List<BibEntry> data, BibDatabaseContext bibDatabaseContext, BibEntryTypesManager entryTypesManager)

public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bibDatabaseContextback to summary
private BibDatabaseContext bibDatabaseContext
BIBTEX_CONVERTERback to summary
private static final de.undercouch.citeproc.bibtex.BibTeXConverter BIBTEX_CONVERTER
databack to summary
private final List<BibEntry> data
entryTypesManagerback to summary
private BibEntryTypesManager entryTypesManager
pagesCheckerback to summary
private PagesChecker pagesChecker
stringJsonBuilderFactoryback to summary
private final de.undercouch.citeproc.helper.json.StringJsonBuilderFactory stringJsonBuilderFactory

Constructor Detail

JabRefItemDataProviderback to summary
public JabRefItemDataProvider()

Method Detail

bibEntryToCSLItemDataback to summary
private de.undercouch.citeproc.csl.CSLItemData bibEntryToCSLItemData(BibEntry originalBibEntry, BibDatabaseContext bibDatabaseContext, BibEntryTypesManager entryTypesManager)

Converts the BibEntry into CSLItemData.

BibTeX BibLaTeX EntryPreview/CSL proposed logic, conditions and info
volume volume volume
number issue issue For conversion to CSL or BibTeX: BibLaTeX number takes priority and supersedes BibLaTeX issue
number number issue same as above
pages eid number Some journals put the article-number (= eid) into the pages field. If BibLaTeX eid exists, provide csl number to the style. If pages exists, provide csl page. If eid WITHIN the pages field exists, detect the eid and provide csl number. If both eid and pages exists, ideally provide both csl number and csl page. Ideally the citationstyle should be able to flexibly choose the rendering.
pages pages page same as above
getIdsback to summary
public Collection<String> getIds()
Annotations
@Override
retrieveItemback to summary
public de.undercouch.citeproc.csl.CSLItemData retrieveItem(String id)
Annotations
@Override
setDataback to summary
public void setData(BibDatabaseContext bibDatabaseContext, BibEntryTypesManager entryTypesManager)

Fills the data with all entries in given bibDatabaseContext

setDataback to summary
public void setData(List<BibEntry> data, BibDatabaseContext bibDatabaseContext, BibEntryTypesManager entryTypesManager)
toJsonback to summary
public String toJson()