Coverage for lode / models / datatypeRestriction.py: 100%

14 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2026-10-05 16:02 +0000

1from .restriction import Restriction 

2 

3class DatatypeRestriction(Restriction): 

4 

5 def __init__(self, **kwargs): 

6 super().__init__(**kwargs) 

7 self.applies_on_concept = None # Datatype (from owl:onDatatype) string (xsd:pattern, xsd:minInclusive, ...) 

8 self.has_restriction_value = None # Literal (the corresponding value e.g. 0.0) 

9 

10 

11 def get_applies_on_concept(self): 

12 return self.applies_on_concept 

13 

14 def set_applies_on_concept(self, datatype): 

15 self.applies_on_concept = datatype 

16 

17 def set_has_restriction_value(self, string): 

18 self.has_restriction_value = string 

19 

20 def get_has_restriction_value(self): 

21 return self.has_restriction_value