Top Description Fields Constructors Methods
de.undercouch.citeproc

public Class CSLBuilder

extends Object
Class Inheritance
Imports
java.io.IOException

Builder for CSL objects.

Please read the javadoc of the CSL class for more information about its usage.

Author
Michel Kraemer

Field Summary

Modifier and TypeField and Description
private AbbreviationProvider
private ItemDataProvider
private String
private LocaleProvider
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public CSLBuilder

Returns:

this builder
abbreviationProvider
(AbbreviationProvider
an object that provides abbreviations
abbreviationProvider
)

Set an optional abbreviation provider

public CSL

Returns:

the CSL object
build
()

Creates the CSL object with the configured parameters

public CSLBuilder

Returns:

this builder
itemDataProvider
(ItemDataProvider
an object that provides citation item data
itemDataProvider
)

Set the item data provider

public CSLBuilder

Returns:

this builder
lang
(String
the language identifier
lang
)

Set an RFC 4646 identifier for the citation locale (e.g. en-US)

public CSLBuilder

Returns:

this builder
localeProvider
(LocaleProvider
an object that provides CSL locales
localeProvider
)

Set an optional locale provider

public CSLBuilder

Returns:

this builder
style
(String
the style
style
)

Set the citation style to use.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

abbreviationProviderback to summary
private AbbreviationProvider abbreviationProvider
itemDataProviderback to summary
private ItemDataProvider itemDataProvider
langback to summary
private String lang
localeProviderback to summary
private LocaleProvider localeProvider
styleback to summary
private String style

Constructor Detail

CSLBuilderback to summary
public CSLBuilder()

Method Detail

abbreviationProviderback to summary
public CSLBuilder abbreviationProvider(AbbreviationProvider abbreviationProvider)

Set an optional abbreviation provider

Parameters
abbreviationProvider:AbbreviationProvider

an object that provides abbreviations

Returns:CSLBuilder

this builder

buildback to summary
public CSL build() throws IOException

Creates the CSL object with the configured parameters

Returns:CSL

the CSL object

Exceptions
IOException:
if the CSL style could not be loaded
itemDataProviderback to summary
public CSLBuilder itemDataProvider(ItemDataProvider itemDataProvider)

Set the item data provider

Parameters
itemDataProvider:ItemDataProvider

an object that provides citation item data

Returns:CSLBuilder

this builder

langback to summary
public CSLBuilder lang(String lang)

Set an RFC 4646 identifier for the citation locale (e.g. en-US)

Parameters
lang:String

the language identifier

Returns:CSLBuilder

this builder

localeProviderback to summary
public CSLBuilder localeProvider(LocaleProvider localeProvider)

Set an optional locale provider

Parameters
localeProvider:LocaleProvider

an object that provides CSL locales

Returns:CSLBuilder

this builder

styleback to summary
public CSLBuilder style(String style)

Set the citation style to use. This may either be a serialized XML representation of the style or a style's name such as ieee. In the latter case, the processor loads the style from the classpath (e.g. /ieee.csl).

Parameters
style:String

the style

Returns:CSLBuilder

this builder