Package writer2latex.base

# Class BibliographyGenerator

java.lang.Object
writer2latex.base.BibliographyGenerator

public abstract class BibliographyGenerator extends Object
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

Constructors
Modifier
Constructor
Description
`protected`
`BibliographyGenerator(OfficeReader ofr, boolean bSkipKey)`
Create a new bibliography generator based on a bibliography configuration and a list of bibliography marks

## Method Summary

Modifier and Type
Method
Description
`protected void`
`generateBibliography(Element bibSource)`
Generate a bibliography
`String`
`generateCitation(String sKey)`
Get citation text for a reference to the bibliography
`protected Collection<String>`
`getLabels()`
Get all labels used in the bibliography
`protected abstract void`
`insertBibliographyItem(String sStyleName, String sKey)`
Insert a new bibliography item
`protected abstract void`
`insertBibliographyItemElement(String sStyleName, String sText)`
Insert an element of a bibliography item
`protected boolean`
`isNumberedEntries()`
Check whether entries are numbered rather than labeled with the key

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### BibliographyGenerator

protected BibliographyGenerator(OfficeReader ofr, boolean bSkipKey)
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 document
  `bSkipKey` - set to true if the key should be excluded when applying templates

## Method Details

### getLabels

protected Collection<String> 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

public String generateCitation(String sKey)
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

protected void generateBibliography(Element bibSource)
Generate a bibliography

Parameters:
  `bibSource` - a text:bibliography-source element

### insertBibliographyItem

protected abstract void insertBibliographyItem(String sStyleName, String sKey)
Insert a new bibliography item

Parameters:
  `sStyleName` - a paragraph style to apply to the item
  `sKey` - the key of the bibliography item

### insertBibliographyItemElement

protected abstract void insertBibliographyItemElement(String sStyleName, String sText)
Insert an element of a bibliography item

Parameters:
  `sStyleName` - a character style to apply to the element
  `sText` - the element text