Skip to content

Commit

Permalink
model.base: Remove occurrences of deprecated constraint AASd-100
Browse files Browse the repository at this point in the history
  • Loading branch information
s-heppner committed Sep 1, 2023
1 parent 505694d commit 7cd464f
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions basyx/aas/model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,6 @@ def _set_category(self, category: Optional[NameType]):
"""
Check the input string
Constraint AASd-100: An attribute with data type "string" is not allowed to be empty
:param category: The category is a value that gives further meta information w.r.t. to the class of the element.
It affects the expected existence of attributes and the applicability of constraints.
:raises ValueError: if the constraint is not fulfilled
Expand Down Expand Up @@ -2272,13 +2270,9 @@ def _set_unit(self, unit: Optional[str]):
"""
Check the input string
Constraint AASd-100: An attribute with data type "string" is not allowed to be empty
:param unit: unit of the data object (optional)
:raises ValueError: if the constraint is not fulfilled
"""
if unit == "":
raise ValueError("unit is not allowed to be an empty string")
self._unit = unit

def _get_unit(self):
Expand All @@ -2290,13 +2284,9 @@ def _set_source_of_definition(self, source_of_definition: Optional[str]):
"""
Check the input string
Constraint AASd-100: An attribute with data type "string" is not allowed to be empty
:param source_of_definition: source of the definition (optional)
:raises ValueError: if the constraint is not fulfilled
"""
if source_of_definition == "":
raise ValueError("source_of_definition is not allowed to be an empty string")
self._source_of_definition = source_of_definition

def _get_source_of_definition(self):
Expand All @@ -2308,13 +2298,9 @@ def _set_symbol(self, symbol: Optional[str]):
"""
Check the input string
Constraint AASd-100: An attribute with data type "string" is not allowed to be empty
:param symbol: unit symbol (optional)
:raises ValueError: if the constraint is not fulfilled
"""
if symbol == "":
raise ValueError("symbol is not allowed to be an empty string")
self._symbol = symbol

def _get_symbol(self):
Expand Down

0 comments on commit 7cd464f

Please sign in to comment.