Package de.undercouch.citeproc
Class CSLBuilder
- java.lang.Object
-
- de.undercouch.citeproc.CSLBuilder
-
-
Constructor Summary
Constructors Constructor Description CSLBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CSLBuilderabbreviationProvider(AbbreviationProvider abbreviationProvider)Set an optional abbreviation providerCSLbuild()Creates theCSLobject with the configured parametersCSLBuilderitemDataProvider(ItemDataProvider itemDataProvider)Set the item data providerCSLBuilderlang(String lang)Set an RFC 4646 identifier for the citation locale (e.g.CSLBuilderlocaleProvider(LocaleProvider localeProvider)Set an optional locale providerCSLBuilderstyle(String style)Set the citation style to use.
-
-
-
Method Detail
-
itemDataProvider
public CSLBuilder itemDataProvider(ItemDataProvider itemDataProvider)
Set the item data provider- Parameters:
itemDataProvider- an object that provides citation item data- Returns:
thisbuilder
-
localeProvider
public CSLBuilder localeProvider(LocaleProvider localeProvider)
Set an optional locale provider- Parameters:
localeProvider- an object that provides CSL locales- Returns:
thisbuilder
-
abbreviationProvider
public CSLBuilder abbreviationProvider(AbbreviationProvider abbreviationProvider)
Set an optional abbreviation provider- Parameters:
abbreviationProvider- an object that provides abbreviations- Returns:
thisbuilder
-
style
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 asieee. In the latter case, the processor loads the style from the classpath (e.g./ieee.csl).- Parameters:
style- the style- Returns:
thisbuilder
-
lang
public CSLBuilder lang(String lang)
Set an RFC 4646 identifier for the citation locale (e.g.en-US)- Parameters:
lang- the language identifier- Returns:
thisbuilder
-
build
public CSL build() throws IOException
Creates theCSLobject with the configured parameters- Returns:
- the
CSLobject - Throws:
IOException- if the CSL style could not be loaded
-
-