Verified Owner
Top Fields Constructors Methods
org.jabref.logic.openoffice.style

pack-priv Class JStyleGetNumericCitationMarker

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, .Optional, org.jabref.model.openoffice.ootext.OOText, org.jabref.model.openoffice.style.CitationMarkerNumericBibEntry, .CitationMarkerNumericEntry, .PageInfo

Field Summary

Modifier and TypeField and Description
public static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static int
compareCitationMarkerNumericEntry(CitationMarkerNumericEntry a, CitationMarkerNumericEntry b)

Defines sort order for CitationMarkerNumericEntry.

private static void
emitBlock(List<CitationMarkerNumericEntry> block, JStyle style, int minGroupingCount, StringBuilder stringBuilder)

public static OOText

Returns:

The text for the citation.
getNumCitationMarker2
(JStyle style, List<CitationMarkerNumericEntry>
Provide the citation numbers.
entries
,
int
Zero and negative means never group. Only used by tests to override the value in style.
minGroupingCount
)

Format a number-based citation marker for the given number or numbers.

public static OOText

Returns:

"[${number}]" where "[" stands for BRACKET_BEFORE_IN_LIST (with fallback BRACKET_BEFORE) "]" stands for BRACKET_AFTER_IN_LIST (with fallback BRACKET_AFTER) "${number}" stands for the formatted number.
getNumCitationMarkerForBibliography
(JStyle style, CitationMarkerNumericBibEntry entry)

Create a numeric marker for use in the bibliography as label for the entry.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

UNRESOLVED_ENTRY_NUMBERback to summary
public static final int UNRESOLVED_ENTRY_NUMBER

Constructor Detail

JStyleGetNumericCitationMarkerback to summary
private JStyleGetNumericCitationMarker()

Method Detail

compareCitationMarkerNumericEntryback to summary
private static int compareCitationMarkerNumericEntry(CitationMarkerNumericEntry a, CitationMarkerNumericEntry b)

Defines sort order for CitationMarkerNumericEntry.

emitBlockback to summary
private static void emitBlock(List<CitationMarkerNumericEntry> block, JStyle style, int minGroupingCount, StringBuilder stringBuilder)
getNumCitationMarker2back to summary
public static OOText getNumCitationMarker2(JStyle style, List<CitationMarkerNumericEntry> entries, int minGroupingCount)

Format a number-based citation marker for the given number or numbers.

An Optional.empty() number means: could not look this up in the databases. Positive integers are the valid numbers.

Duplicate citation numbers are allowed:

  • If their pageInfos are identical, only a single instance is emitted.

  • If their pageInfos differ, the number is emitted with each distinct pageInfo.

pageInfos are expected to be normalized

Parameters
entries:List<CitationMarkerNumericEntry>

Provide the citation numbers.

minGroupingCount:int

Zero and negative means never group. Only used by tests to override the value in style.

Returns:OOText

The text for the citation.

getNumCitationMarkerForBibliographyback to summary
public static OOText getNumCitationMarkerForBibliography(JStyle style, CitationMarkerNumericBibEntry entry)

Create a numeric marker for use in the bibliography as label for the entry.

To support for example numbers in superscript without brackets for the text, but "1" form for the bibliography, the style can provide the optional "BracketBeforeInList" and "BracketAfterInList" strings to be used in the bibliography instead of "BracketBefore" and "BracketAfter"

Returns:OOText

"[${number}]" where "[" stands for BRACKET_BEFORE_IN_LIST (with fallback BRACKET_BEFORE) "]" stands for BRACKET_AFTER_IN_LIST (with fallback BRACKET_AFTER) "${number}" stands for the formatted number.