Class CommonConverter

java.lang.Object
org.entur.avro.realtime.siri.converter.CommonConverter
Direct Known Subclasses:
Avro2JaxbConverter, Avro2JaxbEnumConverter, Jaxb2AvroConverter, Jaxb2AvroEnumConverter, ServiceConverter, ServiceConverter, SubscriptionConverter, SubscriptionConverter

public class CommonConverter extends Object
  • Field Details

    • forceTimeZone

      protected static ZoneId forceTimeZone
  • Constructor Details

    • CommonConverter

      public CommonConverter()
  • Method Details

    • getValue

      protected static CharSequence getValue(Object item)
      Uses reflection to call "getValue()" to fetch actual values from provided object
      Parameters:
      item -
      Returns:
    • isNullOrEmpty

      protected static boolean isNullOrEmpty(List items)
    • getValues

      protected static List<CharSequence> getValues(List items)
      Uses reflection to call "getValue()" to fetch actual values from provided object
      Parameters:
      items -
      Returns:
    • setValue

      protected static <T> T setValue(Class<T> clazz, CharSequence value)
      Uses reflection to call "setValue()" to set actual values from provided object
      Parameters:
      clazz -
      value -
      Returns:
    • setValues

      protected static <T> List<T> setValues(Class<T> clazz, List values)
      Uses reflection to call "setValue()" to set actual values in object of provided type
      Parameters:
      clazz -
      values -
      Returns:
    • getTranslatedValues

      protected static List<org.entur.avro.realtime.siri.model.TranslatedStringRecord> getTranslatedValues(List items)
      Uses reflection to call "getValue()" to fetch actual values from provided object
      Parameters:
      items -
      Returns:
    • setTranslatedValues

      protected static <T> List<T> setTranslatedValues(Class<T> clazz, List<org.entur.avro.realtime.siri.model.TranslatedStringRecord> value)
      Uses reflection to call "getValue()" to fetch actual values from provided object
      Parameters:
      clazz -
      value -
      Returns:
    • convert

      protected static CharSequence convert(ZonedDateTime responseTimestamp)
    • convertDate

      protected static ZonedDateTime convertDate(CharSequence responseTimestamp)
    • convertNames

      protected static List<org.entur.avro.realtime.siri.model.TranslatedStringRecord> convertNames(List names)
    • convertVersion

      protected static uk.org.siri.siri21.SituationVersion convertVersion(Integer version)
    • convert

      protected static Integer convert(uk.org.siri.siri21.SituationVersion version)
    • convertStringList

      protected static Collection<String> convertStringList(List<CharSequence> strings)
    • convert

      protected static Integer convert(BigInteger bigInteger)
    • convert

      protected static BigInteger convert(Integer integer)
    • convert

      protected static Double convert(BigDecimal d)
    • convert

      protected static BigDecimal convert(Double d)
    • convert

      protected static CharSequence convert(Duration duration)
    • convert

      protected static CharSequence convert(Duration duration)
    • convert

      protected static uk.org.siri.siri21.FramedVehicleJourneyRefStructure convert(org.entur.avro.realtime.siri.model.FramedVehicleJourneyRefRecord framedVehicleJourneyRef)
    • convert

      protected static org.entur.avro.realtime.siri.model.FramedVehicleJourneyRefRecord convert(uk.org.siri.siri21.FramedVehicleJourneyRefStructure framedVehicleJourneyRef)
    • convertDuration

      protected static Duration convertDuration(CharSequence duration)