Class ExtractDateTimeField

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractConversion>, SizeOfHandler, Stoppable, Conversion, Serializable

    public class ExtractDateTimeField
    extends AbstractConversion
    Extracts the specified field from a date/time type.
    A custom format string can be used with field CUSTOM.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
        min-user-mode: Expert
     
    -datetime-type <MSECS|MSECS_LONG|SECONDS|SECONDS_LONG|DATE|DATETIME|DATETIMEMSEC|TIME|TIMEMSEC|BASEDATE|BASEDATETIME|BASEDATETIMEMSEC|BASETIME|BASETIMEMSEC|SERIAL_DATETIME|SERIAL_DATETIME_LONG> (property: dateTimeType)
        The date/time type to extract the field from.
        default: DATE
     
    -field <YEAR|MONTH|DAY|HOUR|MINUTE|SECOND|MSEC|DAY_OF_YEAR|DAY_OF_MONTH|DAY_OF_WEEK|DAY_OF_WEEK_STR_EN|DAY_OF_WEEK_STR_LOCALE|WEEK_OF_YEAR|WEEK_OF_MONTH|BUSINESS_DAY_INDICATOR|CUSTOM> (property: field)
        The field to extract.
        default: YEAR
     
    -business-days <MONDAY_TO_FRIDAY|MONDAY_TO_SATURDAY|SATURDAY_TO_THURSDAY|SUNDAY_TO_THURSDAY|SUNDAY_TO_FRIDAY> (property: businessDays)
        How to interpret business days.
        default: MONDAY_TO_FRIDAY
     
    -format-custom <adams.data.DateFormatString> (property: formatCustom)
        The format for turning the date/time type into a string in case of field
        CUSTOM
        default: yyyy-MM-dd
        more: https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • ExtractDateTimeField

        public ExtractDateTimeField()
    • Method Detail

      • setDateTimeType

        public void setDateTimeType​(DateTimeType value)
        Sets the date/time type to convert.
        Parameters:
        value - the type
      • getDateTimeType

        public DateTimeType getDateTimeType()
        Returns the date/time type to convert.
        Returns:
        the type
      • dateTimeTypeTipText

        public String dateTimeTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • fieldTipText

        public String fieldTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setBusinessDays

        public void setBusinessDays​(BusinessDays value)
        Sets what business days to use.
        Parameters:
        value - the type
      • getBusinessDays

        public BusinessDays getBusinessDays()
        Returns what business days to use.
        Returns:
        the type
      • businessDaysTipText

        public String businessDaysTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFormatCustom

        public void setFormatCustom​(DateFormatString value)
        Sets the custom format to use for the conversion.
        Parameters:
        value - the format
      • getFormatCustom

        public DateFormatString getFormatCustom()
        Returns the custom format in use for the conversion.
        Returns:
        the format
      • formatCustomTipText

        public String formatCustomTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.