Package org.fao.geonet.languages

Examples of org.fao.geonet.languages.IsoLanguagesMapper


            try {
                if (iso3LangCode.length() == 2){
                    iso2LangCode = iso3LangCode;
                } else {
                    if (ServiceContext.get() != null) {
                        final IsoLanguagesMapper mapper = ServiceContext.get().getBean(IsoLanguagesMapper.class);
                        iso2LangCode = mapper.iso639_2_to_iso639_1(iso3LangCode);
                    }
                }
            } catch (Exception ex) {
                Log.error(Geonet.GEONETWORK, "Failed to get iso 2 language code for " + iso3LangCode + " caused by " + ex.getMessage());
View Full Code Here


            return langCode;
        }

        final ServiceContext serviceContext = ServiceContext.get();
        if (serviceContext != null) {
            final IsoLanguagesMapper mapper;
            mapper = serviceContext.getBean(IsoLanguagesMapper.class);
            return mapper.iso639_1_to_iso639_2(langCode);
        } else {
            return langCode;
        }

    }
View Full Code Here

            throws Exception {
        String sThesaurusName = Util.getParam(params, "thesaurus");
        String uri = Util.getParam(params, "id", null);
        String[] lang = Util.getParam(params, "lang", context.getLanguage()).split(",");

        final IsoLanguagesMapper mapper = context.getBean(IsoLanguagesMapper.class);
        for (int i = 0; i < lang.length; i++) {
            lang[i] = mapper.iso639_2_to_iso639_1(lang[i]);
        }

        boolean multiple = Util.getParam(params, "multiple", false);

        KeywordsSearcher searcher = null;
View Full Code Here

TOP

Related Classes of org.fao.geonet.languages.IsoLanguagesMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.