Package writer2latex.base
Class BibliographyGenerator
java.lang.Object
writer2latex.base.BibliographyGenerator
This class is used to generate bibliographic references and a bibliography.
Bibliographies are generated from a list of items (text:bibliograpy-mark), a global configuration
(text:bibliography-configuration) and a formatting template (text:bibliography-source)
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBibliographyGenerator(OfficeReader ofr, boolean bSkipKey) Create a new bibliography generator based on a bibliography configuration and a list of bibliography marks -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgenerateBibliography(Element bibSource) Generate a bibliographygenerateCitation(String sKey) Get citation text for a reference to the bibliographyprotected Collection<String> Get all labels used in the bibliographyprotected abstract voidinsertBibliographyItem(String sStyleName, String sKey) Insert a new bibliography itemprotected abstract voidinsertBibliographyItemElement(String sStyleName, String sText) Insert an element of a bibliography itemprotected booleanCheck whether entries are numbered rather than labeled with the key
-
Constructor Details
-
BibliographyGenerator
Create a new bibliography generator based on a bibliography configuration and a list of bibliography marks- Parameters:
ofr- the office reader used to access the source documentbSkipKey- set to true if the key should be excluded when applying templates
-
-
Method Details
-
getLabels
Get all labels used in the bibliography- Returns:
- the set of labels
-
isNumberedEntries
protected boolean isNumberedEntries()Check whether entries are numbered rather than labeled with the key- Returns:
- true if the entries are numbered
-
generateCitation
Get citation text for a reference to the bibliography- Parameters:
sKey- the key of the bibliography item- Returns:
- the citation text to be shown in the document
-
generateBibliography
Generate a bibliography- Parameters:
bibSource- a text:bibliography-source element
-
insertBibliographyItem
Insert a new bibliography item- Parameters:
sStyleName- a paragraph style to apply to the itemsKey- the key of the bibliography item
-
insertBibliographyItemElement
Insert an element of a bibliography item- Parameters:
sStyleName- a character style to apply to the elementsText- the element text
-