Class DateBSimFilterType

java.lang.Object
ghidra.features.bsim.gui.filters.BSimFilterType
ghidra.features.bsim.gui.filters.DateBSimFilterType
All Implemented Interfaces:
Comparable<BSimFilterType>
Direct Known Subclasses:
DateEarlierBSimFilterType, DateLaterBSimFilterType

public abstract class DateBSimFilterType extends BSimFilterType
An abstract BsimFilterType for filtering on dates.
  • Field Details

  • Constructor Details

    • DateBSimFilterType

      public DateBSimFilterType(String label, String xmlval, String hint)
      Parameters:
      label - is the display name of this date filter
      xmlval - is the XML serialization name
      hint - is the pop-up hint
    • DateBSimFilterType

      public DateBSimFilterType()
  • Method Details

    • isValidValue

      public boolean isValidValue(String value)
      Description copied from class: BSimFilterType
      Tests if the given string is a valid value for this filter type.
      Overrides:
      isValidValue in class BSimFilterType
      Parameters:
      value - the value to test
      Returns:
      true if the given string is valid for this filter
    • normalizeValue

      public String normalizeValue(String value)
      Description copied from class: BSimFilterType
      Returns a normalized version of the given value for this filter.
      Overrides:
      normalizeValue in class BSimFilterType
      Parameters:
      value - the value to be normalized
      Returns:
      a normalized version of the given value for this filter
    • formatDate

      protected LocalDate formatDate(String value)
      Uses the list of DateTimeFormatter instances created above to test the given date value. If a formatter can parse the text, a LocalDate object is returned.
      Parameters:
      value - is the date string to format
      Returns:
      the formatted LocalDate or null
    • generateIDSQLResolution

      public IDSQLResolution generateIDSQLResolution(FilterAtom atom)
      Description copied from class: BSimFilterType
      Construct a record describing the column id's that might need to be recovered before this filter element can be converted to an SQL clause
      Specified by:
      generateIDSQLResolution in class BSimFilterType
      Parameters:
      atom - is the specific FilterAtom to generate the record for
      Returns:
      the IDSQLResolution record or null if no ids need to be recovered
    • evaluate

      public boolean evaluate(ExecutableRecord rec, String value)
      Description copied from class: BSimFilterType
      Evaluate this filter for a specific ExecutableRecord and a specific filter -value-
      Specified by:
      evaluate in class BSimFilterType
      Parameters:
      rec - is the ExecutableRecord to filter against
      value - is the String value for an instantiated filter
      Returns:
      true if this element would allow the ExecutableRecord to pass the filter
    • isMultipleEntryAllowed

      public boolean isMultipleEntryAllowed()
      Overrides:
      isMultipleEntryAllowed in class BSimFilterType
      Returns:
      false, since having more than one date filter is logically inconsistent.