diff --git a/src/dsp_tools/commands/project/models/propertyclass.py b/src/dsp_tools/commands/project/models/propertyclass.py index 2fd1d9af9..18a2d2e6c 100644 --- a/src/dsp_tools/commands/project/models/propertyclass.py +++ b/src/dsp_tools/commands/project/models/propertyclass.py @@ -11,7 +11,7 @@ from dsp_tools.commands.project.models.model import Model from dsp_tools.models.datetimestamp import DateTimeStamp from dsp_tools.models.exceptions import BaseError -from dsp_tools.models.langstring import LangString, Languages +from dsp_tools.models.langstring import LangString from dsp_tools.utils.connection import Connection @@ -134,14 +134,6 @@ def label(self, value: Optional[Union[LangString, str]]) -> None: raise BaseError("Not a valid LangString") self._changed.add("label") - def addLabel(self, lang: Union[Languages, str], value: str) -> None: - self._label[lang] = value - self._changed.add("label") - - def rmLabel(self, lang: Union[Languages, str]) -> None: - del self._label[lang] - self._changed.add("label") - @property def comment(self) -> LangString: return self._comment @@ -158,14 +150,6 @@ def comment(self, value: Optional[LangString]) -> None: raise BaseError("Not a valid LangString") self._changed.add("comment") - def addComment(self, lang: Union[Languages, str], value: str) -> None: - self._comment[lang] = value - self._changed.add("comment") - - def rmComment(self, lang: Union[Languages, str]) -> None: - del self._comment[lang] - self._changed.add("comment") - @property def editable(self) -> bool: return self._editable diff --git a/src/dsp_tools/commands/project/models/resourceclass.py b/src/dsp_tools/commands/project/models/resourceclass.py index b3f5aa0dc..72e6b7273 100644 --- a/src/dsp_tools/commands/project/models/resourceclass.py +++ b/src/dsp_tools/commands/project/models/resourceclass.py @@ -18,7 +18,7 @@ from dsp_tools.commands.project.models.model import Model from dsp_tools.models.datetimestamp import DateTimeStamp from dsp_tools.models.exceptions import BaseError -from dsp_tools.models.langstring import LangString, Languages +from dsp_tools.models.langstring import LangString from dsp_tools.utils.connection import Connection @@ -330,9 +330,6 @@ class ResourceClass(Model): Methods ------- - addLabel: Add a new label to the resource - addLabel(self, lang: Union[Languages, str], value: str) -> None - getProperty: Get information about a property defined for this resource class getPropertery(prop_id: str) -> HasProperty returns a HasProperty-instance @@ -456,14 +453,6 @@ def label(self, value: Optional[Union[LangString, str]]) -> None: raise BaseError("Not a valid LangString") self._changed.add("label") - def addLabel(self, lang: Union[Languages, str], value: str) -> None: - self._label[lang] = value - self._changed.add("label") - - def rmLabel(self, lang: Union[Languages, str]) -> None: - del self._label[lang] - self._changed.add("label") - @property def comment(self) -> LangString: return self._comment @@ -480,14 +469,6 @@ def comment(self, value: Optional[LangString]) -> None: raise BaseError("Not a valid LangString") self._changed.add("comment") - def addComment(self, lang: Union[Languages, str], value: str) -> None: - self._comment[lang] = value - self._changed.add("comment") - - def rmComment(self, lang: Union[Languages, str]) -> None: - del self._comment[lang] - self._changed.add("comment") - @property def permissions(self) -> Optional[str]: return self._permissions diff --git a/test/e2e/commands/project/test_propertyclass.py b/test/e2e/commands/project/test_propertyclass.py index 120ed1fc2..f6ffc16dc 100644 --- a/test/e2e/commands/project/test_propertyclass.py +++ b/test/e2e/commands/project/test_propertyclass.py @@ -39,16 +39,8 @@ def test_PropertyClass_create() -> None: assert property_class.label["de"] == prop_label["de"] assert property_class.comment["de"] == prop_comment["de"] - # modify the property class - property_class.addLabel("en", "This is english comment") - property_class.rmLabel("de") - property_class.addComment("it", "Commentario italiano") - last_modification_date, property_class_updated = property_class.update(last_modification_date) - assert property_class_updated.label["en"] == "This is english comment" - property_class_updated.comment["it"] == "Commentario italiano" - # delete the property class to clean up - _ = property_class_updated.delete(last_modification_date) + _ = property_class.delete(last_modification_date) if __name__ == "__main__": diff --git a/test/e2e/commands/project/test_resourceclass.py b/test/e2e/commands/project/test_resourceclass.py index 06ac79da0..81c051281 100644 --- a/test/e2e/commands/project/test_resourceclass.py +++ b/test/e2e/commands/project/test_resourceclass.py @@ -84,15 +84,6 @@ def test_ResourceClass_update(self) -> None: self.assertIsNotNone(res_class.iri) - # modify the resource class - res_class.addLabel("de", "Dies ist ein Kommentar") - res_class.rmLabel("en") - res_class.addComment("it", "Commentario italiano") - - last_modification_date, res_class = res_class.update(last_modification_date) - self.assertEqual(res_class.label["de"], "Dies ist ein Kommentar") - self.assertEqual(res_class.comment["it"], "Commentario italiano") - if __name__ == "__main__": pytest.main([__file__])