Top Description Fields Constructors Methods
de.undercouch.citeproc

public Class DefaultLocaleProvider

extends Object
implements LocaleProvider
Class Inheritance
All Implemented Interfaces
de.undercouch.citeproc.LocaleProvider
Imports
de.undercouch.citeproc.helper.CSLUtils, java.io.IOException, java.net.URL, java.util.HashMap, .Map

Default implementation of LocaleProvider. Loads locales from the classpath.
Author
Michel Kraemer

Field Summary

Modifier and TypeField and Description
private final Map<String, String>
locales

A cache for the serialized XML of locales

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
retrieveLocale(String lang)

Implements de.undercouch.citeproc.LocaleProvider.retrieveLocale.

Retrieves the serialized XML for the given locale from the classpath.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

localesback to summary
private final Map<String, String> locales

A cache for the serialized XML of locales

Constructor Detail

DefaultLocaleProviderback to summary
public DefaultLocaleProvider()

Method Detail

retrieveLocaleback to summary
public String retrieveLocale(String lang)

Implements de.undercouch.citeproc.LocaleProvider.retrieveLocale.

Retrieves the serialized XML for the given locale from the classpath. For example, if the locale is en-US this method loads the file /locales-en-US.xml from the classpath.

Annotations
@Override