Example #1
0
 def __init__(self, string: str) -> None:
     """
     :param string: NODE:name1/SUBNODE:name2/SUBSUBNODE:name3/ValueName:value
     """
     AbstractTerm.__init__(self)
     self.negative = string.startswith("^")
     list.__init__(self,
                   (self.Node(t) for t in string.strip("^").split("/")))
Example #2
0
 def __init__(self, *terms):
     AbstractTerm.__init__(self)
     list.__init__(self, (SearchTerm.Convert(t) for t in terms))
Example #3
0
 def __init__(self, term=None):
     AbstractTerm.__init__(self)
     self.root = SearchGroup(term) if term else SearchGroup()
     self.last = self.root
Example #4
0
 def __init__(self, term1, term2):
     AbstractTerm.__init__(self)
     self.term1 = term1
     self.term2 = term2