Class TranslationServiceImpl

java.lang.Object
org.onebusaway.gtfs.impl.translation.TranslationServiceImpl
All Implemented Interfaces:
TranslationService

public class TranslationServiceImpl extends Object implements TranslationService
This class implements the GTFS Translations extension proposal, documented here: http://bit.ly/gtfs-translations
  • Constructor Details

    • TranslationServiceImpl

      public TranslationServiceImpl()
  • Method Details

    • setData

      public void setData(TranslationServiceData data)
    • getTranslatedEntity

      public <T> T getTranslatedEntity(String language, Class<T> type, T instance)
      Description copied from interface: TranslationService
      Get a cloned version of a GTFS entity object with fields translated as per the GTFS Translations proposed spec addition. See Translation
      Specified by:
      getTranslatedEntity in interface TranslationService
      Type Parameters:
      T - entity type
      Parameters:
      language - language to translate to
      type - entity type
      instance - instance to clone and translate
      Returns:
      cloned instance with the proper fields changed