Coverage for lode / models / propertyConceptRestriction.py: 100%
19 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-11-22 15:54 +0000
« prev ^ index » next coverage.py v7.13.0, created at 2026-11-22 15:54 +0000
1"""PropertyConceptRestriction: a restriction that links a property to a concept."""
2from .restriction import Restriction
4class PropertyConceptRestriction(Restriction):
5 """Base of the restrictions that apply a property to a concept (quantifiers, cardinalities)."""
7 def __init__(self, **kwargs):
8 """Create a restriction with no property, no concept, and is_inverse False."""
9 super().__init__(**kwargs)
11 self.applies_on_property = None # 1
12 self.applies_on_concept = None # 1
13 self.is_inverse = False #bool 1
15 def get_applies_on_property(self):
16 """Return applies_on_property."""
17 return self.applies_on_property
19 def set_applies_on_property(self, property):
20 """Set applies_on_property."""
21 self.applies_on_property = property
23 def get_applies_on_concept(self):
24 """Return applies_on_concept."""
25 return self.applies_on_concept
27 def set_applies_on_concept(self, concept):
28 """Set applies_on_concept."""
29 self.applies_on_concept = concept
31 def get_is_inverse(self):
32 """Return is_inverse."""
33 return self.is_inverse
35 def set_is_inverse(self, boolean):
36 """Set is_inverse: whether the restriction is on the inverse of the property."""
37 self.is_inverse = boolean