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 8, 2023
1 parent 31a82a9 commit 18fde95
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 @@ -2274,13 +2272,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 @@ -2292,13 +2286,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 @@ -2310,13 +2300,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 18fde95

Please sign in to comment.