2016-04-03 17:00:47 +00:00
|
|
|
class _BaseSearchCriterion(object):
|
2016-04-02 12:40:10 +00:00
|
|
|
def __init__(self, original_text, negated):
|
|
|
|
self.original_text = original_text
|
|
|
|
self.negated = negated
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return self.original_text
|
|
|
|
|
2016-04-03 17:00:47 +00:00
|
|
|
class RangedSearchCriterion(_BaseSearchCriterion):
|
2016-04-02 12:40:10 +00:00
|
|
|
def __init__(self, original_text, negated, min_value, max_value):
|
|
|
|
super().__init__(original_text, negated)
|
|
|
|
self.min_value = min_value
|
|
|
|
self.max_value = max_value
|
|
|
|
|
2016-04-17 16:15:59 +00:00
|
|
|
class PlainSearchCriterion(_BaseSearchCriterion):
|
2016-04-02 12:40:10 +00:00
|
|
|
def __init__(self, original_text, negated, value):
|
|
|
|
super().__init__(original_text, negated)
|
|
|
|
self.value = value
|
|
|
|
|
2016-04-03 17:00:47 +00:00
|
|
|
class ArraySearchCriterion(_BaseSearchCriterion):
|
2016-04-02 12:40:10 +00:00
|
|
|
def __init__(self, original_text, negated, values):
|
|
|
|
super().__init__(original_text, negated)
|
|
|
|
self.values = values
|