Class EnumConversionUtil


  • public class EnumConversionUtil
    extends Object
    Some methods to convert the XML schema enums to PLANit memory model enums
    Author:
    markr
    • Constructor Detail

      • EnumConversionUtil

        public EnumConversionUtil()
    • Method Detail

      • xmlToPlanit

        public static MotorisationModeType xmlToPlanit​(org.goplanit.xml.generated.MotorisationType xmlMotorisationType)
                                                throws PlanItException
        convert motorisation type from xml to PLANit
        Parameters:
        xmlMotorisationType - to convert
        Returns:
        result
        Throws:
        PlanItException - thrown if error
      • planitToXml

        public static org.goplanit.xml.generated.MotorisationType planitToXml​(MotorisationModeType planitMotorisationType)
                                                                       throws PlanItException
        convert motorisation type from PLANit to XML
        Parameters:
        planitMotorisationType - to convert
        Returns:
        result
        Throws:
        PlanItException - thrown if error
      • xmlToPlanit

        public static VehicularModeType xmlToPlanit​(org.goplanit.xml.generated.VehicularType xmlVehicularType)
                                             throws PlanItException
        convert vehicle type from xml to PLANit
        Parameters:
        xmlVehicularType - to convert
        Returns:
        result
        Throws:
        PlanItException - thrown if error
      • planitToXml

        public static org.goplanit.xml.generated.VehicularType planitToXml​(VehicularModeType planitVehicularType)
                                                                    throws PlanItException
        convert motorisation type from PLANit to XML
        Parameters:
        planitVehicularType - to convert
        Returns:
        result
        Throws:
        PlanItException - thrown if error
      • xmlToPlanit

        public static TrackModeType xmlToPlanit​(org.goplanit.xml.generated.TrackType xmlTrackType)
                                         throws PlanItException
        convert track type from xml to PLANit
        Parameters:
        xmlTrackType - to convert
        Returns:
        result
        Throws:
        PlanItException - thrown if error
      • planitToXml

        public static org.goplanit.xml.generated.TrackType planitToXml​(TrackModeType xmlTrackType)
                                                                throws PlanItException
        convert track type from PLANit to XML
        Parameters:
        xmlTrackType - to convert
        Returns:
        result
        Throws:
        PlanItException - thrown if error
      • xmlToPlanit

        public static UseOfModeType xmlToPlanit​(org.goplanit.xml.generated.UsedToType xmlUseOfType)
                                         throws PlanItException
        convert used-to type from xml to PLANit
        Parameters:
        xmlUseOfType - to convert
        Returns:
        result
        Throws:
        PlanItException - thrown if error
      • planitToXml

        public static org.goplanit.xml.generated.UsedToType planitToXml​(UseOfModeType useOfType)
                                                                 throws PlanItException
        convert used-to type from PLANit to XML
        Parameters:
        useOfType - to convert
        Returns:
        result
        Throws:
        PlanItException - thrown if error
      • xmlToPlanit

        public static TimeUnit xmlToPlanit​(org.goplanit.xml.generated.TimeUnit xmlTimeUnitType)
                                    throws PlanItException
        Convert TimeUnit type from XML to PLANit Unit
        Parameters:
        xmlTimeUnitType - to convert
        Returns:
        result
        Throws:
        PlanItException - thrown if error
      • planitToXml

        public static org.goplanit.xml.generated.TimeUnit planitToXml​(Unit planitTimeUnit)
                                                               throws PlanItException
        Convert time unit from PLANit to XML TimeUnit
        Parameters:
        planitTimeUnit - to convert
        Returns:
        result
        Throws:
        PlanItException - thrown if error