Coverage for lode / models / propertySelfRestriction.py: 56%

9 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2026-11-22 15:54 +0000

1"""PropertySelfRestriction: an owl:hasSelf restriction.""" 

2from .restriction import Restriction 

3 

4class PropertySelfRestriction(Restriction): 

5 """A restriction on the individuals related to themselves by a property (owl:hasSelf).""" 

6 

7 def __init__(self, **kwargs): 

8 """Create a self restriction with no property.""" 

9 super().__init__(**kwargs) 

10 

11 self.applies_on_property = None # [1] 

12 

13 def get_applies_on_property(self): 

14 """Return applies_on_property.""" 

15 return self.applies_on_property 

16 

17 def set_applies_on_property(self, relation): 

18 """Set applies_on_property.""" 

19 self.applies_on_property = relation 

20