Class LanguageCodeModifier

  • All Implemented Interfaces:
    gr.ekt.bte.core.ProcessingStep, org.springframework.beans.factory.InitializingBean

    public class LanguageCodeModifier
    extends gr.ekt.bte.core.AbstractModifier
    implements org.springframework.beans.factory.InitializingBean
    Modifier to covert ISO 639-2 alpha-3 code to ISO 639-1 alpha-2 code
    Author:
    Keiji Suzuki
    • Constructor Detail

      • LanguageCodeModifier

        public LanguageCodeModifier()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        Exception
      • modify

        public gr.ekt.bte.core.Record modify​(gr.ekt.bte.core.MutableRecord rec)
        Specified by:
        modify in class gr.ekt.bte.core.AbstractModifier
      • getLang2

        protected String getLang2​(String lang3)
        Covert ISO 639-2 alpha-3 code to ISO 639-1 alpha-2 code
        Parameters:
        lang3 - ISO 639-1 alpha-3 language code
        Returns:
        String ISO 639-1 alpha-2 language code ("other" if code is not alpha-2)