Package ghidra.features.bsim.gui.filters
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
An abstract BsimFilterType for filtering on dates.
-
Field Summary
FieldsFields inherited from class ghidra.features.bsim.gui.filters.BSimFilterType
BLANK, hint, label, xmlval -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate(ExecutableRecord rec, String value) Evaluate this filter for a specific ExecutableRecord and a specific filter -value-protected LocalDateformatDate(String value) Uses the list ofDateTimeFormatterinstances created above to test the given date value.Construct a record describing the column id's that might need to be recovered before this filter element can be converted to an SQL clausebooleanbooleanisValidValue(String value) Tests if the given string is a valid value for this filter type.normalizeValue(String value) Returns a normalized version of the given value for this filter.Methods inherited from class ghidra.features.bsim.gui.filters.BSimFilterType
buildElasticCombinedClause, buildSQLCombinedClause, compareTo, equals, gatherElasticEffect, gatherSQLEffect, generateBsimFilters, generateIDElasticResolution, getBaseFilters, getBlank, getEditor, getHint, getLabel, getXmlValue, hashCode, isBlank, isChildFilter, isLocal, nameToType, orMultipleEntries, saveXml, toString
-
Field Details
-
FORMATTERS
-
-
Constructor Details
-
DateBSimFilterType
- Parameters:
label- is the display name of this date filterxmlval- is the XML serialization namehint- is the pop-up hint
-
DateBSimFilterType
public DateBSimFilterType()
-
-
Method Details
-
isValidValue
Description copied from class:BSimFilterTypeTests if the given string is a valid value for this filter type.- Overrides:
isValidValuein classBSimFilterType- Parameters:
value- the value to test- Returns:
- true if the given string is valid for this filter
-
normalizeValue
Description copied from class:BSimFilterTypeReturns a normalized version of the given value for this filter.- Overrides:
normalizeValuein classBSimFilterType- Parameters:
value- the value to be normalized- Returns:
- a normalized version of the given value for this filter
-
formatDate
Uses the list ofDateTimeFormatterinstances created above to test the given date value. If a formatter can parse the text, aLocalDateobject is returned.- Parameters:
value- is the date string to format- Returns:
- the formatted LocalDate or null
-
generateIDSQLResolution
Description copied from class:BSimFilterTypeConstruct 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:
generateIDSQLResolutionin classBSimFilterType- 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
Description copied from class:BSimFilterTypeEvaluate this filter for a specific ExecutableRecord and a specific filter -value-- Specified by:
evaluatein classBSimFilterType- Parameters:
rec- is the ExecutableRecord to filter againstvalue- 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:
isMultipleEntryAllowedin classBSimFilterType- Returns:
- false, since having more than one date filter is logically inconsistent.
-