Coverage for lode / models / datatypeRestriction.py: 50%
14 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-03-25 15:05 +0000
« prev ^ index » next coverage.py v7.13.0, created at 2026-03-25 15:05 +0000
1from .restriction import Restriction
3class DatatypeRestriction(Restriction):
5 def __init__(self, **kwargs):
6 super().__init__(**kwargs)
7 self.has_constraint = [] # list of Annotation (xsd:pattern, xsd:minInclusive, ...)
8 self.has_restriction_value = [] # list of Literal (the corresponding values)
10 def set_has_constraint(self, annotation):
11 self.has_constraint.append(annotation)
13 def get_has_constraint(self):
14 return list(self.has_constraint)
16 def set_has_restriction_value(self, literal):
17 self.has_restriction_value.append(literal)
19 def get_has_restriction_value(self):
20 return list(self.has_restriction_value)