Class ChargingPointTypeUtils

java.lang.Object
edu.ie3.datamodel.models.input.system.type.chargingpoint.ChargingPointTypeUtils

public class ChargingPointTypeUtils extends Object
Utility class to create either custom instances of ChargingPointTypes or to retrieve common standard ChargingPointTypes based on their id
Since:
26.07.20
  • Field Details

  • Method Details

    • parse

      public static ChargingPointType parse(String parsableString) throws ChargingPointTypeException
      Parse a given string into either a custom ChargingPointType or a standard ChargingPointType. A custom charging point type can be created if the prsable string matches the following regex (\w+\d*)\s*\(\s*(\d+\.?\d+)\s*\|\s*(AC|DC)\s*\) e.g. FastCharger(50|DC) is a valid custom charging point definition. The apparent power value is expected to be in kVA.

      For all available common standard charging point types see commonChargingPointTypes.

      Parameters:
      parsableString - the string to be parsed. Either a valid custom string or the id of a common standard charging point
      Returns:
      instance of a ChargingPointType
      Throws:
      ChargingPointTypeException - if the string is neither a valid custom charging point string nor a valid common standard charging point id
    • fromIdString

      public static Optional<ChargingPointType> fromIdString(String id)
      Retrieve a common standard charging point type based on its id or one of its synonymous ids

      For all available common standard charging point types see commonChargingPointTypes.

      Parameters:
      id - the id of the common standard charging point type
      Returns:
      optional containing id matching ChargingPointType or an empty optional if no common charging point type matching the provided id can be found