Package org.goplanit.geoio.util
Class ModeShortNameConverter
- java.lang.Object
-
- org.goplanit.geoio.util.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 Summary
Constructors Constructor Description ModeShortNameConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
asShortName(Mode mode, Function<Mode,String> modeIdMapper)
As short name with 5 characters or less.
-
-
-
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 formodeIdMapper
- to apply for custom modes if needed- Returns:
- short name used
-
-