Class ModeShortNameConverter


  • public class ModeShortNameConverter
    extends Object
    Traditional GIS formats like shape have limits on length of attribute names. Here we provide short names for all modes
    • Constructor Detail

      • ModeShortNameConverter

        public ModeShortNameConverter()
    • Method Detail

      • asShortName

        public static String asShortName​(Mode mode,
                                         Function<Mode,​String> modeIdMapper)
        As short name with 5 characters or less. For custom modes, use mode name if less than 5 characters, or otherwise the id (which we support up to 4 characters, yielding 'm' followed by the id).
        Parameters:
        mode - to get short name for
        modeIdMapper - to apply for custom modes if needed
        Returns:
        short name used