Top Description Fields Constructors Methods
de.undercouch.citeproc.csl.internal.locale

public Class LLocale

extends Object
Class Inheritance
Imports
de.undercouch.citeproc.helper.NodeHelper, org.w3c.dom.Document, .Node, .NodeList, java.util.HashMap, .Locale, .Map

CSL localization data
Author
Michel Kraemer

Field Summary

Modifier and TypeField and Description
private final Map<String, LDate>
private final Locale
private final LStyleOptions
private final Map<LTerm.Form, Map<String, LTerm>>

Constructor Summary

AccessConstructor and Description
public
LLocale(Document
the XML document
localeDocument
)

Reads the localization data from an XML document

public
LLocale(Node
the root node
localeRoot
)

Reads the localization data from an XML root node

private
LLocale(Locale lang, Map<String, LDate> dateFormats, Map<LTerm.Form, Map<String, LTerm>> terms, LStyleOptions styleOptions)

Method Summary

Modifier and TypeMethod and Description
public Map<String, LDate>

Returns:

the date formats
getDateFormats
()

Get the date formats defined in the localization data

public Locale

Returns:

the locale
getLang
()

Get the language for which this localization data is defined

public LStyleOptions

Returns:

the style options
getStyleOptions
()

Get the global style rendering options defined in the localization data

public Map<LTerm.Form, Map<String, LTerm>>

Returns:

the terms
getTerms
()

Get the terms defined in the localization data

public LLocale

Returns:

a new localization data object
merge
(LLocale
the other localization data
other
)

Merge this localization data with another one and return a new object where the information defined in the other one overrides the information in this one.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dateFormatsback to summary
private final Map<String, LDate> dateFormats
langback to summary
private final Locale lang
styleOptionsback to summary
private final LStyleOptions styleOptions
termsback to summary
private final Map<LTerm.Form, Map<String, LTerm>> terms

Constructor Detail

LLocaleback to summary
public LLocale(Document localeDocument)

Reads the localization data from an XML document

Parameters
localeDocument:Document

the XML document

LLocaleback to summary
public LLocale(Node localeRoot)

Reads the localization data from an XML root node

Parameters
localeRoot:Node

the root node

LLocaleback to summary
private LLocale(Locale lang, Map<String, LDate> dateFormats, Map<LTerm.Form, Map<String, LTerm>> terms, LStyleOptions styleOptions)

Method Detail

getDateFormatsback to summary
public Map<String, LDate> getDateFormats()

Get the date formats defined in the localization data

Returns:Map<String, LDate>

the date formats

getLangback to summary
public Locale getLang()

Get the language for which this localization data is defined

Returns:Locale

the locale

getStyleOptionsback to summary
public LStyleOptions getStyleOptions()

Get the global style rendering options defined in the localization data

Returns:LStyleOptions

the style options

getTermsback to summary
public Map<LTerm.Form, Map<String, LTerm>> getTerms()

Get the terms defined in the localization data

Returns:Map<LTerm.Form, Map<String, LTerm>>

the terms

mergeback to summary
public LLocale merge(LLocale other)

Merge this localization data with another one and return a new object where the information defined in the other one overrides the information in this one.

Parameters
other:LLocale

the other localization data

Returns:LLocale

a new localization data object