Search in sources :

Example 1 with LocaleHelper

use of org.n52.janmayen.i18n.LocaleHelper in project arctic-sea by 52North.

the class AbstractGetCapabilitiesHandler method getAcceptLanguagesDomain.

private OwsDomain getAcceptLanguagesDomain() {
    Set<Locale> availableLocales = serviceMetadataRepository.getAvailableLocales();
    OwsPossibleValues possibleValues = new OwsAllowedValues(availableLocales.stream().map(LocaleHelper::encode).map(OwsValue::new));
    return new OwsDomain(GetCapabilitiesParams.AcceptLanguages, possibleValues);
}
Also used : Locale(java.util.Locale) OwsDomain(org.n52.shetland.ogc.ows.OwsDomain) OwsAllowedValues(org.n52.shetland.ogc.ows.OwsAllowedValues) LocaleHelper(org.n52.janmayen.i18n.LocaleHelper) OwsPossibleValues(org.n52.shetland.ogc.ows.OwsPossibleValues)

Aggregations

Locale (java.util.Locale)1 LocaleHelper (org.n52.janmayen.i18n.LocaleHelper)1 OwsAllowedValues (org.n52.shetland.ogc.ows.OwsAllowedValues)1 OwsDomain (org.n52.shetland.ogc.ows.OwsDomain)1 OwsPossibleValues (org.n52.shetland.ogc.ows.OwsPossibleValues)1