Coverage for lode / models / truthFunction.py: 100%
14 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-10-05 16:02 +0000
« prev ^ index » next coverage.py v7.13.0, created at 2026-10-05 16:02 +0000
1from .restriction import Restriction
3class TruthFunction(Restriction):
5 # the has_cardinality_type can have one of three values: "max", "min", and "exact". Any other string will be interpreted as "exact".
6 # fallback = exact
8 def __init__(self, **kwargs):
9 super().__init__(**kwargs)
11 self.has_logical_operator = None # string[1]
12 self.applies_on_concept = [] # 1..*
14 def get_has_logical_operator(self):
15 """Restituisce la stringa per has_logical_operator"""
16 return self.has_logical_operator
18 def set_has_logical_operator(self, literal):
19 """Aggiunge una str a as_logical_operator"""
20 self.has_logical_operator = literal
22 def get_applies_on_concept(self):
23 """Restituisce la lista applies on concept"""
24 return list(self.applies_on_concept)
26 def set_applies_on_concept(self, concept):
27 """Aggiunge un Concept a applies_on_concept """
28 self.applies_on_concept.append(concept)