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

public Class JabRefItemDataProvider

extends Object
implements ItemDataProvider
Class Inheritance
All Implemented Interfaces
de.undercouch.citeproc.ItemDataProvider
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, .DigitStringValue, .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 BibTeXConverter
private final List<BibEntry>
private BibEntryTypesManager
private PagesChecker
private final StringJsonBuilderFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private CSLItemData
bibEntryToCSLItemData(BibEntry originalBibEntry, BibDatabaseContext bibDatabaseContext, BibEntryTypesManager entryTypesManager)

Converts the BibEntry into CSLItemData.

public Collection<String>
public CSLItemData
retrieveItem(String id)

Implements de.undercouch.citeproc.ItemDataProvider.retrieveItem.

Retrieve a citation item with a given ID

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
toJson(BibEntry entry, 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 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 StringJsonBuilderFactory stringJsonBuilderFactory

Constructor Detail

JabRefItemDataProviderback to summary
public JabRefItemDataProvider()

Method Detail

bibEntryToCSLItemDataback to summary
private 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()

Implements de.undercouch.citeproc.ItemDataProvider.getIds.

Annotations
@Override
retrieveItemback to summary
public CSLItemData retrieveItem(String id)

Implements de.undercouch.citeproc.ItemDataProvider.retrieveItem.

Doc from de.undercouch.citeproc.ItemDataProvider.retrieveItem.

Retrieve a citation item with a given 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(BibEntry entry, BibDatabaseContext bibDatabaseContext, BibEntryTypesManager entryTypesManager)
toJsonback to summary
public String toJson()