public class LanguageFilteringUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<Locale> |
languagesToLocales(List<String> langs)
Take a List of language strings and convert to a List of Locale.
|
static Locale |
languageToLocale(String langStr)
Take a language string and convert to a Locale.
|
static List<String> |
localesToLanguages(Enumeration<?> locales)
Take an Enumeration of Locale objects, such as we might get from a
request, and convert to a List of language strings, such as are needed
by the LanguageFilteringRDFService.
|
static String |
localeToLanguage(Locale locale)
Take a Locale object, such as we might get from a
request, and convert to a language string used in RDF.
|
static org.apache.jena.ontology.OntModel |
wrapOntModelInALanguageFilter(org.apache.jena.ontology.OntModel rawModel,
javax.servlet.ServletRequest req)
Add a Language Filtering layer to an OntModel
|
public static String localeToLanguage(Locale locale)
public static Locale languageToLocale(String langStr)
public static List<String> localesToLanguages(Enumeration<?> locales)
public static List<Locale> languagesToLocales(List<String> langs)
public static org.apache.jena.ontology.OntModel wrapOntModelInALanguageFilter(org.apache.jena.ontology.OntModel rawModel,
javax.servlet.ServletRequest req)
Copyright © 2021. All rights reserved.