From 25a7cb48653e19aca4ebc2857cf44d589893e51d Mon Sep 17 00:00:00 2001 From: hpoeche Date: Fri, 12 Jun 2026 13:05:23 +0200 Subject: [PATCH 01/14] compliance_too: refactor tests for json Previously compliance_tool tests relied on handcrafted examples. Replaced examples by mocking the underlying sdk functionality to just test the output parsing. Currently only for json and only for 'check_deserialization' and 'check_example'. --- .../test/test_compliance_check_json.py | 113 ++++++++++++------ 1 file changed, 74 insertions(+), 39 deletions(-) diff --git a/compliance_tool/test/test_compliance_check_json.py b/compliance_tool/test/test_compliance_check_json.py index 656d1e50..0f0fad5f 100644 --- a/compliance_tool/test/test_compliance_check_json.py +++ b/compliance_tool/test/test_compliance_check_json.py @@ -6,87 +6,122 @@ # SPDX-License-Identifier: MIT import os import unittest +from unittest import mock +import logging from aas_compliance_tool import compliance_check_json as compliance_tool from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status +from basyx.aas.examples.data._helper import CheckResult + class ComplianceToolJsonTest(unittest.TestCase): - def test_check_deserialization(self) -> None: + + + def test_check_deserialization_no_file(self) -> None: manager = ComplianceToolStateManager() - script_dir = os.path.dirname(__file__) - file_path_1 = os.path.join(script_dir, 'files/test_not_found.json') - compliance_tool.check_deserialization(file_path_1, manager) + compliance_tool.check_deserialization("", manager) self.assertEqual(2, len(manager.steps)) self.assertEqual(Status.FAILED, manager.steps[0].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[1].status) self.assertIn("No such file or directory", manager.format_step(0, verbose_level=1)) - manager.steps = [] - file_path_2 = os.path.join(script_dir, 'files/test_not_deserializable_aas.json') - compliance_tool.check_deserialization(file_path_2, manager) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) + def test_check_deserialization_fail_on_error(self, mock_read_json_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + def mock_error(*args, **kwargs): + logging.getLogger('basyx.aas.adapter.json.json_deserialization').error("Test error!") + + mock_read_json_file.side_effect = mock_error + compliance_tool.check_deserialization("", manager) + self.assertEqual(2, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.FAILED, manager.steps[1].status) - self.assertIn('Found JSON object with modelType="Test", which is not a known AAS class', - manager.format_step(1, verbose_level=1)) + self.assertIn("Test error!", manager.format_step(1, verbose_level=1)) + + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) + def test_check_deserialization_fail_on_warning(self, mock_read_json_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + def mock_warning(*args, **kwargs): + logging.getLogger('basyx.aas.adapter.json.json_deserialization').warning("Test warning!") + + mock_read_json_file.side_effect = mock_warning + compliance_tool.check_deserialization("", manager) - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_deserializable_aas_warning.json') - compliance_tool.check_deserialization(file_path_3, manager) self.assertEqual(2, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.FAILED, manager.steps[1].status) - self.assertIn("Ignoring 'revision' attribute of AdministrativeInformation object due to missing 'version'", - manager.format_step(1, verbose_level=1)) + self.assertIn("Test warning!", manager.format_step(1, verbose_level=1)) - manager.steps = [] - file_path_4 = os.path.join(script_dir, 'files/test_empty.json') - compliance_tool.check_deserialization(file_path_4, manager) - self.assertEqual(2, len(manager.steps)) - self.assertEqual(Status.SUCCESS, manager.steps[0].status) - self.assertEqual(Status.SUCCESS, manager.steps[1].status) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) + def test_check_deserialization_success(self, mock_read_json_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + def mock_debugging(*args, **kwargs): + logging.getLogger('basyx.aas.adapter.json.json_deserialization').debug("Test info!") + + mock_read_json_file.side_effect = mock_debugging + compliance_tool.check_deserialization("", manager) - manager.steps = [] - file_path_4 = os.path.join(script_dir, 'files/test_empty.json') - compliance_tool.check_deserialization(file_path_4, manager) self.assertEqual(2, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) - def test_check_aas_example(self) -> None: + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) + def test_check_example_success(self, mock_data_checker: mock.MagicMock, mock_read_json_file: mock.MagicMock, mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - script_dir = os.path.dirname(__file__) - file_path_2 = os.path.join(script_dir, 'files/test_demo_full_example.json') - compliance_tool.check_aas_example(file_path_2, manager) + compliance_tool.check_aas_example("", manager) + self.assertEqual(3, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) - manager.steps = [] - file_path_1 = os.path.join(script_dir, 'files/test_not_deserializable_aas.json') - compliance_tool.check_aas_example(file_path_1, manager) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) + def test_check_example_fail_on_read(self, mock_data_checker: mock.MagicMock, mock_read_json_file: mock.MagicMock, + mock_open: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + def mock_error(*args, **kwargs): + logging.getLogger('basyx.aas.adapter.json.json_deserialization').error("Error on reading aas json file!") + + mock_read_json_file.side_effect = mock_error + compliance_tool.check_aas_example("", manager) + self.assertEqual(3, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.FAILED, manager.steps[1].status) + self.assertIn("Error on reading aas json file!", manager.format_step(1, verbose_level=1) ) self.assertEqual(Status.NOT_EXECUTED, manager.steps[2].status) - self.assertIn('Found JSON object with modelType="Test", which is not a known AAS class', - manager.format_step(1, verbose_level=1)) - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example_wrong_attribute.json') - compliance_tool.check_aas_example(file_path_3, manager) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) + def test_check_example_fail_on_check(self, mock_data_checker: mock.MagicMock, mock_read_json_file: mock.MagicMock, + mock_open: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + mock_data_checker.return_value.checks = [CheckResult("Expected Behavior", False, dict())] + mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + + compliance_tool.check_aas_example("", manager) + self.assertEqual(3, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.FAILED, manager.steps[2].status) - self.assertEqual('FAILED: Check if data is equal to example data\n - ERROR: Attribute id_short of ' - 'AssetAdministrationShell[https://example.org/Test_AssetAdministrationShell] must be == ' - 'TestAssetAdministrationShell (value=\'TestAssetAdministrationShell123\')', - manager.format_step(2, verbose_level=1)) + self.assertIn("Expected Behavior", manager.format_step(2, verbose_level=1)) def test_check_json_files_equivalence(self) -> None: manager = ComplianceToolStateManager() From 17789ece4e1a319e2a2ff0ae255c95f480b6b717 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Sat, 13 Jun 2026 12:34:49 +0200 Subject: [PATCH 02/14] compliance_tool: continue refactoring tests Applied the same refactoring to resulting equivalence check of json implementation and the xml implementation. --- .../test/test_compliance_check_json.py | 84 +++++--- .../test/test_compliance_check_xml.py | 197 +++++++++++------- 2 files changed, 177 insertions(+), 104 deletions(-) diff --git a/compliance_tool/test/test_compliance_check_json.py b/compliance_tool/test/test_compliance_check_json.py index 0f0fad5f..500d5e71 100644 --- a/compliance_tool/test/test_compliance_check_json.py +++ b/compliance_tool/test/test_compliance_check_json.py @@ -4,7 +4,6 @@ # the LICENSE file of this project. # # SPDX-License-Identifier: MIT -import os import unittest from unittest import mock import logging @@ -80,6 +79,8 @@ def mock_debugging(*args, **kwargs): def test_check_example_success(self, mock_data_checker: mock.MagicMock, mock_read_json_file: mock.MagicMock, mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) compliance_tool.check_aas_example("", manager) self.assertEqual(3, len(manager.steps)) @@ -123,33 +124,62 @@ def test_check_example_fail_on_check(self, mock_data_checker: mock.MagicMock, mo self.assertEqual(Status.FAILED, manager.steps[2].status) self.assertIn("Expected Behavior", manager.format_step(2, verbose_level=1)) - def test_check_json_files_equivalence(self) -> None: + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) + def test_check_json_files_equivalence_file1_fail_on_deserialization(self, mock_data_checker, mock_read_json_file, mock_open) -> None: manager = ComplianceToolStateManager() - script_dir = os.path.dirname(__file__) - file_path_1 = os.path.join(script_dir, 'files/test_not_deserializable_aas.json') - file_path_2 = os.path.join(script_dir, 'files/test_empty.json') - compliance_tool.check_json_files_equivalence(file_path_1, file_path_2, manager) + call_count = [0] + def mock_first_fails(*args, **kwargs): + call_count[0] += 1 + if call_count[0] == 1: + logging.getLogger('basyx.aas.adapter.json.json_deserialization').error("Test error!") + + mock_read_json_file.side_effect = mock_first_fails + compliance_tool.check_json_files_equivalence("", "", manager) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.FAILED, manager.steps[1].status) + self.assertIn("Test error!", manager.format_step(1, verbose_level=1)) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[4].status) - manager.steps = [] - compliance_tool.check_json_files_equivalence(file_path_2, file_path_1, manager) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) + def test_check_json_files_equivalence_file2_fail_on_deserialization(self, mock_data_checker, mock_read_json_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + call_count = [0] + def mock_second_fails(*args, **kwargs): + call_count[0] += 1 + if call_count[0] == 2: + logging.getLogger('basyx.aas.adapter.json.json_deserialization').error("Test error!") + + mock_read_json_file.side_effect = mock_second_fails + compliance_tool.check_json_files_equivalence("", "", manager) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.FAILED, manager.steps[3].status) + self.assertIn("Test error!", manager.format_step(3, verbose_level=1)) self.assertEqual(Status.NOT_EXECUTED, manager.steps[4].status) - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example.json') - file_path_4 = os.path.join(script_dir, 'files/test_demo_full_example.json') - compliance_tool.check_json_files_equivalence(file_path_3, file_path_4, manager) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) + def test_check_json_files_equivalence_success(self, mock_data_checker, mock_read_json_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) + compliance_tool.check_json_files_equivalence("", "", manager) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) @@ -157,30 +187,20 @@ def test_check_json_files_equivalence(self) -> None: self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.SUCCESS, manager.steps[4].status) - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example.json') - file_path_4 = os.path.join(script_dir, 'files/test_demo_full_example_wrong_attribute.json') - compliance_tool.check_json_files_equivalence(file_path_3, file_path_4, manager) - self.assertEqual(5, len(manager.steps)) - self.assertEqual(Status.SUCCESS, manager.steps[0].status) - self.assertEqual(Status.SUCCESS, manager.steps[1].status) - self.assertEqual(Status.SUCCESS, manager.steps[2].status) - self.assertEqual(Status.SUCCESS, manager.steps[3].status) - self.assertEqual(Status.FAILED, manager.steps[4].status) - self.assertEqual('FAILED: Check if data in files are equal\n - ERROR: Attribute id_short of ' - 'AssetAdministrationShell[https://example.org/Test_AssetAdministrationShell] must be == ' - 'TestAssetAdministrationShell123 (value=\'TestAssetAdministrationShell\')', - manager.format_step(4, verbose_level=1)) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) + def test_check_json_files_equivalence_fail_on_check(self, mock_data_checker: mock.MagicMock, mock_read_json_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + mock_data_checker.return_value.checks = [CheckResult("Test failure", False, dict())] + mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + compliance_tool.check_json_files_equivalence("", "", manager) - manager.steps = [] - compliance_tool.check_json_files_equivalence(file_path_4, file_path_3, manager) self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.FAILED, manager.steps[4].status) - self.assertEqual('FAILED: Check if data in files are equal\n - ERROR: Attribute id_short of ' - 'AssetAdministrationShell[https://example.org/Test_AssetAdministrationShell] must be == ' - 'TestAssetAdministrationShell (value=\'TestAssetAdministrationShell123\')', - manager.format_step(4, verbose_level=1)) + self.assertIn("Test failure", manager.format_step(4, verbose_level=1)) diff --git a/compliance_tool/test/test_compliance_check_xml.py b/compliance_tool/test/test_compliance_check_xml.py index 7f5fbecc..7e6880b7 100644 --- a/compliance_tool/test/test_compliance_check_xml.py +++ b/compliance_tool/test/test_compliance_check_xml.py @@ -4,118 +4,181 @@ # the LICENSE file of this project. # # SPDX-License-Identifier: MIT -import os import unittest +from unittest import mock +import logging from aas_compliance_tool import compliance_check_xml as compliance_tool from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status +from basyx.aas.examples.data._helper import CheckResult + class ComplianceToolXmlTest(unittest.TestCase): - def test_check_deserialization(self) -> None: + + def test_check_deserialization_no_file(self) -> None: manager = ComplianceToolStateManager() - script_dir = os.path.dirname(__file__) - file_path_1 = os.path.join(script_dir, 'files/test_not_found.xml') - compliance_tool.check_deserialization(file_path_1, manager) + compliance_tool.check_deserialization("", manager) self.assertEqual(2, len(manager.steps)) self.assertEqual(Status.FAILED, manager.steps[0].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[1].status) self.assertIn("No such file or directory", manager.format_step(0, verbose_level=1)) - manager.steps = [] - file_path_2 = os.path.join(script_dir, 'files/test_not_deserializable_aas.xml') - compliance_tool.check_deserialization(file_path_2, manager) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) + def test_check_deserialization_fail_on_error(self, mock_read_xml_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + def mock_error(*args, **kwargs): + logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').error("Test error!") + + mock_read_xml_file.side_effect = mock_error + compliance_tool.check_deserialization("", manager) + self.assertEqual(2, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.FAILED, manager.steps[1].status) - self.assertIn("child of aas:assetAdministrationShells", manager.format_step(1, verbose_level=1)) - self.assertIn("doesn't match the expected tag aas:assetAdministrationShell", - manager.format_step(1, verbose_level=1)) + self.assertIn("Test error!", manager.format_step(1, verbose_level=1)) + + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) + def test_check_deserialization_fail_on_warning(self, mock_read_xml_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + def mock_warning(*args, **kwargs): + logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').warning("Test warning!") + + mock_read_xml_file.side_effect = mock_warning + compliance_tool.check_deserialization("", manager) - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_deserializable_aas_warning.xml') - compliance_tool.check_deserialization(file_path_3, manager) self.assertEqual(2, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.FAILED, manager.steps[1].status) - self.assertIn("AASConstraintViolation: A revision requires a version", manager.format_step(1, verbose_level=1)) + self.assertIn("Test warning!", manager.format_step(1, verbose_level=1)) - manager.steps = [] - file_path_4 = os.path.join(script_dir, 'files/test_empty.xml') - compliance_tool.check_deserialization(file_path_4, manager) - self.assertEqual(2, len(manager.steps)) - self.assertEqual(Status.SUCCESS, manager.steps[0].status) - self.assertEqual(Status.SUCCESS, manager.steps[1].status) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) + def test_check_deserialization_success(self, mock_read_xml_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + def mock_debugging(*args, **kwargs): + logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').debug("Test info!") + + mock_read_xml_file.side_effect = mock_debugging + compliance_tool.check_deserialization("", manager) - manager.steps = [] - file_path_4 = os.path.join(script_dir, 'files/test_empty.xml') - compliance_tool.check_deserialization(file_path_4, manager) self.assertEqual(2, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) - def test_check_aas_example(self) -> None: + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_xml.AASDataChecker", autospec=True) + def test_check_example_success(self, mock_data_checker: mock.MagicMock, mock_read_xml_file: mock.MagicMock, mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - script_dir = os.path.dirname(__file__) - file_path_2 = os.path.join(script_dir, 'files/test_demo_full_example.xml') - compliance_tool.check_aas_example(file_path_2, manager) + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) + compliance_tool.check_aas_example("", manager) + self.assertEqual(3, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) - manager.steps = [] - file_path_1 = os.path.join(script_dir, 'files/test_not_deserializable_aas.xml') - compliance_tool.check_aas_example(file_path_1, manager) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_xml.AASDataChecker", autospec=True) + def test_check_example_fail_on_read(self, mock_data_checker: mock.MagicMock, mock_read_xml_file: mock.MagicMock, + mock_open: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + def mock_error(*args, **kwargs): + logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').error("Error on reading aas xml file!") + + mock_read_xml_file.side_effect = mock_error + compliance_tool.check_aas_example("", manager) + self.assertEqual(3, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.FAILED, manager.steps[1].status) + self.assertIn("Error on reading aas xml file!", manager.format_step(1, verbose_level=1)) self.assertEqual(Status.NOT_EXECUTED, manager.steps[2].status) - self.assertIn("child of aas:assetAdministrationShells", manager.format_step(1, verbose_level=1)) - self.assertIn("doesn't match the expected tag aas:assetAdministrationShell", - manager.format_step(1, verbose_level=1)) - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example_wrong_attribute.xml') - compliance_tool.check_aas_example(file_path_3, manager) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_xml.AASDataChecker", autospec=True) + def test_check_example_fail_on_check(self, mock_data_checker: mock.MagicMock, mock_read_xml_file: mock.MagicMock, + mock_open: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + mock_data_checker.return_value.checks = [CheckResult("Expected Behavior", False, dict())] + mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + + compliance_tool.check_aas_example("", manager) + self.assertEqual(3, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.FAILED, manager.steps[2].status) - self.assertEqual('FAILED: Check if data is equal to example data\n - ERROR: Attribute id_short of ' - 'AssetAdministrationShell[https://example.org/Test_AssetAdministrationShell] must be == ' - 'TestAssetAdministrationShell (value=\'TestAssetAdministrationShell123\')', - manager.format_step(2, verbose_level=1)) + self.assertIn("Expected Behavior", manager.format_step(2, verbose_level=1)) - def test_check_xml_files_equivalence(self) -> None: + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_xml.AASDataChecker", autospec=True) + def test_check_xml_files_equivalence_file1_fail_on_deserialization(self, mock_data_checker, mock_read_xml_file, mock_open) -> None: manager = ComplianceToolStateManager() - script_dir = os.path.dirname(__file__) - file_path_1 = os.path.join(script_dir, 'files/test_not_deserializable_aas.xml') - file_path_2 = os.path.join(script_dir, 'files/test_empty.xml') - compliance_tool.check_xml_files_equivalence(file_path_1, file_path_2, manager) + call_count = [0] + def mock_first_fails(*args, **kwargs): + call_count[0] += 1 + if call_count[0] == 1: + logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').error("Test error!") + + mock_read_xml_file.side_effect = mock_first_fails + compliance_tool.check_xml_files_equivalence("", "", manager) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.FAILED, manager.steps[1].status) + self.assertIn("Test error!", manager.format_step(1, verbose_level=1)) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[4].status) - manager.steps = [] - compliance_tool.check_xml_files_equivalence(file_path_2, file_path_1, manager) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_xml.AASDataChecker", autospec=True) + def test_check_xml_files_equivalence_file2_fail_on_deserialization(self, mock_data_checker, mock_read_xml_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + call_count = [0] + def mock_second_fails(*args, **kwargs): + call_count[0] += 1 + if call_count[0] == 2: + logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').error("Test error!") + + mock_read_xml_file.side_effect = mock_second_fails + compliance_tool.check_xml_files_equivalence("", "", manager) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.FAILED, manager.steps[3].status) + self.assertIn("Test error!", manager.format_step(3, verbose_level=1)) self.assertEqual(Status.NOT_EXECUTED, manager.steps[4].status) - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example.xml') - file_path_4 = os.path.join(script_dir, 'files/test_demo_full_example.xml') - compliance_tool.check_xml_files_equivalence(file_path_3, file_path_4, manager) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_xml.AASDataChecker", autospec=True) + def test_check_xml_files_equivalence_success(self, mock_data_checker, mock_read_xml_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) + compliance_tool.check_xml_files_equivalence("", "", manager) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) @@ -123,30 +186,20 @@ def test_check_xml_files_equivalence(self) -> None: self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.SUCCESS, manager.steps[4].status) - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example.xml') - file_path_4 = os.path.join(script_dir, 'files/test_demo_full_example_wrong_attribute.xml') - compliance_tool.check_xml_files_equivalence(file_path_3, file_path_4, manager) - self.assertEqual(5, len(manager.steps)) - self.assertEqual(Status.SUCCESS, manager.steps[0].status) - self.assertEqual(Status.SUCCESS, manager.steps[1].status) - self.assertEqual(Status.SUCCESS, manager.steps[2].status) - self.assertEqual(Status.SUCCESS, manager.steps[3].status) - self.assertEqual(Status.FAILED, manager.steps[4].status) - self.assertEqual('FAILED: Check if data in files are equal\n - ERROR: Attribute id_short of ' - 'AssetAdministrationShell[https://example.org/Test_AssetAdministrationShell] must be == ' - 'TestAssetAdministrationShell123 (value=\'TestAssetAdministrationShell\')', - manager.format_step(4, verbose_level=1)) + @mock.patch("builtins.open") + @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_xml.AASDataChecker", autospec=True) + def test_check_xml_files_equivalence_fail_on_check(self, mock_data_checker: mock.MagicMock, mock_read_xml_file, mock_open) -> None: + manager = ComplianceToolStateManager() + + mock_data_checker.return_value.checks = [CheckResult("Test failure", False, dict())] + mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + compliance_tool.check_xml_files_equivalence("", "", manager) - manager.steps = [] - compliance_tool.check_xml_files_equivalence(file_path_4, file_path_3, manager) self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.FAILED, manager.steps[4].status) - self.assertEqual('FAILED: Check if data in files are equal\n - ERROR: Attribute id_short of ' - 'AssetAdministrationShell[https://example.org/Test_AssetAdministrationShell] must be == ' - 'TestAssetAdministrationShell (value=\'TestAssetAdministrationShell123\')', - manager.format_step(4, verbose_level=1)) + self.assertIn("Test failure", manager.format_step(4, verbose_level=1)) From 6b79d935b583267d713223eb5fe4fb2f1d312323 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Mon, 15 Jun 2026 16:48:53 +0200 Subject: [PATCH 03/14] compliance_tool: extract helper function for tests --- compliance_tool/test/_test_helper.py | 19 ++++++++++++++ .../test/test_compliance_check_json.py | 26 +++++-------------- .../test/test_compliance_check_xml.py | 26 +++++-------------- 3 files changed, 33 insertions(+), 38 deletions(-) create mode 100644 compliance_tool/test/_test_helper.py diff --git a/compliance_tool/test/_test_helper.py b/compliance_tool/test/_test_helper.py new file mode 100644 index 00000000..b32ba9b1 --- /dev/null +++ b/compliance_tool/test/_test_helper.py @@ -0,0 +1,19 @@ +from typing import Literal, Type, Optional +import logging + +def create_mock_effect( + module: str, + level: Literal['error', 'warning', 'info', 'debug'], + error_cls: Type[Exception] = ValueError, + error_msg: Optional[str] = None +): + error_msg = error_msg or f"Test {level}!" + + def mock_error(*args, **kwargs): + if kwargs.get('failsafe', True): + getattr(logging.getLogger(module), level)(error_msg) + else: + raise error_cls(error_msg) + + return mock_error + diff --git a/compliance_tool/test/test_compliance_check_json.py b/compliance_tool/test/test_compliance_check_json.py index 500d5e71..1a33582c 100644 --- a/compliance_tool/test/test_compliance_check_json.py +++ b/compliance_tool/test/test_compliance_check_json.py @@ -6,8 +6,8 @@ # SPDX-License-Identifier: MIT import unittest from unittest import mock -import logging +from _test_helper import create_mock_effect from aas_compliance_tool import compliance_check_json as compliance_tool from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status @@ -31,10 +31,7 @@ def test_check_deserialization_no_file(self) -> None: def test_check_deserialization_fail_on_error(self, mock_read_json_file, mock_open) -> None: manager = ComplianceToolStateManager() - def mock_error(*args, **kwargs): - logging.getLogger('basyx.aas.adapter.json.json_deserialization').error("Test error!") - - mock_read_json_file.side_effect = mock_error + mock_read_json_file.side_effect = create_mock_effect('basyx.aas.adapter.json.json_deserialization', 'error') compliance_tool.check_deserialization("", manager) self.assertEqual(2, len(manager.steps)) @@ -47,10 +44,7 @@ def mock_error(*args, **kwargs): def test_check_deserialization_fail_on_warning(self, mock_read_json_file, mock_open) -> None: manager = ComplianceToolStateManager() - def mock_warning(*args, **kwargs): - logging.getLogger('basyx.aas.adapter.json.json_deserialization').warning("Test warning!") - - mock_read_json_file.side_effect = mock_warning + mock_read_json_file.side_effect = create_mock_effect('basyx.aas.adapter.json.json_deserialization', 'warning') compliance_tool.check_deserialization("", manager) self.assertEqual(2, len(manager.steps)) @@ -63,10 +57,7 @@ def mock_warning(*args, **kwargs): def test_check_deserialization_success(self, mock_read_json_file, mock_open) -> None: manager = ComplianceToolStateManager() - def mock_debugging(*args, **kwargs): - logging.getLogger('basyx.aas.adapter.json.json_deserialization').debug("Test info!") - - mock_read_json_file.side_effect = mock_debugging + mock_read_json_file.side_effect = create_mock_effect('basyx.aas.adapter.json.json_deserialization', 'debug') compliance_tool.check_deserialization("", manager) self.assertEqual(2, len(manager.steps)) @@ -95,10 +86,7 @@ def test_check_example_fail_on_read(self, mock_data_checker: mock.MagicMock, moc mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - def mock_error(*args, **kwargs): - logging.getLogger('basyx.aas.adapter.json.json_deserialization').error("Error on reading aas json file!") - - mock_read_json_file.side_effect = mock_error + mock_read_json_file.side_effect = create_mock_effect('basyx.aas.adapter.json.json_deserialization', 'error', error_msg="Error on reading aas json file!") compliance_tool.check_aas_example("", manager) self.assertEqual(3, len(manager.steps)) @@ -134,7 +122,7 @@ def test_check_json_files_equivalence_file1_fail_on_deserialization(self, mock_d def mock_first_fails(*args, **kwargs): call_count[0] += 1 if call_count[0] == 1: - logging.getLogger('basyx.aas.adapter.json.json_deserialization').error("Test error!") + create_mock_effect('basyx.aas.adapter.json.json_deserialization', 'error')(*args, **kwargs) mock_read_json_file.side_effect = mock_first_fails compliance_tool.check_json_files_equivalence("", "", manager) @@ -157,7 +145,7 @@ def test_check_json_files_equivalence_file2_fail_on_deserialization(self, mock_d def mock_second_fails(*args, **kwargs): call_count[0] += 1 if call_count[0] == 2: - logging.getLogger('basyx.aas.adapter.json.json_deserialization').error("Test error!") + create_mock_effect('basyx.aas.adapter.json.json_deserialization', 'error')(*args, **kwargs) mock_read_json_file.side_effect = mock_second_fails compliance_tool.check_json_files_equivalence("", "", manager) diff --git a/compliance_tool/test/test_compliance_check_xml.py b/compliance_tool/test/test_compliance_check_xml.py index 7e6880b7..43809025 100644 --- a/compliance_tool/test/test_compliance_check_xml.py +++ b/compliance_tool/test/test_compliance_check_xml.py @@ -6,8 +6,8 @@ # SPDX-License-Identifier: MIT import unittest from unittest import mock -import logging +from _test_helper import create_mock_effect from aas_compliance_tool import compliance_check_xml as compliance_tool from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status @@ -30,10 +30,7 @@ def test_check_deserialization_no_file(self) -> None: def test_check_deserialization_fail_on_error(self, mock_read_xml_file, mock_open) -> None: manager = ComplianceToolStateManager() - def mock_error(*args, **kwargs): - logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').error("Test error!") - - mock_read_xml_file.side_effect = mock_error + mock_read_xml_file.side_effect = create_mock_effect('basyx.aas.adapter.xml.xml_deserialization', 'error') compliance_tool.check_deserialization("", manager) self.assertEqual(2, len(manager.steps)) @@ -46,10 +43,7 @@ def mock_error(*args, **kwargs): def test_check_deserialization_fail_on_warning(self, mock_read_xml_file, mock_open) -> None: manager = ComplianceToolStateManager() - def mock_warning(*args, **kwargs): - logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').warning("Test warning!") - - mock_read_xml_file.side_effect = mock_warning + mock_read_xml_file.side_effect = create_mock_effect('basyx.aas.adapter.xml.xml_deserialization', 'warning') compliance_tool.check_deserialization("", manager) self.assertEqual(2, len(manager.steps)) @@ -62,10 +56,7 @@ def mock_warning(*args, **kwargs): def test_check_deserialization_success(self, mock_read_xml_file, mock_open) -> None: manager = ComplianceToolStateManager() - def mock_debugging(*args, **kwargs): - logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').debug("Test info!") - - mock_read_xml_file.side_effect = mock_debugging + mock_read_xml_file.side_effect = create_mock_effect('basyx.aas.adapter.xml.xml_deserialization', 'debug') compliance_tool.check_deserialization("", manager) self.assertEqual(2, len(manager.steps)) @@ -94,10 +85,7 @@ def test_check_example_fail_on_read(self, mock_data_checker: mock.MagicMock, moc mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - def mock_error(*args, **kwargs): - logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').error("Error on reading aas xml file!") - - mock_read_xml_file.side_effect = mock_error + mock_read_xml_file.side_effect = create_mock_effect('basyx.aas.adapter.xml.xml_deserialization', 'error', error_msg="Error on reading aas xml file!") compliance_tool.check_aas_example("", manager) self.assertEqual(3, len(manager.steps)) @@ -133,7 +121,7 @@ def test_check_xml_files_equivalence_file1_fail_on_deserialization(self, mock_da def mock_first_fails(*args, **kwargs): call_count[0] += 1 if call_count[0] == 1: - logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').error("Test error!") + create_mock_effect('basyx.aas.adapter.xml.xml_deserialization', 'error')(*args, **kwargs) mock_read_xml_file.side_effect = mock_first_fails compliance_tool.check_xml_files_equivalence("", "", manager) @@ -156,7 +144,7 @@ def test_check_xml_files_equivalence_file2_fail_on_deserialization(self, mock_da def mock_second_fails(*args, **kwargs): call_count[0] += 1 if call_count[0] == 2: - logging.getLogger('basyx.aas.adapter.xml.xml_deserialization').error("Test error!") + create_mock_effect('basyx.aas.adapter.xml.xml_deserialization', 'error')(*args, **kwargs) mock_read_xml_file.side_effect = mock_second_fails compliance_tool.check_xml_files_equivalence("", "", manager) From 9d617a4fabd2bc6684d3c4b27412c4f6d405fdda Mon Sep 17 00:00:00 2001 From: hpoeche Date: Mon, 15 Jun 2026 20:01:36 +0200 Subject: [PATCH 04/14] compliance_tool: refactor and extend aasx tests Tests for the compliance check for aasx files were refactored so they use mocking instead of actual files. Additional test cases were added to ensure 1. alignment of core properties is checked 2. content of supplementary files is equal --- compliance_tool/test/_test_helper.py | 32 ++ .../test/test_compliance_check_aasx.py | 338 +++++++++++++----- 2 files changed, 274 insertions(+), 96 deletions(-) diff --git a/compliance_tool/test/_test_helper.py b/compliance_tool/test/_test_helper.py index b32ba9b1..e2644fa5 100644 --- a/compliance_tool/test/_test_helper.py +++ b/compliance_tool/test/_test_helper.py @@ -1,6 +1,38 @@ +import io from typing import Literal, Type, Optional +import datetime import logging +import pyecma376_2 + +from basyx.aas.examples.data import create_example_aas_binding, TEST_PDF_FILE + + +def create_example_aas_core_properties() -> pyecma376_2.OPCCoreProperties: + cp = pyecma376_2.OPCCoreProperties() + cp.created = datetime.datetime(2020, 1, 1, 0, 0, 0) + cp.creator = "Eclipse BaSyx Python Testing Framework" + cp.description = "Test_Description" + cp.lastModifiedBy = "Eclipse BaSyx Python Testing Framework Compliance Tool" + cp.modified = datetime.datetime(2020, 1, 1, 0, 0, 1) + cp.revision = "1.0" + cp.version = "2.0.1" + cp.title = "Test Title" + return cp + + +def create_read_into_mock(file: Literal['TestFile', 'TestFileWrong', None]): + def fill_stores (store, file_store, **kwargs) -> None: + for item in create_example_aas_binding(): + store.add(item) + + if file == 'TestFile': + with open(TEST_PDF_FILE, 'rb') as f: + file_store.add_file("/TestFile.pdf", f, "application/pdf") + elif file == 'TestFileWrong': + file_store.add_file("/TestFile.pdf", io.BytesIO(b"dummy"), "application/pdf") + return fill_stores + def create_mock_effect( module: str, level: Literal['error', 'warning', 'info', 'debug'], diff --git a/compliance_tool/test/test_compliance_check_aasx.py b/compliance_tool/test/test_compliance_check_aasx.py index d422ca76..28884ccd 100644 --- a/compliance_tool/test/test_compliance_check_aasx.py +++ b/compliance_tool/test/test_compliance_check_aasx.py @@ -4,170 +4,316 @@ # the LICENSE file of this project. # # SPDX-License-Identifier: MIT -import os import unittest +from unittest import mock +from _test_helper import create_example_aas_core_properties, create_read_into_mock from aas_compliance_tool import compliance_check_aasx as compliance_tool from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status +from basyx.aas.examples.data._helper import CheckResult + class ComplianceToolAASXTest(unittest.TestCase): - def test_check_deserialization(self) -> None: + + def test_check_deserialization_no_file(self) -> None: + manager = ComplianceToolStateManager() + + compliance_tool.check_deserialization("", manager) + self.assertEqual(2, len(manager.steps)) + self.assertEqual(Status.FAILED, manager.steps[0].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[1].status) + self.assertIn("No such file or directory", manager.format_step(0, verbose_level=1)) + + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + def test_check_deserialization_open_raises(self, mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - script_dir = os.path.dirname(__file__) - file_path_1 = os.path.join(script_dir, 'files/test_not_found.aasx') - compliance_tool.check_deserialization(file_path_1, manager) + mock_aasx_reader.side_effect = ValueError("Test error!") + compliance_tool.check_deserialization("", manager) + self.assertEqual(2, len(manager.steps)) self.assertEqual(Status.FAILED, manager.steps[0].status) - # we should expect a FileNotFound error here since the file does not exist and that is the first error - # aasx.py will throw if you try to open a file that does not exist. - self.assertIn("No such file or directory:", manager.format_step(0, verbose_level=1)) self.assertEqual(Status.NOT_EXECUTED, manager.steps[1].status) - # Todo add more tests for checking wrong aasx files + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + def test_check_deserialization_read_raises(self, mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_aasx_reader.return_value.read_into.side_effect = ValueError("Test error!") + compliance_tool.check_deserialization("", manager) - manager.steps = [] - file_path_5 = os.path.join(script_dir, 'files/test_demo_full_example_xml.aasx') - compliance_tool.check_deserialization(file_path_5, manager) self.assertEqual(2, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) - self.assertEqual(Status.SUCCESS, manager.steps[1].status) + self.assertEqual(Status.FAILED, manager.steps[1].status) + + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + def test_check_deserialization_success(self, mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + compliance_tool.check_deserialization("", manager) - manager.steps = [] - file_path_5 = os.path.join(script_dir, 'files/test_demo_full_example_json.aasx') - compliance_tool.check_deserialization(file_path_5, manager) self.assertEqual(2, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) - def test_check_aas_example(self) -> None: + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aas_example_fail_on_open(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_aasx_reader.side_effect = ValueError("Test error!") + compliance_tool.check_aas_example("", manager) + + self.assertEqual(4, len(manager.steps)) + self.assertEqual(Status.FAILED, manager.steps[0].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[1].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[2].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[3].status) + + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aas_example_fail_on_read(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_aasx_reader.return_value.read_into.side_effect = ValueError("Test error!") + compliance_tool.check_aas_example("", manager) + + self.assertEqual(4, len(manager.steps)) + self.assertEqual(Status.SUCCESS, manager.steps[0].status) + self.assertEqual(Status.FAILED, manager.steps[1].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[2].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[3].status) + + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aas_example_fail_on_data_check(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_data_checker.return_value.checks = [CheckResult("Expected Behavior", False, dict())] + mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + compliance_tool.check_aas_example("", manager) + + self.assertEqual(4, len(manager.steps)) + self.assertEqual(Status.SUCCESS, manager.steps[0].status) + self.assertEqual(Status.SUCCESS, manager.steps[1].status) + self.assertEqual(Status.FAILED, manager.steps[2].status) + self.assertIn("Expected Behavior", manager.format_step(2, verbose_level=1)) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[3].status) + + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aas_example_fail_on_core_properties(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - script_dir = os.path.dirname(__file__) - file_path_2 = os.path.join(script_dir, 'files/test_demo_full_example_xml.aasx') - compliance_tool.check_aas_example(file_path_2, manager) + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) + mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFile') + wrong_cp = create_example_aas_core_properties() + wrong_cp.creator = "Wrong Creator" + mock_aasx_reader.return_value.get_core_properties.return_value = wrong_cp + compliance_tool.check_aas_example("", manager) + self.assertEqual(4, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) - self.assertEqual(Status.SUCCESS, manager.steps[3].status) + self.assertEqual(Status.FAILED, manager.steps[3].status) + self.assertIn("Wrong Creator", manager.format_step(3, verbose_level=1)) + + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aas_example_fail_on_file_missing(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) + mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file=None) + mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() + compliance_tool.check_aas_example("", manager) - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example_json.aasx') - compliance_tool.check_aas_example(file_path_3, manager) self.assertEqual(4, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) - self.assertEqual(Status.SUCCESS, manager.steps[3].status) + self.assertEqual(Status.FAILED, manager.steps[3].status) + self.assertIn("/TestFile.pdf", manager.format_step(3, verbose_level=1)) + + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aas_example_fail_on_file_check(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) + mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFileWrong') + mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() + compliance_tool.check_aas_example("", manager) - manager.steps = [] - file_path_4 = os.path.join(script_dir, 'files/test_demo_full_example_xml_wrong_attribute.aasx') - compliance_tool.check_aas_example(file_path_4, manager) self.assertEqual(4, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) - self.assertEqual(Status.FAILED, manager.steps[2].status) - self.assertEqual('FAILED: Check if data is equal to example data\n - ERROR: Attribute id_short of ' - 'AssetAdministrationShell[https://example.org/Test_AssetAdministrationShell] must be == ' - 'TestAssetAdministrationShell (value=\'TestAssetAdministrationShell123\')', - manager.format_step(2, verbose_level=1)) - self.assertEqual(Status.NOT_EXECUTED, manager.steps[3].status) + self.assertEqual(Status.SUCCESS, manager.steps[2].status) + self.assertEqual(Status.FAILED, manager.steps[3].status) + self.assertIn("/TestFile.pdf", manager.format_step(3, verbose_level=1)) - def test_check_aasx_files_equivalence(self) -> None: + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aas_example_success(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - script_dir = os.path.dirname(__file__) - file_path_1 = os.path.join(script_dir, 'files/test_demo_full_example_xml.aasx') - file_path_2 = os.path.join(script_dir, 'files/test_empty.aasx') - compliance_tool.check_aasx_files_equivalence(file_path_1, file_path_2, manager) - self.assertEqual(6, len(manager.steps)) + mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFile') + mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) + compliance_tool.check_aas_example("", manager) + + self.assertEqual(4, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) - self.assertEqual(Status.FAILED, manager.steps[4].status) - self.assertEqual(Status.NOT_EXECUTED, manager.steps[5].status) - manager.steps = [] - compliance_tool.check_aasx_files_equivalence(file_path_2, file_path_1, manager) + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aasx_files_equivalence_file1_fail_on_open(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_aasx_reader.side_effect = [ValueError("Test error!"), mock_aasx_reader.return_value] + compliance_tool.check_aasx_files_equivalence("", "", manager) + self.assertEqual(6, len(manager.steps)) - self.assertEqual(Status.SUCCESS, manager.steps[0].status) - self.assertEqual(Status.SUCCESS, manager.steps[1].status) + self.assertEqual(Status.FAILED, manager.steps[0].status) + self.assertIn("Test error!", manager.format_step(0, verbose_level=1)) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) - self.assertEqual(Status.FAILED, manager.steps[4].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[4].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[5].status) - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example_xml.aasx') - file_path_4 = os.path.join(script_dir, 'files/test_demo_full_example_json.aasx') - compliance_tool.check_aasx_files_equivalence(file_path_3, file_path_4, manager) + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aasx_files_equivalence_file2_fail_on_open(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_aasx_reader.side_effect = [mock_aasx_reader.return_value, ValueError("Test error!")] + compliance_tool.check_aasx_files_equivalence("", "", manager) + self.assertEqual(6, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) - self.assertEqual(Status.SUCCESS, manager.steps[2].status) - self.assertEqual(Status.SUCCESS, manager.steps[3].status) - self.assertEqual(Status.SUCCESS, manager.steps[4].status) - self.assertEqual(Status.SUCCESS, manager.steps[5].status) + self.assertEqual(Status.FAILED, manager.steps[2].status) + self.assertIn("Test error!", manager.format_step(2, verbose_level=1)) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[3].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[4].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[5].status) + + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aasx_files_equivalence_fail_on_data_check(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_data_checker.return_value.checks = [CheckResult("Test failure", False, dict())] + mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + compliance_tool.check_aasx_files_equivalence("", "", manager) - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example_xml.aasx') - file_path_4 = os.path.join(script_dir, 'files/test_demo_full_example_xml_wrong_attribute.aasx') - compliance_tool.check_aasx_files_equivalence(file_path_3, file_path_4, manager) self.assertEqual(6, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.FAILED, manager.steps[4].status) - self.assertEqual('FAILED: Check if data in files are equal\n - ERROR: Attribute id_short of ' - 'AssetAdministrationShell[https://example.org/Test_AssetAdministrationShell] must be == ' - 'TestAssetAdministrationShell123 (value=\'TestAssetAdministrationShell\')', - manager.format_step(4, verbose_level=1)) + self.assertIn("Test failure", manager.format_step(4, verbose_level=1)) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[5].status) + + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aasx_files_equivalence_fail_on_core_properties(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFile') + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) + + wrong_cp = create_example_aas_core_properties() + wrong_cp.creator = "Wrong Creator" + mock_aasx_reader.return_value.get_core_properties.side_effect = \ + [create_example_aas_core_properties(), wrong_cp] + + compliance_tool.check_aasx_files_equivalence("", "", manager) - manager.steps = [] - compliance_tool.check_aasx_files_equivalence(file_path_4, file_path_3, manager) self.assertEqual(6, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) - self.assertEqual(Status.FAILED, manager.steps[4].status) - self.assertEqual('FAILED: Check if data in files are equal\n - ERROR: Attribute id_short of ' - 'AssetAdministrationShell[https://example.org/Test_AssetAdministrationShell] must be == ' - 'TestAssetAdministrationShell (value=\'TestAssetAdministrationShell123\')', - manager.format_step(4, verbose_level=1)) - self.assertEqual(Status.NOT_EXECUTED, manager.steps[5].status) + self.assertEqual(Status.SUCCESS, manager.steps[4].status) + self.assertEqual(Status.FAILED, manager.steps[5].status) + self.assertIn("Wrong Creator", manager.format_step(5, verbose_level=1)) - def test_check_schema(self): + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aasx_files_equivalence_fail_on_file_missing(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - script_dir = os.path.dirname(__file__) - file_path_2 = os.path.join(script_dir, 'files/test_demo_full_example_json.aasx') - compliance_tool.check_schema(file_path_2, manager) - self.assertEqual(4, len(manager.steps)) - for i in range(4): - self.assertEqual(Status.SUCCESS, manager.steps[i].status) + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) + mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() - manager.steps = [] - file_path_3 = os.path.join(script_dir, 'files/test_demo_full_example_xml.aasx') - compliance_tool.check_schema(file_path_3, manager) - self.assertEqual(4, len(manager.steps)) - for i in range(4): - self.assertEqual(Status.SUCCESS, manager.steps[i].status) + call_count = [0] + def setup_file_stores(*args, **kwargs): + call_count[0] += 1 + if call_count[0] == 1: + return create_read_into_mock(file='TestFile')(*args, **kwargs) + else: + return create_read_into_mock(file=None)(*args, **kwargs) - manager.steps = [] - file_path_4 = os.path.join(script_dir, 'files/test_demo_full_example_xml_wrong_attribute.aasx') - compliance_tool.check_schema(file_path_4, manager) - self.assertEqual(4, len(manager.steps)) - for i in range(4): - self.assertEqual(Status.SUCCESS, manager.steps[i].status) + mock_aasx_reader.return_value.read_into.side_effect = setup_file_stores + compliance_tool.check_aasx_files_equivalence("", "", manager) - manager.steps = [] - file_path_5 = os.path.join(script_dir, 'files/test_empty.aasx') - compliance_tool.check_schema(file_path_5, manager) - self.assertEqual(2, len(manager.steps)) - for i in range(2): - self.assertEqual(Status.SUCCESS, manager.steps[i].status) + self.assertEqual(Status.FAILED, manager.status) + + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aasx_files_equivalence_fail_on_file_check(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) + mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() + + call_count = [0] + def setup_file_stores(*args, **kwargs): + call_count[0] += 1 + if call_count[0] == 1: + return create_read_into_mock(file='TestFile')(*args, **kwargs) + else: + return create_read_into_mock(file='TestFileWrong')(*args, **kwargs) + + mock_aasx_reader.return_value.read_into.side_effect = setup_file_stores + compliance_tool.check_aasx_files_equivalence("", "", manager) + + self.assertEqual(Status.FAILED, manager.status) + + @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) + @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) + def test_check_aasx_files_equivalence_success(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + manager = ComplianceToolStateManager() + + mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFile') + mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() + mock_data_checker.return_value.checks = [] + mock_data_checker.return_value.failed_checks = iter([]) + compliance_tool.check_aasx_files_equivalence("", "", manager) + + self.assertEqual(6, len(manager.steps)) + self.assertEqual(Status.SUCCESS, manager.steps[0].status) + self.assertEqual(Status.SUCCESS, manager.steps[1].status) + self.assertEqual(Status.SUCCESS, manager.steps[2].status) + self.assertEqual(Status.SUCCESS, manager.steps[3].status) + self.assertEqual(Status.SUCCESS, manager.steps[4].status) + self.assertEqual(Status.SUCCESS, manager.steps[5].status) From 888019139d59bfd81bf0539ce30ce68734b3fa83 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Tue, 16 Jun 2026 13:37:52 +0200 Subject: [PATCH 05/14] compliance_tool: replace fixture e2e test of cli with mocks Replace the old fixture-dependent subprocess tests with direct calls to main() and parse_cli_arguments(), mocking compliance_check_* modules to verify routing without touching the filesystem. --- compliance_tool/test/__init__.py | 28 - compliance_tool/test/_test_helper.py | 6 + .../test/files/test_demo_full_example.json | 3210 ---------------- .../test/files/test_demo_full_example.xml | 2991 --------------- .../TestFile.pdf | Bin 8178 -> 0 bytes .../[Content_Types].xml | 2 - .../_rels/.rels | 2 - .../aasx/_rels/aasx-origin.rels | 2 - .../aasx/_rels/data.json.rels | 2 - .../aasx/aasx-origin | 0 .../aasx/data.json | 3218 ----------------- .../docProps/core.xml | 1 - ...est_demo_full_example_wrong_attribute.json | 3210 ---------------- ...test_demo_full_example_wrong_attribute.xml | 2991 --------------- .../TestFile.pdf | Bin 8178 -> 0 bytes .../[Content_Types].xml | 2 - .../_rels/.rels | 2 - .../aasx/_rels/aasx-origin.rels | 2 - .../aasx/_rels/data.xml.rels | 2 - .../aasx/aasx-origin | 0 .../aasx/data.xml | 2999 --------------- .../docProps/core.xml | 1 - .../TestFile.pdf | Bin 8178 -> 0 bytes .../[Content_Types].xml | 2 - .../_rels/.rels | 2 - .../aasx/_rels/aasx-origin.rels | 2 - .../aasx/_rels/data.xml.rels | 2 - .../aasx/aasx-origin | 0 .../aasx/data.xml | 2999 --------------- .../docProps/core.xml | 1 - .../test_deserializable_aas_warning.json | 16 - .../files/test_deserializable_aas_warning.xml | 16 - compliance_tool/test/files/test_empty.json | 1 - compliance_tool/test/files/test_empty.xml | 3 - .../files/test_empty_aasx/[Content_Types].xml | 1 - .../test/files/test_empty_aasx/_rels/.rels | 1 - .../aasx/_rels/aasx-origin.rels | 1 - .../files/test_empty_aasx/aasx/aasx-origin | 0 .../files/test_empty_aasx/docProps/core.xml | 1 - .../test/files/test_not_deserializable.json | 5 - .../files/test_not_deserializable_aas.json | 15 - .../files/test_not_deserializable_aas.xml | 13 - .../test/test_aas_compliance_tool.py | 433 +-- 43 files changed, 141 insertions(+), 22044 deletions(-) delete mode 100644 compliance_tool/test/files/test_demo_full_example.json delete mode 100644 compliance_tool/test/files/test_demo_full_example.xml delete mode 100644 compliance_tool/test/files/test_demo_full_example_json_aasx/TestFile.pdf delete mode 100644 compliance_tool/test/files/test_demo_full_example_json_aasx/[Content_Types].xml delete mode 100644 compliance_tool/test/files/test_demo_full_example_json_aasx/_rels/.rels delete mode 100644 compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/_rels/aasx-origin.rels delete mode 100644 compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/_rels/data.json.rels delete mode 100644 compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/aasx-origin delete mode 100644 compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/data.json delete mode 100644 compliance_tool/test/files/test_demo_full_example_json_aasx/docProps/core.xml delete mode 100644 compliance_tool/test/files/test_demo_full_example_wrong_attribute.json delete mode 100644 compliance_tool/test/files/test_demo_full_example_wrong_attribute.xml delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_aasx/TestFile.pdf delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_aasx/[Content_Types].xml delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_aasx/_rels/.rels delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/_rels/aasx-origin.rels delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/_rels/data.xml.rels delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/aasx-origin delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/data.xml delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_aasx/docProps/core.xml delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/TestFile.pdf delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/[Content_Types].xml delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/_rels/.rels delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/_rels/aasx-origin.rels delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/_rels/data.xml.rels delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/aasx-origin delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/data.xml delete mode 100644 compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/docProps/core.xml delete mode 100644 compliance_tool/test/files/test_deserializable_aas_warning.json delete mode 100644 compliance_tool/test/files/test_deserializable_aas_warning.xml delete mode 100644 compliance_tool/test/files/test_empty.json delete mode 100644 compliance_tool/test/files/test_empty.xml delete mode 100644 compliance_tool/test/files/test_empty_aasx/[Content_Types].xml delete mode 100644 compliance_tool/test/files/test_empty_aasx/_rels/.rels delete mode 100644 compliance_tool/test/files/test_empty_aasx/aasx/_rels/aasx-origin.rels delete mode 100644 compliance_tool/test/files/test_empty_aasx/aasx/aasx-origin delete mode 100644 compliance_tool/test/files/test_empty_aasx/docProps/core.xml delete mode 100644 compliance_tool/test/files/test_not_deserializable.json delete mode 100644 compliance_tool/test/files/test_not_deserializable_aas.json delete mode 100644 compliance_tool/test/files/test_not_deserializable_aas.xml diff --git a/compliance_tool/test/__init__.py b/compliance_tool/test/__init__.py index a0c327cb..e69de29b 100644 --- a/compliance_tool/test/__init__.py +++ b/compliance_tool/test/__init__.py @@ -1,28 +0,0 @@ -import os -import zipfile - -AASX_FILES = ("test_demo_full_example_json_aasx", - "test_demo_full_example_xml_aasx", - "test_demo_full_example_xml_wrong_attribute_aasx", - "test_empty_aasx") - - -def _zip_directory(directory_path, zip_file_path): - """Zip a directory recursively.""" - with zipfile.ZipFile(zip_file_path, 'w', zipfile.ZIP_DEFLATED) as zipf: - for root, _, files in os.walk(directory_path): - for file in files: - file_path = os.path.join(root, file) - arcname = os.path.relpath(file_path, directory_path) - zipf.write(file_path, arcname=arcname) - - -def generate_aasx_files(): - """Zip dirs and create test AASX files.""" - script_dir = os.path.dirname(__file__) - for i in AASX_FILES: - _zip_directory(os.path.join(script_dir, "files", i), - os.path.join(script_dir, "files", i.rstrip("_aasx") + ".aasx")) - - -generate_aasx_files() diff --git a/compliance_tool/test/_test_helper.py b/compliance_tool/test/_test_helper.py index e2644fa5..5f5dff56 100644 --- a/compliance_tool/test/_test_helper.py +++ b/compliance_tool/test/_test_helper.py @@ -9,6 +9,8 @@ def create_example_aas_core_properties() -> pyecma376_2.OPCCoreProperties: + """Create core properties similar to the example AASX file.""" + cp = pyecma376_2.OPCCoreProperties() cp.created = datetime.datetime(2020, 1, 1, 0, 0, 0) cp.creator = "Eclipse BaSyx Python Testing Framework" @@ -22,6 +24,8 @@ def create_example_aas_core_properties() -> pyecma376_2.OPCCoreProperties: def create_read_into_mock(file: Literal['TestFile', 'TestFileWrong', None]): + """"Creates side effect function for the AASXReader.read_into mock""" + def fill_stores (store, file_store, **kwargs) -> None: for item in create_example_aas_binding(): store.add(item) @@ -39,6 +43,8 @@ def create_mock_effect( error_cls: Type[Exception] = ValueError, error_msg: Optional[str] = None ): + """Create mock function, that raises or logs error (based on `failsafe` argument)""" + error_msg = error_msg or f"Test {level}!" def mock_error(*args, **kwargs): diff --git a/compliance_tool/test/files/test_demo_full_example.json b/compliance_tool/test/files/test_demo_full_example.json deleted file mode 100644 index 7d3e8891..00000000 --- a/compliance_tool/test/files/test_demo_full_example.json +++ /dev/null @@ -1,3210 +0,0 @@ -{ - "assetAdministrationShells": [ - { - "idShort": "TestAssetAdministrationShell", - "description": [ - { - "language": "en-US", - "text": "An Example Asset Administration Shell for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Verwaltungsschale f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/Test_AssetAdministrationShell" - } - ] - }, - "templateId": "http://example.org/AdministrativeInformationTemplates/Test_AssetAdministrationShell" - }, - "derivedFrom": { - "type": "ModelReference", - "keys": [ - { - "type": "AssetAdministrationShell", - "value": "https://example.org/TestAssetAdministrationShell2" - } - ] - }, - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/TestAsset/", - "specificAssetIds": [ - { - "name": "TestKey", - "value": "TestValue", - "externalSubjectId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - } - } - ], - "assetType": "http://example.org/TestAssetType/", - "defaultThumbnail": { - "path": "file:///path/to/thumbnail.png", - "contentType": "image/png" - } - }, - "submodels": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel" - } - ], - "referredSemanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - } - }, - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Submodels/Assets/TestAsset/BillOfMaterial" - } - ] - }, - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Submodels/Assets/TestAsset/Identification" - } - ], - "referredSemanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/SubmodelTemplates/AssetIdentification" - } - ] - } - } - ], - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - } - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - } - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - }, - { - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell_Mandatory", - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/Test_Asset_Mandatory/" - }, - "submodels": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel2_Mandatory" - } - ] - }, - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel_Mandatory" - } - ] - } - ] - }, - { - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell2_Mandatory", - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/TestAsset2_Mandatory/" - } - }, - { - "idShort": "TestAssetAdministrationShell", - "description": [ - { - "language": "en-US", - "text": "An Example Asset Administration Shell for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Verwaltungsschale f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell_Missing", - "administration": { - "version": "9", - "revision": "0" - }, - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/Test_Asset_Missing/", - "specificAssetIds": [ - { - "name": "TestKey", - "value": "TestValue", - "externalSubjectId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - } - } - ], - "defaultThumbnail": { - "path": "file:///TestFile.pdf", - "contentType": "application/pdf" - } - }, - "submodels": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel_Missing" - } - ] - } - ] - } - ], - "submodels": [ - { - "idShort": "Identification", - "description": [ - { - "language": "en-US", - "text": "An example asset identification submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Identifikations-Submodel f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "http://example.org/Submodels/Assets/TestAsset/Identification", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/TestAsset/Identification" - } - ] - }, - "templateId": "http://example.org/AdministrativeInformationTemplates/TestAsset/Identification" - }, - "semanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/SubmodelTemplates/AssetIdentification" - } - ] - }, - "submodelElements": [ - { - "extensions": [ - { - "value": "ExampleExtensionValue", - "refersTo": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "AssetAdministrationShell", - "value": "http://example.org/RefersTo/ExampleRefersTo" - } - ] - } - ], - "valueType": "xs:string", - "name": "ExampleExtension" - } - ], - "idShort": "ManufacturerName", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "0173-1#02-AAO677#002" - } - ] - }, - "qualifiers": [ - { - "value": "50", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:int", - "type": "http://example.org/Qualifier/ExampleQualifier2", - "kind": "TemplateQualifier" - }, - { - "value": "100", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:int", - "type": "http://example.org/Qualifier/ExampleQualifier", - "kind": "ConceptQualifier" - } - ], - "value": "ACPLT", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - }, - { - "idShort": "InstanceId", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ] - }, - "qualifiers": [ - { - "value": "2023-04-07T16:59:54.870123", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:dateTime", - "type": "http://example.org/Qualifier/ExampleQualifier3", - "kind": "ValueQualifier" - } - ], - "value": "978-8234-234-342", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - ] - }, - { - "idShort": "BillOfMaterial", - "description": [ - { - "language": "en-US", - "text": "An example bill of material submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-BillOfMaterial-Submodel f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "http://example.org/Submodels/Assets/TestAsset/BillOfMaterial", - "administration": { - "version": "9", - "templateId": "http://example.org/AdministrativeInformationTemplates/TestAsset/BillOfMaterial" - }, - "semanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/SubmodelTemplates/BillOfMaterial" - } - ] - }, - "submodelElements": [ - { - "idShort": "ExampleEntity", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Entity", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ] - }, - "statements": [ - { - "idShort": "ExampleProperty2", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - }, - { - "idShort": "ExampleProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string", - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - }, - "valueType": "xs:string" - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - } - ], - "entityType": "SelfManagedEntity", - "globalAssetId": "http://example.org/TestAsset/", - "specificAssetIds": [ - { - "name": "TestKey", - "value": "TestValue", - "externalSubjectId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - } - } - ] - }, - { - "idShort": "ExampleEntity2", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Entity", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ] - }, - "entityType": "CoManagedEntity" - } - ] - }, - { - "idShort": "TestSubmodel", - "description": [ - { - "language": "en-US", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/Test_Submodel" - } - ] - } - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - }, - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ], - "modelType": "RelationshipElement", - "semanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "ConceptDescription", - "value": "https://example.org/Test_ConceptDescription" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty2" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ], - "modelType": "AnnotatedRelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty2" - } - ] - }, - "annotations": [ - { - "idShort": "ExampleAnnotatedProperty", - "category": "PARAMETER", - "modelType": "Property", - "value": "exampleValue", - "valueType": "xs:string" - }, - { - "idShort": "ExampleAnnotatedRange", - "category": "PARAMETER", - "modelType": "Range", - "valueType": "xs:integer", - "min": "1", - "max": "5" - } - ] - }, - { - "idShort": "ExampleOperation", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ], - "modelType": "Operation", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Operations/ExampleOperation" - } - ] - }, - "inputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "outputVariables": [ - { - "value": { - "idShort": "ExamplePropertyOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "inoutputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ] - }, - { - "idShort": "ExampleCapability", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ], - "modelType": "Capability", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Capabilities/ExampleCapability" - } - ] - } - }, - { - "idShort": "ExampleBasicEventElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example BasicEventElement object" - }, - { - "language": "de", - "text": "Beispiel BasicEventElement Element" - } - ], - "modelType": "BasicEventElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Events/ExampleBasicEventElement" - } - ] - }, - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "output", - "state": "on", - "messageTopic": "ExampleTopic", - "messageBroker": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/ExampleMessageBroker" - } - ] - }, - "lastUpdate": "2022-11-12T23:50:23.123456+00:00", - "minInterval": "PT0.000001S", - "maxInterval": "P1Y2M3DT4H5M6.123456S" - }, - { - "idShort": "ExampleSubmodelCollection", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "value": [ - { - "idShort": "ExampleBlob", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ], - "modelType": "Blob", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Blobs/ExampleBlob" - } - ] - }, - "contentType": "application/pdf", - "value": "AQIDBAU=" - }, - { - "idShort": "ExampleFile", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "value": "/TestFile.pdf", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleFileURI", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Details of the Asset Administration Shell \u2014 An example for an external file reference" - }, - { - "language": "de", - "text": "Details of the Asset Administration Shell \u2013 Ein Beispiel f\u00fcr eine extern referenzierte Datei" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "value": "https://www.plattform-i40.de/PI40/Redaktion/DE/Downloads/Publikation/Details-of-the-Asset-Administration-Shell-Part1.pdf?__blob=publicationFile&v=5", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ], - "modelType": "MultiLanguageProperty", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ], - "referredSemanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty/Referred" - } - ] - } - }, - "value": [ - { - "language": "en-US", - "text": "Example value of a MultiLanguageProperty element" - }, - { - "language": "de", - "text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element" - } - ], - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleMultiLanguageValueId" - } - ] - } - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "valueType": "xs:int", - "min": "0", - "max": "100" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ], - "modelType": "ReferenceElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ReferenceElements/ExampleReferenceElement" - } - ] - }, - "value": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleSubmodelList", - "typeValueListElement": "Property", - "valueTypeListElement": "xs:string", - "semanticIdListElement": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "orderRelevant": true, - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementList object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementList Element" - } - ], - "modelType": "SubmodelElementList", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementLists/ExampleSubmodelElementList" - } - ] - }, - "value": [ - { - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "supplementalSemanticIds": [ - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty/SupplementalId1" - } - ] - }, - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty/SupplementalId2" - } - ] - } - ], - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string", - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - } - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - } - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - }, - { - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "supplementalSemanticIds": [ - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty2/SupplementalId" - } - ] - } - ], - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - ] - } - ] - } - ] - }, - { - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel_Mandatory", - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "modelType": "RelationshipElement", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "modelType": "AnnotatedRelationshipElement", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleOperation", - "modelType": "Operation" - }, - { - "idShort": "ExampleCapability", - "modelType": "Capability" - }, - { - "idShort": "ExampleBasicEventElement", - "modelType": "BasicEventElement", - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "input", - "state": "off" - }, - { - "idShort": "ExampleSubmodelList", - "typeValueListElement": "SubmodelElementCollection", - "modelType": "SubmodelElementList", - "value": [ - { - "modelType": "SubmodelElementCollection", - "value": [ - { - "idShort": "ExampleBlob", - "modelType": "Blob", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleFile", - "modelType": "File", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "PARAMETER", - "modelType": "MultiLanguageProperty" - }, - { - "idShort": "ExampleProperty", - "category": "PARAMETER", - "modelType": "Property", - "valueType": "xs:string" - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "modelType": "Range", - "valueType": "xs:int" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "modelType": "ReferenceElement" - } - ] - }, - { - "modelType": "SubmodelElementCollection" - } - ] - }, - { - "idShort": "ExampleSubmodelList2", - "typeValueListElement": "Capability", - "modelType": "SubmodelElementList" - } - ] - }, - { - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel2_Mandatory" - }, - { - "idShort": "TestSubmodel", - "description": [ - { - "language": "en-US", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel_Missing", - "administration": { - "version": "9", - "revision": "0" - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - }, - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ], - "modelType": "RelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleRelationshipElement" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ], - "modelType": "AnnotatedRelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "annotations": [ - { - "idShort": "ExampleAnnotatedRange", - "category": "PARAMETER", - "modelType": "Range", - "valueType": "xs:integer", - "min": "1", - "max": "5" - }, - { - "idShort": "ExampleAnnotatedProperty", - "category": "PARAMETER", - "modelType": "Property", - "value": "exampleValue", - "valueType": "xs:string" - } - ] - }, - { - "idShort": "ExampleOperation", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ], - "modelType": "Operation", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Operations/ExampleOperation" - } - ] - }, - "inputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "outputVariables": [ - { - "value": { - "idShort": "ExamplePropertyOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "inoutputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ] - }, - { - "idShort": "ExampleCapability", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ], - "modelType": "Capability", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Capabilities/ExampleCapability" - } - ] - } - }, - { - "idShort": "ExampleBasicEventElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example BasicEventElement object" - }, - { - "language": "de", - "text": "Beispiel BasicEventElement Element" - } - ], - "modelType": "BasicEventElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Events/ExampleBasicEventElement" - } - ] - }, - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "output", - "state": "on", - "messageTopic": "ExampleTopic", - "messageBroker": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/ExampleMessageBroker" - } - ] - }, - "lastUpdate": "2022-11-12T23:50:23.123456+00:00", - "minInterval": "PT0.000001S", - "maxInterval": "P1Y2M3DT4H5M6.123456S" - }, - { - "idShort": "ExampleSubmodelCollection", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "value": [ - { - "idShort": "ExampleBlob", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ], - "modelType": "Blob", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Blobs/ExampleBlob" - } - ] - }, - "contentType": "application/pdf", - "value": "AQIDBAU=" - }, - { - "idShort": "ExampleFile", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "value": "/TestFile.pdf", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ], - "modelType": "MultiLanguageProperty", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ] - }, - "value": [ - { - "language": "en-US", - "text": "Example value of a MultiLanguageProperty element" - }, - { - "language": "de", - "text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element" - } - ] - }, - { - "idShort": "ExampleProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "qualifiers": [ - { - "valueType": "xs:string", - "type": "http://example.org/Qualifier/ExampleQualifier" - } - ], - "value": "exampleValue", - "valueType": "xs:string" - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "valueType": "xs:int", - "min": "0", - "max": "100" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ], - "modelType": "ReferenceElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ReferenceElements/ExampleReferenceElement" - } - ] - }, - "value": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - } - ] - } - ] - }, - { - "idShort": "TestSubmodel", - "description": [ - { - "language": "en-US", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel_Template", - "administration": { - "version": "9", - "revision": "0" - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - }, - "kind": "Template", - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ], - "modelType": "RelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleRelationshipElement" - } - ] - }, - "kind": "Template", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ], - "modelType": "AnnotatedRelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ] - }, - "kind": "Template", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleOperation", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ], - "modelType": "Operation", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Operations/ExampleOperation" - } - ] - }, - "kind": "Template", - "inputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInput", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInput" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - } - } - ], - "outputVariables": [ - { - "value": { - "idShort": "ExamplePropertyOutput", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyOutput" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - } - } - ], - "inoutputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInOutput", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInOutput" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - } - } - ] - }, - { - "idShort": "ExampleCapability", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ], - "modelType": "Capability", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Capabilities/ExampleCapability" - } - ] - }, - "kind": "Template" - }, - { - "idShort": "ExampleBasicEventElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example BasicEventElement object" - }, - { - "language": "de", - "text": "Beispiel BasicEventElement Element" - } - ], - "modelType": "BasicEventElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Events/ExampleBasicEventElement" - } - ] - }, - "kind": "Template", - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "output", - "state": "on", - "messageTopic": "ExampleTopic", - "messageBroker": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/ExampleMessageBroker" - } - ] - }, - "lastUpdate": "2022-11-12T23:50:23.123456+00:00", - "minInterval": "PT0.000001S", - "maxInterval": "P1Y2M3DT4H5M6.123456S" - }, - { - "idShort": "ExampleSubmodelList", - "typeValueListElement": "SubmodelElementCollection", - "semanticIdListElement": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "orderRelevant": true, - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementList object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementList Element" - } - ], - "modelType": "SubmodelElementList", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementLists/ExampleSubmodelElementList" - } - ] - }, - "kind": "Template", - "value": [ - { - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "kind": "Template", - "value": [ - { - "idShort": "ExampleProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ], - "modelType": "MultiLanguageProperty", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ] - }, - "kind": "Template" - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "kind": "Template", - "valueType": "xs:int", - "max": "100" - }, - { - "idShort": "ExampleRange2", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "kind": "Template", - "valueType": "xs:int", - "min": "0" - }, - { - "idShort": "ExampleBlob", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ], - "modelType": "Blob", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Blobs/ExampleBlob" - } - ] - }, - "kind": "Template", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleFile", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "kind": "Template", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ], - "modelType": "ReferenceElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ReferenceElements/ExampleReferenceElement" - } - ] - }, - "kind": "Template" - } - ] - }, - { - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "kind": "Template" - } - ] - }, - { - "idShort": "ExampleSubmodelList2", - "typeValueListElement": "Capability", - "semanticIdListElement": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "orderRelevant": true, - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementList object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementList Element" - } - ], - "modelType": "SubmodelElementList", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementLists/ExampleSubmodelElementList" - } - ] - }, - "kind": "Template" - } - ] - } - ], - "conceptDescriptions": [ - { - "idShort": "TestConceptDescription", - "description": [ - { - "language": "en-US", - "text": "An example concept description for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-ConceptDescription f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "ConceptDescription", - "id": "https://example.org/Test_ConceptDescription", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/Test_ConceptDescription" - } - ] - }, - "templateId": "http://example.org/AdministrativeInformationTemplates/Test_ConceptDescription", - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - } - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - } - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - }, - "isCaseOf": [ - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/DataSpecifications/ConceptDescriptions/TestConceptDescription" - } - ] - } - ] - }, - { - "modelType": "ConceptDescription", - "id": "https://example.org/Test_ConceptDescription_Mandatory" - }, - { - "idShort": "TestConceptDescription", - "description": [ - { - "language": "en-US", - "text": "An example concept description for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-ConceptDescription f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "ConceptDescription", - "id": "https://example.org/Test_ConceptDescription_Missing", - "administration": { - "version": "9", - "revision": "0" - } - } - ] -} \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example.xml b/compliance_tool/test/files/test_demo_full_example.xml deleted file mode 100644 index 71d65fad..00000000 --- a/compliance_tool/test/files/test_demo_full_example.xml +++ /dev/null @@ -1,2991 +0,0 @@ - - - - - TestAssetAdministrationShell - - - en-US - An Example Asset Administration Shell for the test application - - - de - Ein Beispiel-Verwaltungsschale für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_AssetAdministrationShell - - - - http://example.org/AdministrativeInformationTemplates/Test_AssetAdministrationShell - - https://example.org/Test_AssetAdministrationShell - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - - ModelReference - - - AssetAdministrationShell - https://example.org/TestAssetAdministrationShell2 - - - - - Instance - http://example.org/TestAsset/ - - - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - http://example.org/TestAssetType/ - - file:///path/to/thumbnail.png - image/png - - - - - ModelReference - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/AssetIdentification - - - - - - Submodel - http://example.org/Submodels/Assets/TestAsset/Identification - - - - - ModelReference - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - Submodel - https://example.org/Test_Submodel - - - - - ModelReference - - - Submodel - http://example.org/Submodels/Assets/TestAsset/BillOfMaterial - - - - - - - https://example.org/Test_AssetAdministrationShell_Mandatory - - Instance - http://example.org/Test_Asset_Mandatory/ - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel2_Mandatory - - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel_Mandatory - - - - - - - https://example.org/Test_AssetAdministrationShell2_Mandatory - - Instance - http://example.org/TestAsset2_Mandatory/ - - - - TestAssetAdministrationShell - - - en-US - An Example Asset Administration Shell for the test application - - - de - Ein Beispiel-Verwaltungsschale für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_AssetAdministrationShell_Missing - - Instance - http://example.org/Test_Asset_Missing/ - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - - file:///TestFile.pdf - application/pdf - - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel_Missing - - - - - - - - - Identification - - - en-US - An example asset identification submodel for the test application - - - de - Ein Beispiel-Identifikations-Submodel für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/TestAsset/Identification - - - - http://example.org/AdministrativeInformationTemplates/TestAsset/Identification - - http://example.org/Submodels/Assets/TestAsset/Identification - Instance - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/AssetIdentification - - - - - - - - ExampleExtension - xs:string - ExampleExtensionValue - - - ModelReference - - - AssetAdministrationShell - http://example.org/RefersTo/ExampleRefersTo - - - - - - - PARAMETER - ManufacturerName - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - 0173-1#02-AAO677#002 - - - - - - ConceptQualifier - http://example.org/Qualifier/ExampleQualifier - xs:int - 100 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - TemplateQualifier - http://example.org/Qualifier/ExampleQualifier2 - xs:int - 50 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - xs:string - ACPLT - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - PARAMETER - InstanceId - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - - - ValueQualifier - http://example.org/Qualifier/ExampleQualifier3 - xs:dateTime - 2023-04-07T16:59:54.870123 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - xs:string - 978-8234-234-342 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - BillOfMaterial - - - en-US - An example bill of material submodel for the test application - - - de - Ein Beispiel-BillOfMaterial-Submodel für eine Test-Anwendung - - - - 9 - http://example.org/AdministrativeInformationTemplates/TestAsset/BillOfMaterial - - http://example.org/Submodels/Assets/TestAsset/BillOfMaterial - Instance - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/BillOfMaterial - - - - - - PARAMETER - ExampleEntity - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - - - CONSTANT - ExampleProperty2 - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - SelfManagedEntity - http://example.org/TestAsset/ - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - - - PARAMETER - ExampleEntity2 - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - CoManagedEntity - - - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_Submodel - - - - - https://example.org/Test_Submodel - Instance - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ModelReference - - - ConceptDescription - https://example.org/Test_ConceptDescription - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty2 - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty2 - - - - - - PARAMETER - ExampleAnnotatedProperty - xs:string - exampleValue - - - PARAMETER - ExampleAnnotatedRange - xs:integer - 1 - 5 - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelCollection - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - AQIDBAU= - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - /TestFile.pdf - application/pdf - - - CONSTANT - ExampleFileURI - - - en-US - Details of the Asset Administration Shell — An example for an external file reference - - - de - Details of the Asset Administration Shell – Ein Beispiel für eine extern referenzierte Datei - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - https://www.plattform-i40.de/PI40/Redaktion/DE/Downloads/Publikation/Details-of-the-Asset-Administration-Shell-Part1.pdf?__blob=publicationFile&v=5 - application/pdf - - - PARAMETER - ExampleSubmodelList - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - Property - xs:string - - - CONSTANT - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/SupplementalId1 - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/SupplementalId2 - - - - - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - CONSTANT - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty2/SupplementalId - - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/Referred - - - - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - en-US - Example value of a MultiLanguageProperty element - - - de - Beispielwert für ein MultiLanguageProperty-Element - - - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleMultiLanguageValueId - - - - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - 100 - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - - - - - https://example.org/Test_Submodel_Mandatory - Instance - - - ExampleRelationshipElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - ExampleAnnotatedRelationshipElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - ExampleOperation - - - ExampleCapability - - - ExampleBasicEventElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - input - off - - - ExampleSubmodelList - SubmodelElementCollection - - - - - ExampleBlob - - application/pdf - - - ExampleFile - application/pdf - - - PARAMETER - ExampleMultiLanguageProperty - - - PARAMETER - ExampleProperty - xs:string - - - PARAMETER - ExampleRange - xs:int - - - PARAMETER - ExampleReferenceElement - - - - - - - - - ExampleSubmodelList2 - Capability - - - - - https://example.org/Test_Submodel2_Mandatory - Instance - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_Submodel_Missing - Instance - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRange - xs:integer - 1 - 5 - - - PARAMETER - ExampleAnnotatedProperty - xs:string - exampleValue - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelCollection - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - AQIDBAU= - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - /TestFile.pdf - application/pdf - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - en-US - Example value of a MultiLanguageProperty element - - - de - Beispielwert für ein MultiLanguageProperty-Element - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - http://example.org/Qualifier/ExampleQualifier - xs:string - - - xs:string - exampleValue - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - 100 - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - - - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_Submodel_Template - Template - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelList - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - SubmodelElementCollection - - - PARAMETER - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 100 - - - PARAMETER - ExampleRange2 - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - application/pdf - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - - - - PARAMETER - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - - - PARAMETER - ExampleSubmodelList2 - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - Capability - - - - - - - TestConceptDescription - - - en-US - An example concept description for the test application - - - de - Ein Beispiel-ConceptDescription für eine Test-Anwendung - - - - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_ConceptDescription - - - - http://example.org/AdministrativeInformationTemplates/Test_ConceptDescription - - https://example.org/Test_ConceptDescription - - - ExternalReference - - - GlobalReference - http://example.org/DataSpecifications/ConceptDescriptions/TestConceptDescription - - - - - - - https://example.org/Test_ConceptDescription_Mandatory - - - TestConceptDescription - - - en-US - An example concept description for the test application - - - de - Ein Beispiel-ConceptDescription für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_ConceptDescription_Missing - - - diff --git a/compliance_tool/test/files/test_demo_full_example_json_aasx/TestFile.pdf b/compliance_tool/test/files/test_demo_full_example_json_aasx/TestFile.pdf deleted file mode 100644 index 2bccbec5f60ea7a8f51e5fd41eda019cf27a08d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8178 zcma)>Wl&sQv+qOj0fGjX!JV1G-6as*B{+lY;1)a(Jdoh-7Ti6!ySoGk?rt~FIqzHd zRK2(A++FKK_gcNX|JAGahh0BfWl3pP2pboGc4DS?0l)zS1077P0fK@6kUZ4h!o?EE z#R>e^0{}@|*}6bsK#;Vpu?tiZYU*GH1qcfRoLyj0V>^Jyk~3g)%DqOpa;AopgIx_p zRt;RuImyAvp;gH_!2zjPMv+wsn*+~8Vw`WmFgD-5*}+Er4S?F4{VTy=>!0Gh{~-bb zgm7?k{aX?{kc*F#h!_ z5Qu4SDc*3QlYZ%4o-x)IRHTS{>*5ppMv~P3!=PB+PN$J5I(ou0Nm$} zQz8op5ZJ5`61}=LbI6_eT$Ck3LVz%|xMP7kCY+ID&Jdi4`AP2?6T#u_^YSjB|81NR zSX)<<)ZZJ<(T|>IGIL)6UU0J`EjH8K2boeV!&0deaUDSrVe@VOYd~PDal7N2i1UC@ zgy+KTOaUx}x4hJ8mHyN#?*raG3ka;CyWh93IsyZ*HapvCtdQn`G^Be#)Mg;>|=unY>BC>Q*hQUu9QP}9`g^{mev(imj zaEt4+TNV4K;l8g}{--g#cL9F8?4sK`XvlXj3NVsNng!I?fTzsj7v|ru{b!jvFFbLt z?qbRmG#81fr-`qxPThi71O6g!1g(54J>dT2p0kTS^US<`(W`xMv?1OKlpL{gm7(ZFQ42LErOxrz8Z$=gV z1`&`}r1_B-2f)MyUcV9^QHZp<(KE<93$O2IU=W{q#UJ1U!sbJ#~M_|I89f!PO zvqb;1CrN7tr}DIYHI4EhV?s}Xj#Tl}Ft+xTmWe%4aIZ8l$L7{BKo!0QaAS5TsLR}Gh6*eX%j|}$u#ILL zwiLV`zFTo|xLT+_mrMT6wuox~fp?PS7u{1YihH!_E(0|^s%Fv;b$_q^OxW+o7w~lr z=H3y%Y+zPwl;n9}mL8hPZL~DJg<(p#Cl7}cWYxrs_Caw~U;sC-IiaK*Os=jCzO?V^ zP|Ws!CJLF@CfY2evN73*hNYetrPRaL*9LiF^N(aiX-@0hIX^P)NO9HP5GqPES0g=o z5ZgB0+3_AOkr2!-_W54o6WsQ*s8vf;j0a!?m>aGumlColei+oO3Y`XH=1|O2xXoX& z)CX&~Djz7DI9&&!ST^ePkIE0{*9g<~89%ad>UGvxRR9$3h2!`rzeq76tUi}`jiBFu z$3$9>qqL_!f-c65ynFEi<>guTZ;W=K%<@jfEOBoMiVtn9oF8wer~A8Rak*Zp3&`N{m`?Y*x>{+&!)7BfSjz;a-=o5~mC(FVfkY?TEnvB~1Kw8Jz z3cB~)kzGhvMC2T|%c|7*5?}tn{m*C3 zFw~6NbY+mGsn`1g`Pcc|6mV5IUAKhr+l$E3n%hPW&4RDx%RH|0Nq$16nr-GLUP<0U zjsaPAK1B}Swx2hsw6Lmsc0(k+S%IMBSm|K-txZBhbnj*!zaS9h$p~$^+t`RwJ}f+6 z(Dyf)&*$9I+nj^zj|y8xy1g$LtiX;i9#h2%(byXw7TV!wHKT$H$m8=8N&Xu5d*|Bq z_c`GX3!Hk`u+dWH-W1;^!Acm_^`FJq4)bV8NzL8TG;aZ|B+>0cH%s)nSZoF%oJ5oB zoLY%P1Y-6RDJq*vg1c<`T+x;+D*k(EPpcNDlfut!vZgfU-@36GS+o>;Kh`;NXThXG ztL1||s@udB3NuBKBd9m5(BkMkfg10c$?b(FxF=eL`3tzbSfL<;+M+#x%gSsFF4O&4 z`?^-VcKJs2rDJWC_^b7+DSNe8sK6{B*%r%D1#Gp{B;IWib3Bxi`!%x3z9GHoXy86> z+&E7|qrxDc*_DHj;aIk?d^&#d)*M$)#H)sW+aV7KM+9AM33zrak^)P~Qi6VHYLNs^ zUI+N#zn;&?NBI+;e{WYs(^G};l2%i64sg4<^?!|8Hea(57%6D~EY+plmDtU{`XbsQ zd^>w{SdH84&a8Movf(+mrSF?g{cNGRk=SYVI#tDN8kSr9<7VONDzjB$U0N8%pKnb#lQZeJelh5%L4Xh_{84So z{`7L}5f7iXV)7&Co#57zATjSB^lf{Pr@(^3-mTL~ZW1f;JU8a|rA#KPmbStxone*h zg}^xQfQDFktYRL2JiaU92eK8rj1+k7Y`lJ(KF-qKy@IvBxftGJ(3^yu8aHr-Z&a$3J&HF7H<{wD|WZ zg&Eb($DlQy_;dY=%t{(*G1)ji*=^JeEXg5+)ihChwYu6=_A}N+y`xW#>U?Ok7}AIF zi_?)9BK27*BBrv|IVjpwh60HI<}tPg8-9P|ng!V(7?g*6ImrkU6-St*z3>a=g{=H4 z2Zu43mToKj>2-7$9-amica(6%aGJUB;-ALfaEgn8OM04Z!`XV)qJi6rt3QZ)8n65}p9aj3y zdDHvOFguHl3lB1)D~iH3G=LXVC1qPHCDSC_V(e@xmWpbLCMB|i@>xRLT!vC~uYjE${pUi4X^wY{L0C9$4-E0SIc+I77o zgQv>m50>7$@GUZ)Ee|}|*>TNn_v!X#Vu}=MpJdE-mKgYyF&$c~OoA_(47m3lCUrlYVS?YlV-da?bb* z8s}Z&gH@F$pQeC5sX2f--fq5*wlB+{PcpzVE)8CjYYsjYiL_zq&ekln@eQ*zNy zVXMF+b6PIBNAo$=KSeqji{mr-)|zBKEBB;*{RQIDW!Xe4fxIIFcVS2ODE6$1F!EEz zp;MF)BsZ;hu%HPH=;h*zr2Yo|ntO3yb5ap2Q27;8kJ=_?4{n|#Ca;Id@6!KNLrpy> zIjw#k{uC_yd2_#IS^V1|ar*aqkx3PXK$RcQ5fSe+Z1Od8kofHTx6*!8P~Z(=p|5a< z5q+Kal}Zv~$((iEiIL+7- z)IG}jn)eIalSd>`qiCvCDZ5}33;M!0Zw6~qW0}1nzm3Z z5sFy1A-(S$1qT_p- zwOD%*7|NNTR2fUqLm{u-OGxGie=UJJ$_eAS8N+e=;!2$&!&ryo!CZoe>OjPNt7fgl zX4G__&8+1*mwj+JSy=BpTE1JiRAIUOLf1rGW_Mar<)%nRlHZH( z$}G>Pcql7;_UIN~NsLwlsZ6YSqU3&`tYvvW+WBV@$o&rw+11d6t!$z3y*Xd7E14L5 z)l7S4{q?TJffkHbwOuU3F=Wa}P<^bSm145KeR)}GHH9AMgH5A~%f$AxFLJu#VG-$f zJg~I%Pa84v{EVppu{)Wnx zl{W5+VB?9RSN_OS)dzQP>$;ibva)PGi#AWf zAtyZ}JuU!Oaf}uupHlk;{Q3KzfYGNegTD#MejSx`Ws_KlyL&p+nG{ z8F|BZXOp@Lq*t5z7mN4XKdGWTlU$GV6D6qqzJh-i**0&05?K_Pb_%%``z$MTCmq8} zKgXx72}k~(ST$_3O|IB5WS2GL>)uJs2#Hu{o3e*en~iO5&NcJL zAb!*)u(ujnsE&@1w0Y@ef`T*!I`Yn8mh(jedGCj{c2M#3A#~Rz&kYze@*d2Ly(Hc7 zQf1+ARh8t3Ok6KjI91Q2ZRx%si%_uCy@vIPSSTl|BPzLDb(zm`k&%om2^ zti{4H=VKkBgyM6OBb+5d?^AP2IbuoxZc?~Apk(lQ-14k%qF$H545Pc&i}<186Tf&6 zX4xY3x}g$}-I432fy!R@azU%BfR5Hq4Ia6NzJvnHeX!{_FY8#mVK>q0n0v?ovsLS= zO%d>u72{_hR*pHld5(rLR9)tn5SL0No>$Sm$X%HXYQV|c{(pX6(Htt>+C8*l4C{R`5$_BU#r_|dHsyay>74IO)?sLYZT|-{_ThP*)T3TW{N)I#AaqTHt8x%bCj*g?#JK{5ntB z8xb(%-HZ0iREG3t+^CefC%0rZcO61RHU2SIFn_O< zpL7l@3iI{7+iAQJinYO~OgBObQ60o4C4n$xYS3ME0{_gVHFb@W1i=tr0<#jV9h0Q) z#uh9XmwoR!vT?e27HnVM2dB;1-;i_{-B`7&dN&&1S!fpBr*c%l z;du2X3frI^ccs9pC_3tqrOl-BZC0x{+a2on1t#S?r6E|2mi>)q23!z-fsxKDHM_by zj6T)jYs7qMOx^U~5?-6e=L7JXJzI?l7b8KAiI~`h4K@zpWrcns*E<-8S6JD*#~eDg z8V-NbC6Ur9Iphi__Tuz>Db&36r#8=a~5Q@PKYi>lq(Cmk#v%tb%!Xo;A-bYoHE{^}fliP@P0t z+pl?p!f&*cg9@~f!)(YXX<-g!v)K2$W8oU&zt(0)7f?>BQ$d!URTPVdX&-S6(p$dDH2xi zN`?m)IwXFg89KA_bFpD{jW^$G{TAc&$X4+M=R*OB0N2UAw&lhj99rJhJ99R6v{6q! zr;CuqoxaXrLi3<<-^zS%OdqD~#ULwy9cMy6TuohLB0NDfA~DFN=_KKkU zjMq|Ps&M<`OgXgkBW85@fQLzalY8h>7Ld( zqSQn!mLwnKF2BFmBVrsTKCge|L}VVH$Qw#|*JN}qceLD$qJQ^8tN>;_XC&+5m~nkPho$t9|a zq56o`$6$L@vhSdnX#1)*^hkA37gKx$MQ3qlfr#F8rn08Xo>rx!v-Xrjq=q2H__1)u zC3btIRe3oF@l#{_S{%FCSqL#*dBkSARifNHaWdNWeh9tiAZC>K@2}gup(L)ip%u6E z$>#H)0?0|1%h)r?7ozg8s@QSA4HoL#zk7kcKF}QxCK_;6^^;&pr!KzVj zJTO8{C3}@xI# zBV7V(%?2za@d?8o4d0YzQvrv~Rr#8@;c=P@w?YAQww#QG38<0EeiBy<88C4mnz5e1 zD8l~CEC8&b`q(OqUIDNrTU^I>AgzYeP%`2fA1f1<<6p7xU#n8Ob&!n&vJV5I_v+-! z4n0II3H}Th0cu>vT*}ra!H*EcJ)`7EgM0s}nfnhO$K(=4sxTwC- zQn4!haRQwnXKnDQ=v4YLMCgea(*(+JnvwM0jP&t5@uYF8r>*dk_?w=iTZe(N7Pkb! zq1#|-d>Jrzl0<>>Q(+qV6z$aa_KpD^99uywXJbV7R`iu6jH`Fi%_MR23s%-zxqwH%3D3h&luYxAHI%D zY@Gb128tsb>Sr1d=KS6M7LF=@?vW)1FPPR&GXN2QI4Ovp)PKP=wq!j|Drwp+A=-8F zCR;sg)cZFZ^wjFpmvV#}QNzY^@bq1oRKQ@hijQG2Krx;tC%xTwH)->_Q@NtAexb)d z;hPJZ1krNAY@AesBVuhsPdTM@oyw5IuUzU|e|DLmSB&S$11*KYfd?*}@Tu%zJ`3|~ z)9N*u2#XNimh0>>B}{mM_Zk&cCGDP)-Q{mF!IRL!w?BR?Fl)yr0rcx+Dqd9D6?3F(a96o}?SE*nuYe z>ZkEvqK1A^AySv}&D`183=J1@Wi$oAb;e|)^N209G6ZZ-gB>w6L2R>asV;eKjSL~cG0LZL6v?e~Z3 zi{lBN2}oq=dM3EC-`Ku=ou~QX(;?Ann7&M_iwPIyImc9|kyURCtQhjOUd4IP>lL0> zR@3J{xf%rWKfszY%)!jn^e@a~a5OVlhidMcat8ig|E-Ays0oER|1AyVV1sZ%xcJz)xmelRxc{y7zZ3%H zt=ynMb})nwWCnEuNkUDmjO`hLHjc(Fmd;RPpxeJvaI^hQ@=plkKgjZ5sFCY`bVS|L z5eft;nOLj2*a1L_K%RdXBFxzZ$oYQ(BL^q%|2GVUsulTPEv?NlNa~Wm)I`G1PGE{x$X@h26BK1R(k9E`Rb`{F(wg^t(8#+qKz?j@d zs-h`MG9gkA{^M)snP3{Y6d6J|WPkYPgQaF=e7V|;JyD(m>ugvWyHQ#5$K5+;=z(IU z-7VfgQX+-t;Ib10q(q?qy<8nOS zEYz9Gdt2tzCtpCC!0Lj{$K|O$a;J*M_9{^Ib@`C=g03a=(9t6k^ zg#6u8b#QP2Lco9DSN$j4+yVGs-^o9YBv4Nf43Xyed+Xd>Tv8kmK54Fhh7imL5tD$3 zNlWqa@CpO}_mIC;{teT?{~90Q{|=~4jg0Qbdpd_ude9@$pU_29LR5A|!psp(=%l|e v0=YS`Y9MkQ#zx--#@@WK&qTQX&#pMT7{gpVV1N6-!^^`5prw^kk_P-Ay3<)0 diff --git a/compliance_tool/test/files/test_demo_full_example_json_aasx/[Content_Types].xml b/compliance_tool/test/files/test_demo_full_example_json_aasx/[Content_Types].xml deleted file mode 100644 index 4d0bdc9a..00000000 --- a/compliance_tool/test/files/test_demo_full_example_json_aasx/[Content_Types].xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_json_aasx/_rels/.rels b/compliance_tool/test/files/test_demo_full_example_json_aasx/_rels/.rels deleted file mode 100644 index 9758543f..00000000 --- a/compliance_tool/test/files/test_demo_full_example_json_aasx/_rels/.rels +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/_rels/aasx-origin.rels b/compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/_rels/aasx-origin.rels deleted file mode 100644 index 3ec0a479..00000000 --- a/compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/_rels/aasx-origin.rels +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/_rels/data.json.rels b/compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/_rels/data.json.rels deleted file mode 100644 index 43350edd..00000000 --- a/compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/_rels/data.json.rels +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/aasx-origin b/compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/aasx-origin deleted file mode 100644 index e69de29b..00000000 diff --git a/compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/data.json b/compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/data.json deleted file mode 100644 index 68892fd8..00000000 --- a/compliance_tool/test/files/test_demo_full_example_json_aasx/aasx/data.json +++ /dev/null @@ -1,3218 +0,0 @@ -{ - "assetAdministrationShells": [ - { - "idShort": "TestAssetAdministrationShell", - "description": [ - { - "language": "en-US", - "text": "An Example Asset Administration Shell for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Verwaltungsschale f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/Test_AssetAdministrationShell" - } - ] - }, - "templateId": "http://example.org/AdministrativeInformationTemplates/Test_AssetAdministrationShell" - }, - "derivedFrom": { - "type": "ModelReference", - "keys": [ - { - "type": "AssetAdministrationShell", - "value": "https://example.org/TestAssetAdministrationShell2" - } - ] - }, - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/TestAsset/", - "specificAssetIds": [ - { - "name": "TestKey", - "value": "TestValue", - "externalSubjectId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - } - } - ], - "defaultThumbnail": { - "path": "file:///path/to/thumbnail.png", - "contentType": "image/png" - } - }, - "submodels": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel" - } - ], - "referredSemanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - } - }, - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Submodels/Assets/TestAsset/BillOfMaterial" - } - ] - }, - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Submodels/Assets/TestAsset/Identification" - } - ], - "referredSemanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/SubmodelTemplates/AssetIdentification" - } - ] - } - }, - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel_Template" - } - ] - } - ], - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - } - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - } - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - }, - { - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell_Mandatory", - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/Test_Asset_Mandatory/" - }, - "submodels": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel2_Mandatory" - } - ] - }, - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel_Mandatory" - } - ] - } - ] - }, - { - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell2_Mandatory", - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/TestAsset2_Mandatory/" - } - }, - { - "idShort": "TestAssetAdministrationShell", - "description": [ - { - "language": "en-US", - "text": "An Example Asset Administration Shell for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Verwaltungsschale f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell_Missing", - "administration": { - "version": "9", - "revision": "0" - }, - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/Test_Asset_Missing/", - "specificAssetIds": [ - { - "name": "TestKey", - "value": "TestValue", - "externalSubjectId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - } - } - ], - "defaultThumbnail": { - "path": "file:///TestFile.pdf", - "contentType": "application/pdf" - } - }, - "submodels": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel_Missing" - } - ] - } - ] - } - ], - "submodels": [ - { - "idShort": "Identification", - "description": [ - { - "language": "en-US", - "text": "An example asset identification submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Identifikations-Submodel f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "http://example.org/Submodels/Assets/TestAsset/Identification", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/TestAsset/Identification" - } - ] - }, - "templateId": "http://example.org/AdministrativeInformationTemplates/TestAsset/Identification" - }, - "semanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/SubmodelTemplates/AssetIdentification" - } - ] - }, - "submodelElements": [ - { - "extensions": [ - { - "value": "ExampleExtensionValue", - "refersTo": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "AssetAdministrationShell", - "value": "http://example.org/RefersTo/ExampleRefersTo" - } - ] - } - ], - "valueType": "xs:string", - "name": "ExampleExtension" - } - ], - "idShort": "ManufacturerName", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "0173-1#02-AAO677#002" - } - ] - }, - "qualifiers": [ - { - "value": "50", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:int", - "type": "http://example.org/Qualifier/ExampleQualifier2", - "kind": "TemplateQualifier" - }, - { - "value": "100", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:int", - "type": "http://example.org/Qualifier/ExampleQualifier", - "kind": "ConceptQualifier" - } - ], - "value": "ACPLT", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - }, - { - "idShort": "InstanceId", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ] - }, - "qualifiers": [ - { - "value": "2023-04-07T16:59:54.870123", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:dateTime", - "type": "http://example.org/Qualifier/ExampleQualifier3", - "kind": "ValueQualifier" - } - ], - "value": "978-8234-234-342", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - ] - }, - { - "idShort": "BillOfMaterial", - "description": [ - { - "language": "en-US", - "text": "An example bill of material submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-BillOfMaterial-Submodel f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "http://example.org/Submodels/Assets/TestAsset/BillOfMaterial", - "administration": { - "version": "9", - "templateId": "http://example.org/AdministrativeInformationTemplates/TestAsset/BillOfMaterial" - }, - "semanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/SubmodelTemplates/BillOfMaterial" - } - ] - }, - "submodelElements": [ - { - "idShort": "ExampleEntity", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Entity", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ] - }, - "statements": [ - { - "idShort": "ExampleProperty2", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - }, - { - "idShort": "ExampleProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string", - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - }, - "valueType": "xs:string" - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - } - ], - "entityType": "SelfManagedEntity", - "globalAssetId": "http://example.org/TestAsset/", - "specificAssetIds": [ - { - "name": "TestKey", - "value": "TestValue", - "externalSubjectId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - } - } - ] - }, - { - "idShort": "ExampleEntity2", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Entity", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ] - }, - "entityType": "CoManagedEntity" - } - ] - }, - { - "idShort": "TestSubmodel", - "description": [ - { - "language": "en-US", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/Test_Submodel" - } - ] - } - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - }, - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ], - "modelType": "RelationshipElement", - "semanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "ConceptDescription", - "value": "https://example.org/Test_ConceptDescription" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty2" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ], - "modelType": "AnnotatedRelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty2" - } - ] - }, - "annotations": [ - { - "idShort": "ExampleAnnotatedProperty", - "category": "PARAMETER", - "modelType": "Property", - "value": "exampleValue", - "valueType": "xs:string" - }, - { - "idShort": "ExampleAnnotatedRange", - "category": "PARAMETER", - "modelType": "Range", - "valueType": "xs:integer", - "min": "1", - "max": "5" - } - ] - }, - { - "idShort": "ExampleOperation", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ], - "modelType": "Operation", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Operations/ExampleOperation" - } - ] - }, - "inputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "outputVariables": [ - { - "value": { - "idShort": "ExamplePropertyOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "inoutputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ] - }, - { - "idShort": "ExampleCapability", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ], - "modelType": "Capability", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Capabilities/ExampleCapability" - } - ] - } - }, - { - "idShort": "ExampleBasicEventElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example BasicEventElement object" - }, - { - "language": "de", - "text": "Beispiel BasicEventElement Element" - } - ], - "modelType": "BasicEventElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Events/ExampleBasicEventElement" - } - ] - }, - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "output", - "state": "on", - "messageTopic": "ExampleTopic", - "messageBroker": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/ExampleMessageBroker" - } - ] - }, - "lastUpdate": "2022-11-12T23:50:23.123456+00:00", - "minInterval": "PT0.000001S", - "maxInterval": "P1Y2M3DT4H5M6.123456S" - }, - { - "idShort": "ExampleSubmodelCollection", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "value": [ - { - "idShort": "ExampleBlob", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ], - "modelType": "Blob", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Blobs/ExampleBlob" - } - ] - }, - "contentType": "application/pdf", - "value": "AQIDBAU=" - }, - { - "idShort": "ExampleFile", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "value": "/TestFile.pdf", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleFileURI", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Details of the Asset Administration Shell \u2014 An example for an external file reference" - }, - { - "language": "de", - "text": "Details of the Asset Administration Shell \u2013 Ein Beispiel f\u00fcr eine extern referenzierte Datei" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "value": "https://www.plattform-i40.de/PI40/Redaktion/DE/Downloads/Publikation/Details-of-the-Asset-Administration-Shell-Part1.pdf?__blob=publicationFile&v=5", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ], - "modelType": "MultiLanguageProperty", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ], - "referredSemanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty/Referred" - } - ] - } - }, - "value": [ - { - "language": "en-US", - "text": "Example value of a MultiLanguageProperty element" - }, - { - "language": "de", - "text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element" - } - ], - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleMultiLanguageValueId" - } - ] - } - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "valueType": "xs:int", - "min": "0", - "max": "100" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ], - "modelType": "ReferenceElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ReferenceElements/ExampleReferenceElement" - } - ] - }, - "value": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleSubmodelList", - "typeValueListElement": "Property", - "valueTypeListElement": "xs:string", - "semanticIdListElement": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "orderRelevant": true, - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementList object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementList Element" - } - ], - "modelType": "SubmodelElementList", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementLists/ExampleSubmodelElementList" - } - ] - }, - "value": [ - { - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "supplementalSemanticIds": [ - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty/SupplementalId1" - } - ] - }, - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty/SupplementalId2" - } - ] - } - ], - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string", - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - } - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - } - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - }, - { - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "supplementalSemanticIds": [ - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty2/SupplementalId" - } - ] - } - ], - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - ] - } - ] - } - ] - }, - { - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel_Mandatory", - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "modelType": "RelationshipElement", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "modelType": "AnnotatedRelationshipElement", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleOperation", - "modelType": "Operation" - }, - { - "idShort": "ExampleCapability", - "modelType": "Capability" - }, - { - "idShort": "ExampleBasicEventElement", - "modelType": "BasicEventElement", - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "input", - "state": "off" - }, - { - "idShort": "ExampleSubmodelList", - "typeValueListElement": "SubmodelElementCollection", - "modelType": "SubmodelElementList", - "value": [ - { - "modelType": "SubmodelElementCollection", - "value": [ - { - "idShort": "ExampleBlob", - "modelType": "Blob", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleFile", - "modelType": "File", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "PARAMETER", - "modelType": "MultiLanguageProperty" - }, - { - "idShort": "ExampleProperty", - "category": "PARAMETER", - "modelType": "Property", - "valueType": "xs:string" - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "modelType": "Range", - "valueType": "xs:int" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "modelType": "ReferenceElement" - } - ] - }, - { - "modelType": "SubmodelElementCollection" - } - ] - }, - { - "idShort": "ExampleSubmodelList2", - "typeValueListElement": "Capability", - "modelType": "SubmodelElementList" - } - ] - }, - { - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel2_Mandatory" - }, - { - "idShort": "TestSubmodel", - "description": [ - { - "language": "en-US", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel_Missing", - "administration": { - "version": "9", - "revision": "0" - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - }, - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ], - "modelType": "RelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleRelationshipElement" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ], - "modelType": "AnnotatedRelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "annotations": [ - { - "idShort": "ExampleAnnotatedRange", - "category": "PARAMETER", - "modelType": "Range", - "valueType": "xs:integer", - "min": "1", - "max": "5" - }, - { - "idShort": "ExampleAnnotatedProperty", - "category": "PARAMETER", - "modelType": "Property", - "value": "exampleValue", - "valueType": "xs:string" - } - ] - }, - { - "idShort": "ExampleOperation", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ], - "modelType": "Operation", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Operations/ExampleOperation" - } - ] - }, - "inputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "outputVariables": [ - { - "value": { - "idShort": "ExamplePropertyOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "inoutputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ] - }, - { - "idShort": "ExampleCapability", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ], - "modelType": "Capability", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Capabilities/ExampleCapability" - } - ] - } - }, - { - "idShort": "ExampleBasicEventElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example BasicEventElement object" - }, - { - "language": "de", - "text": "Beispiel BasicEventElement Element" - } - ], - "modelType": "BasicEventElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Events/ExampleBasicEventElement" - } - ] - }, - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "output", - "state": "on", - "messageTopic": "ExampleTopic", - "messageBroker": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/ExampleMessageBroker" - } - ] - }, - "lastUpdate": "2022-11-12T23:50:23.123456+00:00", - "minInterval": "PT0.000001S", - "maxInterval": "P1Y2M3DT4H5M6.123456S" - }, - { - "idShort": "ExampleSubmodelCollection", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "value": [ - { - "idShort": "ExampleBlob", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ], - "modelType": "Blob", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Blobs/ExampleBlob" - } - ] - }, - "contentType": "application/pdf", - "value": "AQIDBAU=" - }, - { - "idShort": "ExampleFile", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "value": "/TestFile.pdf", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ], - "modelType": "MultiLanguageProperty", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ] - }, - "value": [ - { - "language": "en-US", - "text": "Example value of a MultiLanguageProperty element" - }, - { - "language": "de", - "text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element" - } - ] - }, - { - "idShort": "ExampleProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "qualifiers": [ - { - "valueType": "xs:string", - "type": "http://example.org/Qualifier/ExampleQualifier" - } - ], - "value": "exampleValue", - "valueType": "xs:string" - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "valueType": "xs:int", - "min": "0", - "max": "100" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ], - "modelType": "ReferenceElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ReferenceElements/ExampleReferenceElement" - } - ] - }, - "value": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - } - ] - } - ] - }, - { - "idShort": "TestSubmodel", - "description": [ - { - "language": "en-US", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel_Template", - "administration": { - "version": "9", - "revision": "0" - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - }, - "kind": "Template", - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ], - "modelType": "RelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleRelationshipElement" - } - ] - }, - "kind": "Template", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ], - "modelType": "AnnotatedRelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ] - }, - "kind": "Template", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleOperation", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ], - "modelType": "Operation", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Operations/ExampleOperation" - } - ] - }, - "kind": "Template", - "inputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInput", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInput" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - } - } - ], - "outputVariables": [ - { - "value": { - "idShort": "ExamplePropertyOutput", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyOutput" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - } - } - ], - "inoutputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInOutput", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInOutput" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - } - } - ] - }, - { - "idShort": "ExampleCapability", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ], - "modelType": "Capability", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Capabilities/ExampleCapability" - } - ] - }, - "kind": "Template" - }, - { - "idShort": "ExampleBasicEventElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example BasicEventElement object" - }, - { - "language": "de", - "text": "Beispiel BasicEventElement Element" - } - ], - "modelType": "BasicEventElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Events/ExampleBasicEventElement" - } - ] - }, - "kind": "Template", - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "output", - "state": "on", - "messageTopic": "ExampleTopic", - "messageBroker": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/ExampleMessageBroker" - } - ] - }, - "lastUpdate": "2022-11-12T23:50:23.123456+00:00", - "minInterval": "PT0.000001S", - "maxInterval": "P1Y2M3DT4H5M6.123456S" - }, - { - "idShort": "ExampleSubmodelList", - "typeValueListElement": "SubmodelElementCollection", - "semanticIdListElement": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "orderRelevant": true, - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementList object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementList Element" - } - ], - "modelType": "SubmodelElementList", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementLists/ExampleSubmodelElementList" - } - ] - }, - "kind": "Template", - "value": [ - { - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "kind": "Template", - "value": [ - { - "idShort": "ExampleProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ], - "modelType": "MultiLanguageProperty", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ] - }, - "kind": "Template" - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "kind": "Template", - "valueType": "xs:int", - "max": "100" - }, - { - "idShort": "ExampleRange2", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "kind": "Template", - "valueType": "xs:int", - "min": "0" - }, - { - "idShort": "ExampleBlob", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ], - "modelType": "Blob", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Blobs/ExampleBlob" - } - ] - }, - "kind": "Template", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleFile", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "kind": "Template", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ], - "modelType": "ReferenceElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ReferenceElements/ExampleReferenceElement" - } - ] - }, - "kind": "Template" - } - ] - }, - { - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "kind": "Template" - } - ] - }, - { - "idShort": "ExampleSubmodelList2", - "typeValueListElement": "Capability", - "semanticIdListElement": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "orderRelevant": true, - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementList object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementList Element" - } - ], - "modelType": "SubmodelElementList", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementLists/ExampleSubmodelElementList" - } - ] - }, - "kind": "Template" - } - ] - } - ], - "conceptDescriptions": [ - { - "idShort": "TestConceptDescription", - "description": [ - { - "language": "en-US", - "text": "An example concept description for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-ConceptDescription f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "ConceptDescription", - "id": "https://example.org/Test_ConceptDescription", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/Test_ConceptDescription" - } - ] - }, - "templateId": "http://example.org/AdministrativeInformationTemplates/Test_ConceptDescription", - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - } - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - } - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - }, - "isCaseOf": [ - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/DataSpecifications/ConceptDescriptions/TestConceptDescription" - } - ] - } - ] - }, - { - "modelType": "ConceptDescription", - "id": "https://example.org/Test_ConceptDescription_Mandatory" - }, - { - "idShort": "TestConceptDescription", - "description": [ - { - "language": "en-US", - "text": "An example concept description for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-ConceptDescription f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "ConceptDescription", - "id": "https://example.org/Test_ConceptDescription_Missing", - "administration": { - "version": "9", - "revision": "0" - } - } - ] -} \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_json_aasx/docProps/core.xml b/compliance_tool/test/files/test_demo_full_example_json_aasx/docProps/core.xml deleted file mode 100644 index 5f0e6533..00000000 --- a/compliance_tool/test/files/test_demo_full_example_json_aasx/docProps/core.xml +++ /dev/null @@ -1 +0,0 @@ -2020-01-01T00:00:00Eclipse BaSyx Python Testing FrameworkTest_DescriptionEclipse BaSyx Python Testing Framework Compliance Tool2020-01-01T00:00:011.0Test Title2.0.1 \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_wrong_attribute.json b/compliance_tool/test/files/test_demo_full_example_wrong_attribute.json deleted file mode 100644 index fcb36e68..00000000 --- a/compliance_tool/test/files/test_demo_full_example_wrong_attribute.json +++ /dev/null @@ -1,3210 +0,0 @@ -{ - "assetAdministrationShells": [ - { - "idShort": "TestAssetAdministrationShell123", - "description": [ - { - "language": "en-US", - "text": "An Example Asset Administration Shell for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Verwaltungsschale f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/Test_AssetAdministrationShell" - } - ] - }, - "templateId": "http://example.org/AdministrativeInformationTemplates/Test_AssetAdministrationShell" - }, - "derivedFrom": { - "type": "ModelReference", - "keys": [ - { - "type": "AssetAdministrationShell", - "value": "https://example.org/TestAssetAdministrationShell2" - } - ] - }, - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/TestAsset/", - "specificAssetIds": [ - { - "name": "TestKey", - "value": "TestValue", - "externalSubjectId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - } - } - ], - "assetType": "http://example.org/TestAssetType/", - "defaultThumbnail": { - "path": "file:///path/to/thumbnail.png", - "contentType": "image/png" - } - }, - "submodels": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel" - } - ], - "referredSemanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - } - }, - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Submodels/Assets/TestAsset/BillOfMaterial" - } - ] - }, - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Submodels/Assets/TestAsset/Identification" - } - ], - "referredSemanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/SubmodelTemplates/AssetIdentification" - } - ] - } - } - ], - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - } - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - } - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - }, - { - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell_Mandatory", - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/Test_Asset_Mandatory/" - }, - "submodels": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel2_Mandatory" - } - ] - }, - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel_Mandatory" - } - ] - } - ] - }, - { - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell2_Mandatory", - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/TestAsset2_Mandatory/" - } - }, - { - "idShort": "TestAssetAdministrationShell", - "description": [ - { - "language": "en-US", - "text": "An Example Asset Administration Shell for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Verwaltungsschale f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "AssetAdministrationShell", - "id": "https://example.org/Test_AssetAdministrationShell_Missing", - "administration": { - "version": "9", - "revision": "0" - }, - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/Test_Asset_Missing/", - "specificAssetIds": [ - { - "name": "TestKey", - "value": "TestValue", - "externalSubjectId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - } - } - ], - "defaultThumbnail": { - "path": "file:///TestFile.pdf", - "contentType": "application/pdf" - } - }, - "submodels": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.org/Test_Submodel_Missing" - } - ] - } - ] - } - ], - "submodels": [ - { - "idShort": "Identification", - "description": [ - { - "language": "en-US", - "text": "An example asset identification submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Identifikations-Submodel f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "http://example.org/Submodels/Assets/TestAsset/Identification", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/TestAsset/Identification" - } - ] - }, - "templateId": "http://example.org/AdministrativeInformationTemplates/TestAsset/Identification" - }, - "semanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/SubmodelTemplates/AssetIdentification" - } - ] - }, - "submodelElements": [ - { - "extensions": [ - { - "value": "ExampleExtensionValue", - "refersTo": [ - { - "type": "ModelReference", - "keys": [ - { - "type": "AssetAdministrationShell", - "value": "http://example.org/RefersTo/ExampleRefersTo" - } - ] - } - ], - "valueType": "xs:string", - "name": "ExampleExtension" - } - ], - "idShort": "ManufacturerName", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "0173-1#02-AAO677#002" - } - ] - }, - "qualifiers": [ - { - "value": "50", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:int", - "type": "http://example.org/Qualifier/ExampleQualifier2", - "kind": "TemplateQualifier" - }, - { - "value": "100", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:int", - "type": "http://example.org/Qualifier/ExampleQualifier", - "kind": "ConceptQualifier" - } - ], - "value": "ACPLT", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - }, - { - "idShort": "InstanceId", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ] - }, - "qualifiers": [ - { - "value": "2023-04-07T16:59:54.870123", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:dateTime", - "type": "http://example.org/Qualifier/ExampleQualifier3", - "kind": "ValueQualifier" - } - ], - "value": "978-8234-234-342", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - ] - }, - { - "idShort": "BillOfMaterial", - "description": [ - { - "language": "en-US", - "text": "An example bill of material submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-BillOfMaterial-Submodel f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "http://example.org/Submodels/Assets/TestAsset/BillOfMaterial", - "administration": { - "version": "9", - "templateId": "http://example.org/AdministrativeInformationTemplates/TestAsset/BillOfMaterial" - }, - "semanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/SubmodelTemplates/BillOfMaterial" - } - ] - }, - "submodelElements": [ - { - "idShort": "ExampleEntity", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Entity", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ] - }, - "statements": [ - { - "idShort": "ExampleProperty2", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - }, - { - "idShort": "ExampleProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string", - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - }, - "valueType": "xs:string" - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - } - ], - "entityType": "SelfManagedEntity", - "globalAssetId": "http://example.org/TestAsset/", - "specificAssetIds": [ - { - "name": "TestKey", - "value": "TestValue", - "externalSubjectId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SpecificAssetId/" - } - ] - } - } - ] - }, - { - "idShort": "ExampleEntity2", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung f\u00fcr eine nat\u00fcrliche oder juristische Person, die f\u00fcr die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ], - "modelType": "Entity", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ] - }, - "entityType": "CoManagedEntity" - } - ] - }, - { - "idShort": "TestSubmodel", - "description": [ - { - "language": "en-US", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/Test_Submodel" - } - ] - } - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - }, - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ], - "modelType": "RelationshipElement", - "semanticId": { - "type": "ModelReference", - "keys": [ - { - "type": "ConceptDescription", - "value": "https://example.org/Test_ConceptDescription" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty2" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ], - "modelType": "AnnotatedRelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty2" - } - ] - }, - "annotations": [ - { - "idShort": "ExampleAnnotatedProperty", - "category": "PARAMETER", - "modelType": "Property", - "value": "exampleValue", - "valueType": "xs:string" - }, - { - "idShort": "ExampleAnnotatedRange", - "category": "PARAMETER", - "modelType": "Range", - "valueType": "xs:integer", - "min": "1", - "max": "5" - } - ] - }, - { - "idShort": "ExampleOperation", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ], - "modelType": "Operation", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Operations/ExampleOperation" - } - ] - }, - "inputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "outputVariables": [ - { - "value": { - "idShort": "ExamplePropertyOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "inoutputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ] - }, - { - "idShort": "ExampleCapability", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ], - "modelType": "Capability", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Capabilities/ExampleCapability" - } - ] - } - }, - { - "idShort": "ExampleBasicEventElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example BasicEventElement object" - }, - { - "language": "de", - "text": "Beispiel BasicEventElement Element" - } - ], - "modelType": "BasicEventElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Events/ExampleBasicEventElement" - } - ] - }, - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "output", - "state": "on", - "messageTopic": "ExampleTopic", - "messageBroker": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/ExampleMessageBroker" - } - ] - }, - "lastUpdate": "2022-11-12T23:50:23.123456+00:00", - "minInterval": "PT0.000001S", - "maxInterval": "P1Y2M3DT4H5M6.123456S" - }, - { - "idShort": "ExampleSubmodelCollection", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "value": [ - { - "idShort": "ExampleBlob", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ], - "modelType": "Blob", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Blobs/ExampleBlob" - } - ] - }, - "contentType": "application/pdf", - "value": "AQIDBAU=" - }, - { - "idShort": "ExampleFile", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "value": "/TestFile.pdf", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleFileURI", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Details of the Asset Administration Shell \u2014 An example for an external file reference" - }, - { - "language": "de", - "text": "Details of the Asset Administration Shell \u2013 Ein Beispiel f\u00fcr eine extern referenzierte Datei" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "value": "https://www.plattform-i40.de/PI40/Redaktion/DE/Downloads/Publikation/Details-of-the-Asset-Administration-Shell-Part1.pdf?__blob=publicationFile&v=5", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ], - "modelType": "MultiLanguageProperty", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ], - "referredSemanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty/Referred" - } - ] - } - }, - "value": [ - { - "language": "en-US", - "text": "Example value of a MultiLanguageProperty element" - }, - { - "language": "de", - "text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element" - } - ], - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleMultiLanguageValueId" - } - ] - } - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "valueType": "xs:int", - "min": "0", - "max": "100" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ], - "modelType": "ReferenceElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ReferenceElements/ExampleReferenceElement" - } - ] - }, - "value": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleSubmodelList", - "typeValueListElement": "Property", - "valueTypeListElement": "xs:string", - "semanticIdListElement": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "orderRelevant": true, - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementList object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementList Element" - } - ], - "modelType": "SubmodelElementList", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementLists/ExampleSubmodelElementList" - } - ] - }, - "value": [ - { - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "supplementalSemanticIds": [ - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty/SupplementalId1" - } - ] - }, - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty/SupplementalId2" - } - ] - } - ], - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string", - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - } - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - } - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - }, - { - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "supplementalSemanticIds": [ - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty2/SupplementalId" - } - ] - } - ], - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - ] - } - ] - } - ] - }, - { - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel_Mandatory", - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "modelType": "RelationshipElement", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "modelType": "AnnotatedRelationshipElement", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleOperation", - "modelType": "Operation" - }, - { - "idShort": "ExampleCapability", - "modelType": "Capability" - }, - { - "idShort": "ExampleBasicEventElement", - "modelType": "BasicEventElement", - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "input", - "state": "off" - }, - { - "idShort": "ExampleSubmodelList", - "typeValueListElement": "SubmodelElementCollection", - "modelType": "SubmodelElementList", - "value": [ - { - "modelType": "SubmodelElementCollection", - "value": [ - { - "idShort": "ExampleBlob", - "modelType": "Blob", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleFile", - "modelType": "File", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "PARAMETER", - "modelType": "MultiLanguageProperty" - }, - { - "idShort": "ExampleProperty", - "category": "PARAMETER", - "modelType": "Property", - "valueType": "xs:string" - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "modelType": "Range", - "valueType": "xs:int" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "modelType": "ReferenceElement" - } - ] - }, - { - "modelType": "SubmodelElementCollection" - } - ] - }, - { - "idShort": "ExampleSubmodelList2", - "typeValueListElement": "Capability", - "modelType": "SubmodelElementList" - } - ] - }, - { - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel2_Mandatory" - }, - { - "idShort": "TestSubmodel", - "description": [ - { - "language": "en-US", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel_Missing", - "administration": { - "version": "9", - "revision": "0" - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - }, - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ], - "modelType": "RelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleRelationshipElement" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ], - "modelType": "AnnotatedRelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ] - }, - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "annotations": [ - { - "idShort": "ExampleAnnotatedRange", - "category": "PARAMETER", - "modelType": "Range", - "valueType": "xs:integer", - "min": "1", - "max": "5" - }, - { - "idShort": "ExampleAnnotatedProperty", - "category": "PARAMETER", - "modelType": "Property", - "value": "exampleValue", - "valueType": "xs:string" - } - ] - }, - { - "idShort": "ExampleOperation", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ], - "modelType": "Operation", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Operations/ExampleOperation" - } - ] - }, - "inputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "outputVariables": [ - { - "value": { - "idShort": "ExamplePropertyOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ], - "inoutputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInOutput", - "displayName": [ - { - "language": "en-US", - "text": "ExampleProperty" - }, - { - "language": "de", - "text": "BeispielProperty" - } - ], - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInOutput" - } - ] - }, - "kind": "Template", - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - }, - "valueType": "xs:string" - } - } - ] - }, - { - "idShort": "ExampleCapability", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ], - "modelType": "Capability", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Capabilities/ExampleCapability" - } - ] - } - }, - { - "idShort": "ExampleBasicEventElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example BasicEventElement object" - }, - { - "language": "de", - "text": "Beispiel BasicEventElement Element" - } - ], - "modelType": "BasicEventElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Events/ExampleBasicEventElement" - } - ] - }, - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "output", - "state": "on", - "messageTopic": "ExampleTopic", - "messageBroker": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/ExampleMessageBroker" - } - ] - }, - "lastUpdate": "2022-11-12T23:50:23.123456+00:00", - "minInterval": "PT0.000001S", - "maxInterval": "P1Y2M3DT4H5M6.123456S" - }, - { - "idShort": "ExampleSubmodelCollection", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "value": [ - { - "idShort": "ExampleBlob", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ], - "modelType": "Blob", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Blobs/ExampleBlob" - } - ] - }, - "contentType": "application/pdf", - "value": "AQIDBAU=" - }, - { - "idShort": "ExampleFile", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "value": "/TestFile.pdf", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ], - "modelType": "MultiLanguageProperty", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ] - }, - "value": [ - { - "language": "en-US", - "text": "Example value of a MultiLanguageProperty element" - }, - { - "language": "de", - "text": "Beispielwert f\u00fcr ein MultiLanguageProperty-Element" - } - ] - }, - { - "idShort": "ExampleProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "qualifiers": [ - { - "valueType": "xs:string", - "type": "http://example.org/Qualifier/ExampleQualifier" - } - ], - "value": "exampleValue", - "valueType": "xs:string" - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "valueType": "xs:int", - "min": "0", - "max": "100" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ], - "modelType": "ReferenceElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ReferenceElements/ExampleReferenceElement" - } - ] - }, - "value": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - } - ] - } - ] - }, - { - "idShort": "TestSubmodel", - "description": [ - { - "language": "en-US", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "Submodel", - "id": "https://example.org/Test_Submodel_Template", - "administration": { - "version": "9", - "revision": "0" - }, - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelTemplates/ExampleSubmodel" - } - ] - }, - "kind": "Template", - "submodelElements": [ - { - "idShort": "ExampleRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ], - "modelType": "RelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleRelationshipElement" - } - ] - }, - "kind": "Template", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleAnnotatedRelationshipElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ], - "modelType": "AnnotatedRelationshipElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ] - }, - "kind": "Template", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - } - }, - { - "idShort": "ExampleOperation", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ], - "modelType": "Operation", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Operations/ExampleOperation" - } - ] - }, - "kind": "Template", - "inputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInput", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInput" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - } - } - ], - "outputVariables": [ - { - "value": { - "idShort": "ExamplePropertyOutput", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyOutput" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - } - } - ], - "inoutputVariables": [ - { - "value": { - "idShort": "ExamplePropertyInOutput", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExamplePropertyInOutput" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - } - } - ] - }, - { - "idShort": "ExampleCapability", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ], - "modelType": "Capability", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Capabilities/ExampleCapability" - } - ] - }, - "kind": "Template" - }, - { - "idShort": "ExampleBasicEventElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example BasicEventElement object" - }, - { - "language": "de", - "text": "Beispiel BasicEventElement Element" - } - ], - "modelType": "BasicEventElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Events/ExampleBasicEventElement" - } - ] - }, - "kind": "Template", - "observed": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/Test_Submodel" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ] - }, - "direction": "output", - "state": "on", - "messageTopic": "ExampleTopic", - "messageBroker": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "http://example.org/ExampleMessageBroker" - } - ] - }, - "lastUpdate": "2022-11-12T23:50:23.123456+00:00", - "minInterval": "PT0.000001S", - "maxInterval": "P1Y2M3DT4H5M6.123456S" - }, - { - "idShort": "ExampleSubmodelList", - "typeValueListElement": "SubmodelElementCollection", - "semanticIdListElement": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "orderRelevant": true, - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementList object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementList Element" - } - ], - "modelType": "SubmodelElementList", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementLists/ExampleSubmodelElementList" - } - ] - }, - "kind": "Template", - "value": [ - { - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "kind": "Template", - "value": [ - { - "idShort": "ExampleProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ], - "modelType": "Property", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Properties/ExampleProperty" - } - ] - }, - "kind": "Template", - "valueType": "xs:string" - }, - { - "idShort": "ExampleMultiLanguageProperty", - "category": "CONSTANT", - "description": [ - { - "language": "en-US", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ], - "modelType": "MultiLanguageProperty", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ] - }, - "kind": "Template" - }, - { - "idShort": "ExampleRange", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "kind": "Template", - "valueType": "xs:int", - "max": "100" - }, - { - "idShort": "ExampleRange2", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ], - "modelType": "Range", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Ranges/ExampleRange" - } - ] - }, - "kind": "Template", - "valueType": "xs:int", - "min": "0" - }, - { - "idShort": "ExampleBlob", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ], - "modelType": "Blob", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Blobs/ExampleBlob" - } - ] - }, - "kind": "Template", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleFile", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ], - "modelType": "File", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Files/ExampleFile" - } - ] - }, - "kind": "Template", - "contentType": "application/pdf" - }, - { - "idShort": "ExampleReferenceElement", - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ], - "modelType": "ReferenceElement", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ReferenceElements/ExampleReferenceElement" - } - ] - }, - "kind": "Template" - } - ] - }, - { - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementCollection object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollection Element" - } - ], - "modelType": "SubmodelElementCollection", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "kind": "Template" - } - ] - }, - { - "idShort": "ExampleSubmodelList2", - "typeValueListElement": "Capability", - "semanticIdListElement": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection" - } - ] - }, - "orderRelevant": true, - "category": "PARAMETER", - "description": [ - { - "language": "en-US", - "text": "Example SubmodelElementList object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementList Element" - } - ], - "modelType": "SubmodelElementList", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/SubmodelElementLists/ExampleSubmodelElementList" - } - ] - }, - "kind": "Template" - } - ] - } - ], - "conceptDescriptions": [ - { - "idShort": "TestConceptDescription", - "description": [ - { - "language": "en-US", - "text": "An example concept description for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-ConceptDescription f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "ConceptDescription", - "id": "https://example.org/Test_ConceptDescription", - "administration": { - "version": "9", - "revision": "0", - "creator": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/AdministrativeInformation/Test_ConceptDescription" - } - ] - }, - "templateId": "http://example.org/AdministrativeInformationTemplates/Test_ConceptDescription", - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" - } - ] - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIec61360", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-US", - "text": "TestSpecification" - } - ], - "dataType": "REAL_MEASURE", - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification f\u00fcr Testzwecke" - }, - { - "language": "en-US", - "text": "This is a DataSpecification for testing purposes" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-US", - "text": "TestSpec" - } - ], - "unit": "SpaceUnit", - "unitId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Units/SpaceUnit" - } - ] - }, - "sourceOfDefinition": "http://example.org/DataSpec/ExampleDef", - "symbol": "SU", - "valueFormat": "M", - "valueList": { - "valueReferencePairs": [ - { - "value": "exampleValue", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId" - } - ] - } - }, - { - "value": "exampleValue2", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/ValueId/ExampleValueId2" - } - ] - } - } - ] - }, - "value": "TEST", - "valueId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/Values/TestValueId" - } - ] - }, - "levelType": { - "min": true, - "max": true, - "nom": false, - "typ": false - } - } - } - ] - }, - "isCaseOf": [ - { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "http://example.org/DataSpecifications/ConceptDescriptions/TestConceptDescription" - } - ] - } - ] - }, - { - "modelType": "ConceptDescription", - "id": "https://example.org/Test_ConceptDescription_Mandatory" - }, - { - "idShort": "TestConceptDescription", - "description": [ - { - "language": "en-US", - "text": "An example concept description for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-ConceptDescription f\u00fcr eine Test-Anwendung" - } - ], - "modelType": "ConceptDescription", - "id": "https://example.org/Test_ConceptDescription_Missing", - "administration": { - "version": "9", - "revision": "0" - } - } - ] -} \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_wrong_attribute.xml b/compliance_tool/test/files/test_demo_full_example_wrong_attribute.xml deleted file mode 100644 index 2a41f995..00000000 --- a/compliance_tool/test/files/test_demo_full_example_wrong_attribute.xml +++ /dev/null @@ -1,2991 +0,0 @@ - - - - - TestAssetAdministrationShell123 - - - en-US - An Example Asset Administration Shell for the test application - - - de - Ein Beispiel-Verwaltungsschale für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_AssetAdministrationShell - - - - http://example.org/AdministrativeInformationTemplates/Test_AssetAdministrationShell - - https://example.org/Test_AssetAdministrationShell - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - - ModelReference - - - AssetAdministrationShell - https://example.org/TestAssetAdministrationShell2 - - - - - Instance - http://example.org/TestAsset/ - - - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - http://example.org/TestAssetType/ - - file:///path/to/thumbnail.png - image/png - - - - - ModelReference - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/AssetIdentification - - - - - - Submodel - http://example.org/Submodels/Assets/TestAsset/Identification - - - - - ModelReference - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - Submodel - https://example.org/Test_Submodel - - - - - ModelReference - - - Submodel - http://example.org/Submodels/Assets/TestAsset/BillOfMaterial - - - - - - - https://example.org/Test_AssetAdministrationShell_Mandatory - - Instance - http://example.org/Test_Asset_Mandatory/ - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel2_Mandatory - - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel_Mandatory - - - - - - - https://example.org/Test_AssetAdministrationShell2_Mandatory - - Instance - http://example.org/TestAsset2_Mandatory/ - - - - TestAssetAdministrationShell - - - en-US - An Example Asset Administration Shell for the test application - - - de - Ein Beispiel-Verwaltungsschale für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_AssetAdministrationShell_Missing - - Instance - http://example.org/Test_Asset_Missing/ - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - - file:///TestFile.pdf - application/pdf - - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel_Missing - - - - - - - - - Identification - - - en-US - An example asset identification submodel for the test application - - - de - Ein Beispiel-Identifikations-Submodel für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/TestAsset/Identification - - - - http://example.org/AdministrativeInformationTemplates/TestAsset/Identification - - http://example.org/Submodels/Assets/TestAsset/Identification - Instance - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/AssetIdentification - - - - - - - - ExampleExtension - xs:string - ExampleExtensionValue - - - ModelReference - - - AssetAdministrationShell - http://example.org/RefersTo/ExampleRefersTo - - - - - - - PARAMETER - ManufacturerName - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - 0173-1#02-AAO677#002 - - - - - - ConceptQualifier - http://example.org/Qualifier/ExampleQualifier - xs:int - 100 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - TemplateQualifier - http://example.org/Qualifier/ExampleQualifier2 - xs:int - 50 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - xs:string - ACPLT - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - PARAMETER - InstanceId - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - - - ValueQualifier - http://example.org/Qualifier/ExampleQualifier3 - xs:dateTime - 2023-04-07T16:59:54.870123 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - xs:string - 978-8234-234-342 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - BillOfMaterial - - - en-US - An example bill of material submodel for the test application - - - de - Ein Beispiel-BillOfMaterial-Submodel für eine Test-Anwendung - - - - 9 - http://example.org/AdministrativeInformationTemplates/TestAsset/BillOfMaterial - - http://example.org/Submodels/Assets/TestAsset/BillOfMaterial - Instance - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/BillOfMaterial - - - - - - PARAMETER - ExampleEntity - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - - - CONSTANT - ExampleProperty2 - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - SelfManagedEntity - http://example.org/TestAsset/ - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - - - PARAMETER - ExampleEntity2 - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - CoManagedEntity - - - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_Submodel - - - - - https://example.org/Test_Submodel - Instance - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ModelReference - - - ConceptDescription - https://example.org/Test_ConceptDescription - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty2 - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty2 - - - - - - PARAMETER - ExampleAnnotatedProperty - xs:string - exampleValue - - - PARAMETER - ExampleAnnotatedRange - xs:integer - 1 - 5 - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelCollection - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - AQIDBAU= - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - /TestFile.pdf - application/pdf - - - CONSTANT - ExampleFileURI - - - en-US - Details of the Asset Administration Shell — An example for an external file reference - - - de - Details of the Asset Administration Shell – Ein Beispiel für eine extern referenzierte Datei - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - https://www.plattform-i40.de/PI40/Redaktion/DE/Downloads/Publikation/Details-of-the-Asset-Administration-Shell-Part1.pdf?__blob=publicationFile&v=5 - application/pdf - - - PARAMETER - ExampleSubmodelList - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - Property - xs:string - - - CONSTANT - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/SupplementalId1 - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/SupplementalId2 - - - - - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - CONSTANT - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty2/SupplementalId - - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/Referred - - - - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - en-US - Example value of a MultiLanguageProperty element - - - de - Beispielwert für ein MultiLanguageProperty-Element - - - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleMultiLanguageValueId - - - - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - 100 - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - - - - - https://example.org/Test_Submodel_Mandatory - Instance - - - ExampleRelationshipElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - ExampleAnnotatedRelationshipElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - ExampleOperation - - - ExampleCapability - - - ExampleBasicEventElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - input - off - - - ExampleSubmodelList - SubmodelElementCollection - - - - - ExampleBlob - - application/pdf - - - ExampleFile - application/pdf - - - PARAMETER - ExampleMultiLanguageProperty - - - PARAMETER - ExampleProperty - xs:string - - - PARAMETER - ExampleRange - xs:int - - - PARAMETER - ExampleReferenceElement - - - - - - - - - ExampleSubmodelList2 - Capability - - - - - https://example.org/Test_Submodel2_Mandatory - Instance - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_Submodel_Missing - Instance - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRange - xs:integer - 1 - 5 - - - PARAMETER - ExampleAnnotatedProperty - xs:string - exampleValue - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelCollection - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - AQIDBAU= - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - /TestFile.pdf - application/pdf - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - en-US - Example value of a MultiLanguageProperty element - - - de - Beispielwert für ein MultiLanguageProperty-Element - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - http://example.org/Qualifier/ExampleQualifier - xs:string - - - xs:string - exampleValue - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - 100 - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - - - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_Submodel_Template - Template - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelList - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - SubmodelElementCollection - - - PARAMETER - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 100 - - - PARAMETER - ExampleRange2 - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - application/pdf - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - - - - PARAMETER - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - - - PARAMETER - ExampleSubmodelList2 - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - Capability - - - - - - - TestConceptDescription - - - en-US - An example concept description for the test application - - - de - Ein Beispiel-ConceptDescription für eine Test-Anwendung - - - - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_ConceptDescription - - - - http://example.org/AdministrativeInformationTemplates/Test_ConceptDescription - - https://example.org/Test_ConceptDescription - - - ExternalReference - - - GlobalReference - http://example.org/DataSpecifications/ConceptDescriptions/TestConceptDescription - - - - - - - https://example.org/Test_ConceptDescription_Mandatory - - - TestConceptDescription - - - en-US - An example concept description for the test application - - - de - Ein Beispiel-ConceptDescription für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_ConceptDescription_Missing - - - diff --git a/compliance_tool/test/files/test_demo_full_example_xml_aasx/TestFile.pdf b/compliance_tool/test/files/test_demo_full_example_xml_aasx/TestFile.pdf deleted file mode 100644 index 2bccbec5f60ea7a8f51e5fd41eda019cf27a08d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8178 zcma)>Wl&sQv+qOj0fGjX!JV1G-6as*B{+lY;1)a(Jdoh-7Ti6!ySoGk?rt~FIqzHd zRK2(A++FKK_gcNX|JAGahh0BfWl3pP2pboGc4DS?0l)zS1077P0fK@6kUZ4h!o?EE z#R>e^0{}@|*}6bsK#;Vpu?tiZYU*GH1qcfRoLyj0V>^Jyk~3g)%DqOpa;AopgIx_p zRt;RuImyAvp;gH_!2zjPMv+wsn*+~8Vw`WmFgD-5*}+Er4S?F4{VTy=>!0Gh{~-bb zgm7?k{aX?{kc*F#h!_ z5Qu4SDc*3QlYZ%4o-x)IRHTS{>*5ppMv~P3!=PB+PN$J5I(ou0Nm$} zQz8op5ZJ5`61}=LbI6_eT$Ck3LVz%|xMP7kCY+ID&Jdi4`AP2?6T#u_^YSjB|81NR zSX)<<)ZZJ<(T|>IGIL)6UU0J`EjH8K2boeV!&0deaUDSrVe@VOYd~PDal7N2i1UC@ zgy+KTOaUx}x4hJ8mHyN#?*raG3ka;CyWh93IsyZ*HapvCtdQn`G^Be#)Mg;>|=unY>BC>Q*hQUu9QP}9`g^{mev(imj zaEt4+TNV4K;l8g}{--g#cL9F8?4sK`XvlXj3NVsNng!I?fTzsj7v|ru{b!jvFFbLt z?qbRmG#81fr-`qxPThi71O6g!1g(54J>dT2p0kTS^US<`(W`xMv?1OKlpL{gm7(ZFQ42LErOxrz8Z$=gV z1`&`}r1_B-2f)MyUcV9^QHZp<(KE<93$O2IU=W{q#UJ1U!sbJ#~M_|I89f!PO zvqb;1CrN7tr}DIYHI4EhV?s}Xj#Tl}Ft+xTmWe%4aIZ8l$L7{BKo!0QaAS5TsLR}Gh6*eX%j|}$u#ILL zwiLV`zFTo|xLT+_mrMT6wuox~fp?PS7u{1YihH!_E(0|^s%Fv;b$_q^OxW+o7w~lr z=H3y%Y+zPwl;n9}mL8hPZL~DJg<(p#Cl7}cWYxrs_Caw~U;sC-IiaK*Os=jCzO?V^ zP|Ws!CJLF@CfY2evN73*hNYetrPRaL*9LiF^N(aiX-@0hIX^P)NO9HP5GqPES0g=o z5ZgB0+3_AOkr2!-_W54o6WsQ*s8vf;j0a!?m>aGumlColei+oO3Y`XH=1|O2xXoX& z)CX&~Djz7DI9&&!ST^ePkIE0{*9g<~89%ad>UGvxRR9$3h2!`rzeq76tUi}`jiBFu z$3$9>qqL_!f-c65ynFEi<>guTZ;W=K%<@jfEOBoMiVtn9oF8wer~A8Rak*Zp3&`N{m`?Y*x>{+&!)7BfSjz;a-=o5~mC(FVfkY?TEnvB~1Kw8Jz z3cB~)kzGhvMC2T|%c|7*5?}tn{m*C3 zFw~6NbY+mGsn`1g`Pcc|6mV5IUAKhr+l$E3n%hPW&4RDx%RH|0Nq$16nr-GLUP<0U zjsaPAK1B}Swx2hsw6Lmsc0(k+S%IMBSm|K-txZBhbnj*!zaS9h$p~$^+t`RwJ}f+6 z(Dyf)&*$9I+nj^zj|y8xy1g$LtiX;i9#h2%(byXw7TV!wHKT$H$m8=8N&Xu5d*|Bq z_c`GX3!Hk`u+dWH-W1;^!Acm_^`FJq4)bV8NzL8TG;aZ|B+>0cH%s)nSZoF%oJ5oB zoLY%P1Y-6RDJq*vg1c<`T+x;+D*k(EPpcNDlfut!vZgfU-@36GS+o>;Kh`;NXThXG ztL1||s@udB3NuBKBd9m5(BkMkfg10c$?b(FxF=eL`3tzbSfL<;+M+#x%gSsFF4O&4 z`?^-VcKJs2rDJWC_^b7+DSNe8sK6{B*%r%D1#Gp{B;IWib3Bxi`!%x3z9GHoXy86> z+&E7|qrxDc*_DHj;aIk?d^&#d)*M$)#H)sW+aV7KM+9AM33zrak^)P~Qi6VHYLNs^ zUI+N#zn;&?NBI+;e{WYs(^G};l2%i64sg4<^?!|8Hea(57%6D~EY+plmDtU{`XbsQ zd^>w{SdH84&a8Movf(+mrSF?g{cNGRk=SYVI#tDN8kSr9<7VONDzjB$U0N8%pKnb#lQZeJelh5%L4Xh_{84So z{`7L}5f7iXV)7&Co#57zATjSB^lf{Pr@(^3-mTL~ZW1f;JU8a|rA#KPmbStxone*h zg}^xQfQDFktYRL2JiaU92eK8rj1+k7Y`lJ(KF-qKy@IvBxftGJ(3^yu8aHr-Z&a$3J&HF7H<{wD|WZ zg&Eb($DlQy_;dY=%t{(*G1)ji*=^JeEXg5+)ihChwYu6=_A}N+y`xW#>U?Ok7}AIF zi_?)9BK27*BBrv|IVjpwh60HI<}tPg8-9P|ng!V(7?g*6ImrkU6-St*z3>a=g{=H4 z2Zu43mToKj>2-7$9-amica(6%aGJUB;-ALfaEgn8OM04Z!`XV)qJi6rt3QZ)8n65}p9aj3y zdDHvOFguHl3lB1)D~iH3G=LXVC1qPHCDSC_V(e@xmWpbLCMB|i@>xRLT!vC~uYjE${pUi4X^wY{L0C9$4-E0SIc+I77o zgQv>m50>7$@GUZ)Ee|}|*>TNn_v!X#Vu}=MpJdE-mKgYyF&$c~OoA_(47m3lCUrlYVS?YlV-da?bb* z8s}Z&gH@F$pQeC5sX2f--fq5*wlB+{PcpzVE)8CjYYsjYiL_zq&ekln@eQ*zNy zVXMF+b6PIBNAo$=KSeqji{mr-)|zBKEBB;*{RQIDW!Xe4fxIIFcVS2ODE6$1F!EEz zp;MF)BsZ;hu%HPH=;h*zr2Yo|ntO3yb5ap2Q27;8kJ=_?4{n|#Ca;Id@6!KNLrpy> zIjw#k{uC_yd2_#IS^V1|ar*aqkx3PXK$RcQ5fSe+Z1Od8kofHTx6*!8P~Z(=p|5a< z5q+Kal}Zv~$((iEiIL+7- z)IG}jn)eIalSd>`qiCvCDZ5}33;M!0Zw6~qW0}1nzm3Z z5sFy1A-(S$1qT_p- zwOD%*7|NNTR2fUqLm{u-OGxGie=UJJ$_eAS8N+e=;!2$&!&ryo!CZoe>OjPNt7fgl zX4G__&8+1*mwj+JSy=BpTE1JiRAIUOLf1rGW_Mar<)%nRlHZH( z$}G>Pcql7;_UIN~NsLwlsZ6YSqU3&`tYvvW+WBV@$o&rw+11d6t!$z3y*Xd7E14L5 z)l7S4{q?TJffkHbwOuU3F=Wa}P<^bSm145KeR)}GHH9AMgH5A~%f$AxFLJu#VG-$f zJg~I%Pa84v{EVppu{)Wnx zl{W5+VB?9RSN_OS)dzQP>$;ibva)PGi#AWf zAtyZ}JuU!Oaf}uupHlk;{Q3KzfYGNegTD#MejSx`Ws_KlyL&p+nG{ z8F|BZXOp@Lq*t5z7mN4XKdGWTlU$GV6D6qqzJh-i**0&05?K_Pb_%%``z$MTCmq8} zKgXx72}k~(ST$_3O|IB5WS2GL>)uJs2#Hu{o3e*en~iO5&NcJL zAb!*)u(ujnsE&@1w0Y@ef`T*!I`Yn8mh(jedGCj{c2M#3A#~Rz&kYze@*d2Ly(Hc7 zQf1+ARh8t3Ok6KjI91Q2ZRx%si%_uCy@vIPSSTl|BPzLDb(zm`k&%om2^ zti{4H=VKkBgyM6OBb+5d?^AP2IbuoxZc?~Apk(lQ-14k%qF$H545Pc&i}<186Tf&6 zX4xY3x}g$}-I432fy!R@azU%BfR5Hq4Ia6NzJvnHeX!{_FY8#mVK>q0n0v?ovsLS= zO%d>u72{_hR*pHld5(rLR9)tn5SL0No>$Sm$X%HXYQV|c{(pX6(Htt>+C8*l4C{R`5$_BU#r_|dHsyay>74IO)?sLYZT|-{_ThP*)T3TW{N)I#AaqTHt8x%bCj*g?#JK{5ntB z8xb(%-HZ0iREG3t+^CefC%0rZcO61RHU2SIFn_O< zpL7l@3iI{7+iAQJinYO~OgBObQ60o4C4n$xYS3ME0{_gVHFb@W1i=tr0<#jV9h0Q) z#uh9XmwoR!vT?e27HnVM2dB;1-;i_{-B`7&dN&&1S!fpBr*c%l z;du2X3frI^ccs9pC_3tqrOl-BZC0x{+a2on1t#S?r6E|2mi>)q23!z-fsxKDHM_by zj6T)jYs7qMOx^U~5?-6e=L7JXJzI?l7b8KAiI~`h4K@zpWrcns*E<-8S6JD*#~eDg z8V-NbC6Ur9Iphi__Tuz>Db&36r#8=a~5Q@PKYi>lq(Cmk#v%tb%!Xo;A-bYoHE{^}fliP@P0t z+pl?p!f&*cg9@~f!)(YXX<-g!v)K2$W8oU&zt(0)7f?>BQ$d!URTPVdX&-S6(p$dDH2xi zN`?m)IwXFg89KA_bFpD{jW^$G{TAc&$X4+M=R*OB0N2UAw&lhj99rJhJ99R6v{6q! zr;CuqoxaXrLi3<<-^zS%OdqD~#ULwy9cMy6TuohLB0NDfA~DFN=_KKkU zjMq|Ps&M<`OgXgkBW85@fQLzalY8h>7Ld( zqSQn!mLwnKF2BFmBVrsTKCge|L}VVH$Qw#|*JN}qceLD$qJQ^8tN>;_XC&+5m~nkPho$t9|a zq56o`$6$L@vhSdnX#1)*^hkA37gKx$MQ3qlfr#F8rn08Xo>rx!v-Xrjq=q2H__1)u zC3btIRe3oF@l#{_S{%FCSqL#*dBkSARifNHaWdNWeh9tiAZC>K@2}gup(L)ip%u6E z$>#H)0?0|1%h)r?7ozg8s@QSA4HoL#zk7kcKF}QxCK_;6^^;&pr!KzVj zJTO8{C3}@xI# zBV7V(%?2za@d?8o4d0YzQvrv~Rr#8@;c=P@w?YAQww#QG38<0EeiBy<88C4mnz5e1 zD8l~CEC8&b`q(OqUIDNrTU^I>AgzYeP%`2fA1f1<<6p7xU#n8Ob&!n&vJV5I_v+-! z4n0II3H}Th0cu>vT*}ra!H*EcJ)`7EgM0s}nfnhO$K(=4sxTwC- zQn4!haRQwnXKnDQ=v4YLMCgea(*(+JnvwM0jP&t5@uYF8r>*dk_?w=iTZe(N7Pkb! zq1#|-d>Jrzl0<>>Q(+qV6z$aa_KpD^99uywXJbV7R`iu6jH`Fi%_MR23s%-zxqwH%3D3h&luYxAHI%D zY@Gb128tsb>Sr1d=KS6M7LF=@?vW)1FPPR&GXN2QI4Ovp)PKP=wq!j|Drwp+A=-8F zCR;sg)cZFZ^wjFpmvV#}QNzY^@bq1oRKQ@hijQG2Krx;tC%xTwH)->_Q@NtAexb)d z;hPJZ1krNAY@AesBVuhsPdTM@oyw5IuUzU|e|DLmSB&S$11*KYfd?*}@Tu%zJ`3|~ z)9N*u2#XNimh0>>B}{mM_Zk&cCGDP)-Q{mF!IRL!w?BR?Fl)yr0rcx+Dqd9D6?3F(a96o}?SE*nuYe z>ZkEvqK1A^AySv}&D`183=J1@Wi$oAb;e|)^N209G6ZZ-gB>w6L2R>asV;eKjSL~cG0LZL6v?e~Z3 zi{lBN2}oq=dM3EC-`Ku=ou~QX(;?Ann7&M_iwPIyImc9|kyURCtQhjOUd4IP>lL0> zR@3J{xf%rWKfszY%)!jn^e@a~a5OVlhidMcat8ig|E-Ays0oER|1AyVV1sZ%xcJz)xmelRxc{y7zZ3%H zt=ynMb})nwWCnEuNkUDmjO`hLHjc(Fmd;RPpxeJvaI^hQ@=plkKgjZ5sFCY`bVS|L z5eft;nOLj2*a1L_K%RdXBFxzZ$oYQ(BL^q%|2GVUsulTPEv?NlNa~Wm)I`G1PGE{x$X@h26BK1R(k9E`Rb`{F(wg^t(8#+qKz?j@d zs-h`MG9gkA{^M)snP3{Y6d6J|WPkYPgQaF=e7V|;JyD(m>ugvWyHQ#5$K5+;=z(IU z-7VfgQX+-t;Ib10q(q?qy<8nOS zEYz9Gdt2tzCtpCC!0Lj{$K|O$a;J*M_9{^Ib@`C=g03a=(9t6k^ zg#6u8b#QP2Lco9DSN$j4+yVGs-^o9YBv4Nf43Xyed+Xd>Tv8kmK54Fhh7imL5tD$3 zNlWqa@CpO}_mIC;{teT?{~90Q{|=~4jg0Qbdpd_ude9@$pU_29LR5A|!psp(=%l|e v0=YS`Y9MkQ#zx--#@@WK&qTQX&#pMT7{gpVV1N6-!^^`5prw^kk_P-Ay3<)0 diff --git a/compliance_tool/test/files/test_demo_full_example_xml_aasx/[Content_Types].xml b/compliance_tool/test/files/test_demo_full_example_xml_aasx/[Content_Types].xml deleted file mode 100644 index efab09eb..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_aasx/[Content_Types].xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_xml_aasx/_rels/.rels b/compliance_tool/test/files/test_demo_full_example_xml_aasx/_rels/.rels deleted file mode 100644 index 9758543f..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_aasx/_rels/.rels +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/_rels/aasx-origin.rels b/compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/_rels/aasx-origin.rels deleted file mode 100644 index fc764b65..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/_rels/aasx-origin.rels +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/_rels/data.xml.rels b/compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/_rels/data.xml.rels deleted file mode 100644 index 43350edd..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/_rels/data.xml.rels +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/aasx-origin b/compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/aasx-origin deleted file mode 100644 index e69de29b..00000000 diff --git a/compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/data.xml b/compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/data.xml deleted file mode 100644 index d5b9806e..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_aasx/aasx/data.xml +++ /dev/null @@ -1,2999 +0,0 @@ - - - - - TestAssetAdministrationShell - - - en-US - An Example Asset Administration Shell for the test application - - - de - Ein Beispiel-Verwaltungsschale für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_AssetAdministrationShell - - - - http://example.org/AdministrativeInformationTemplates/Test_AssetAdministrationShell - - https://example.org/Test_AssetAdministrationShell - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - - ModelReference - - - AssetAdministrationShell - https://example.org/TestAssetAdministrationShell2 - - - - - Instance - http://example.org/TestAsset/ - - - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - - file:///path/to/thumbnail.png - image/png - - - - - ModelReference - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/AssetIdentification - - - - - - Submodel - http://example.org/Submodels/Assets/TestAsset/Identification - - - - - ModelReference - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - Submodel - https://example.org/Test_Submodel - - - - - ModelReference - - - Submodel - http://example.org/Submodels/Assets/TestAsset/BillOfMaterial - - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel_Template - - - - - - - https://example.org/Test_AssetAdministrationShell_Mandatory - - Instance - http://example.org/Test_Asset_Mandatory/ - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel2_Mandatory - - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel_Mandatory - - - - - - - https://example.org/Test_AssetAdministrationShell2_Mandatory - - Instance - http://example.org/TestAsset2_Mandatory/ - - - - TestAssetAdministrationShell - - - en-US - An Example Asset Administration Shell for the test application - - - de - Ein Beispiel-Verwaltungsschale für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_AssetAdministrationShell_Missing - - Instance - http://example.org/Test_Asset_Missing/ - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - - file:///TestFile.pdf - application/pdf - - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel_Missing - - - - - - - - - Identification - - - en-US - An example asset identification submodel for the test application - - - de - Ein Beispiel-Identifikations-Submodel für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/TestAsset/Identification - - - - http://example.org/AdministrativeInformationTemplates/TestAsset/Identification - - http://example.org/Submodels/Assets/TestAsset/Identification - Instance - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/AssetIdentification - - - - - - - - ExampleExtension - xs:string - ExampleExtensionValue - - - ModelReference - - - AssetAdministrationShell - http://example.org/RefersTo/ExampleRefersTo - - - - - - - PARAMETER - ManufacturerName - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - 0173-1#02-AAO677#002 - - - - - - ConceptQualifier - http://example.org/Qualifier/ExampleQualifier - xs:int - 100 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - TemplateQualifier - http://example.org/Qualifier/ExampleQualifier2 - xs:int - 50 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - xs:string - ACPLT - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - PARAMETER - InstanceId - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - - - ValueQualifier - http://example.org/Qualifier/ExampleQualifier3 - xs:dateTime - 2023-04-07T16:59:54.870123 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - xs:string - 978-8234-234-342 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - BillOfMaterial - - - en-US - An example bill of material submodel for the test application - - - de - Ein Beispiel-BillOfMaterial-Submodel für eine Test-Anwendung - - - - 9 - http://example.org/AdministrativeInformationTemplates/TestAsset/BillOfMaterial - - http://example.org/Submodels/Assets/TestAsset/BillOfMaterial - Instance - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/BillOfMaterial - - - - - - PARAMETER - ExampleEntity - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - - - CONSTANT - ExampleProperty2 - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - SelfManagedEntity - http://example.org/TestAsset/ - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - - - PARAMETER - ExampleEntity2 - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - CoManagedEntity - - - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_Submodel - - - - - https://example.org/Test_Submodel - Instance - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ModelReference - - - ConceptDescription - https://example.org/Test_ConceptDescription - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty2 - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty2 - - - - - - PARAMETER - ExampleAnnotatedProperty - xs:string - exampleValue - - - PARAMETER - ExampleAnnotatedRange - xs:integer - 1 - 5 - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelCollection - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - AQIDBAU= - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - /TestFile.pdf - application/pdf - - - CONSTANT - ExampleFileURI - - - en-US - Details of the Asset Administration Shell — An example for an external file reference - - - de - Details of the Asset Administration Shell – Ein Beispiel für eine extern referenzierte Datei - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - https://www.plattform-i40.de/PI40/Redaktion/DE/Downloads/Publikation/Details-of-the-Asset-Administration-Shell-Part1.pdf?__blob=publicationFile&v=5 - application/pdf - - - PARAMETER - ExampleSubmodelList - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - Property - xs:string - - - CONSTANT - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/SupplementalId1 - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/SupplementalId2 - - - - - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - CONSTANT - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty2/SupplementalId - - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/Referred - - - - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - en-US - Example value of a MultiLanguageProperty element - - - de - Beispielwert für ein MultiLanguageProperty-Element - - - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleMultiLanguageValueId - - - - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - 100 - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - - - - - https://example.org/Test_Submodel_Mandatory - Instance - - - ExampleRelationshipElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - ExampleAnnotatedRelationshipElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - ExampleOperation - - - ExampleCapability - - - ExampleBasicEventElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - input - off - - - ExampleSubmodelList - SubmodelElementCollection - - - - - ExampleBlob - - application/pdf - - - ExampleFile - application/pdf - - - PARAMETER - ExampleMultiLanguageProperty - - - PARAMETER - ExampleProperty - xs:string - - - PARAMETER - ExampleRange - xs:int - - - PARAMETER - ExampleReferenceElement - - - - - - - - - ExampleSubmodelList2 - Capability - - - - - https://example.org/Test_Submodel2_Mandatory - Instance - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_Submodel_Missing - Instance - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRange - xs:integer - 1 - 5 - - - PARAMETER - ExampleAnnotatedProperty - xs:string - exampleValue - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelCollection - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - AQIDBAU= - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - /TestFile.pdf - application/pdf - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - en-US - Example value of a MultiLanguageProperty element - - - de - Beispielwert für ein MultiLanguageProperty-Element - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - http://example.org/Qualifier/ExampleQualifier - xs:string - - - xs:string - exampleValue - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - 100 - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - - - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_Submodel_Template - Template - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelList - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - SubmodelElementCollection - - - PARAMETER - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 100 - - - PARAMETER - ExampleRange2 - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - application/pdf - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - - - - PARAMETER - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - - - PARAMETER - ExampleSubmodelList2 - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - Capability - - - - - - - TestConceptDescription - - - en-US - An example concept description for the test application - - - de - Ein Beispiel-ConceptDescription für eine Test-Anwendung - - - - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_ConceptDescription - - - - http://example.org/AdministrativeInformationTemplates/Test_ConceptDescription - - https://example.org/Test_ConceptDescription - - - ExternalReference - - - GlobalReference - http://example.org/DataSpecifications/ConceptDescriptions/TestConceptDescription - - - - - - - https://example.org/Test_ConceptDescription_Mandatory - - - TestConceptDescription - - - en-US - An example concept description for the test application - - - de - Ein Beispiel-ConceptDescription für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_ConceptDescription_Missing - - - diff --git a/compliance_tool/test/files/test_demo_full_example_xml_aasx/docProps/core.xml b/compliance_tool/test/files/test_demo_full_example_xml_aasx/docProps/core.xml deleted file mode 100644 index 5f0e6533..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_aasx/docProps/core.xml +++ /dev/null @@ -1 +0,0 @@ -2020-01-01T00:00:00Eclipse BaSyx Python Testing FrameworkTest_DescriptionEclipse BaSyx Python Testing Framework Compliance Tool2020-01-01T00:00:011.0Test Title2.0.1 \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/TestFile.pdf b/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/TestFile.pdf deleted file mode 100644 index 2bccbec5f60ea7a8f51e5fd41eda019cf27a08d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8178 zcma)>Wl&sQv+qOj0fGjX!JV1G-6as*B{+lY;1)a(Jdoh-7Ti6!ySoGk?rt~FIqzHd zRK2(A++FKK_gcNX|JAGahh0BfWl3pP2pboGc4DS?0l)zS1077P0fK@6kUZ4h!o?EE z#R>e^0{}@|*}6bsK#;Vpu?tiZYU*GH1qcfRoLyj0V>^Jyk~3g)%DqOpa;AopgIx_p zRt;RuImyAvp;gH_!2zjPMv+wsn*+~8Vw`WmFgD-5*}+Er4S?F4{VTy=>!0Gh{~-bb zgm7?k{aX?{kc*F#h!_ z5Qu4SDc*3QlYZ%4o-x)IRHTS{>*5ppMv~P3!=PB+PN$J5I(ou0Nm$} zQz8op5ZJ5`61}=LbI6_eT$Ck3LVz%|xMP7kCY+ID&Jdi4`AP2?6T#u_^YSjB|81NR zSX)<<)ZZJ<(T|>IGIL)6UU0J`EjH8K2boeV!&0deaUDSrVe@VOYd~PDal7N2i1UC@ zgy+KTOaUx}x4hJ8mHyN#?*raG3ka;CyWh93IsyZ*HapvCtdQn`G^Be#)Mg;>|=unY>BC>Q*hQUu9QP}9`g^{mev(imj zaEt4+TNV4K;l8g}{--g#cL9F8?4sK`XvlXj3NVsNng!I?fTzsj7v|ru{b!jvFFbLt z?qbRmG#81fr-`qxPThi71O6g!1g(54J>dT2p0kTS^US<`(W`xMv?1OKlpL{gm7(ZFQ42LErOxrz8Z$=gV z1`&`}r1_B-2f)MyUcV9^QHZp<(KE<93$O2IU=W{q#UJ1U!sbJ#~M_|I89f!PO zvqb;1CrN7tr}DIYHI4EhV?s}Xj#Tl}Ft+xTmWe%4aIZ8l$L7{BKo!0QaAS5TsLR}Gh6*eX%j|}$u#ILL zwiLV`zFTo|xLT+_mrMT6wuox~fp?PS7u{1YihH!_E(0|^s%Fv;b$_q^OxW+o7w~lr z=H3y%Y+zPwl;n9}mL8hPZL~DJg<(p#Cl7}cWYxrs_Caw~U;sC-IiaK*Os=jCzO?V^ zP|Ws!CJLF@CfY2evN73*hNYetrPRaL*9LiF^N(aiX-@0hIX^P)NO9HP5GqPES0g=o z5ZgB0+3_AOkr2!-_W54o6WsQ*s8vf;j0a!?m>aGumlColei+oO3Y`XH=1|O2xXoX& z)CX&~Djz7DI9&&!ST^ePkIE0{*9g<~89%ad>UGvxRR9$3h2!`rzeq76tUi}`jiBFu z$3$9>qqL_!f-c65ynFEi<>guTZ;W=K%<@jfEOBoMiVtn9oF8wer~A8Rak*Zp3&`N{m`?Y*x>{+&!)7BfSjz;a-=o5~mC(FVfkY?TEnvB~1Kw8Jz z3cB~)kzGhvMC2T|%c|7*5?}tn{m*C3 zFw~6NbY+mGsn`1g`Pcc|6mV5IUAKhr+l$E3n%hPW&4RDx%RH|0Nq$16nr-GLUP<0U zjsaPAK1B}Swx2hsw6Lmsc0(k+S%IMBSm|K-txZBhbnj*!zaS9h$p~$^+t`RwJ}f+6 z(Dyf)&*$9I+nj^zj|y8xy1g$LtiX;i9#h2%(byXw7TV!wHKT$H$m8=8N&Xu5d*|Bq z_c`GX3!Hk`u+dWH-W1;^!Acm_^`FJq4)bV8NzL8TG;aZ|B+>0cH%s)nSZoF%oJ5oB zoLY%P1Y-6RDJq*vg1c<`T+x;+D*k(EPpcNDlfut!vZgfU-@36GS+o>;Kh`;NXThXG ztL1||s@udB3NuBKBd9m5(BkMkfg10c$?b(FxF=eL`3tzbSfL<;+M+#x%gSsFF4O&4 z`?^-VcKJs2rDJWC_^b7+DSNe8sK6{B*%r%D1#Gp{B;IWib3Bxi`!%x3z9GHoXy86> z+&E7|qrxDc*_DHj;aIk?d^&#d)*M$)#H)sW+aV7KM+9AM33zrak^)P~Qi6VHYLNs^ zUI+N#zn;&?NBI+;e{WYs(^G};l2%i64sg4<^?!|8Hea(57%6D~EY+plmDtU{`XbsQ zd^>w{SdH84&a8Movf(+mrSF?g{cNGRk=SYVI#tDN8kSr9<7VONDzjB$U0N8%pKnb#lQZeJelh5%L4Xh_{84So z{`7L}5f7iXV)7&Co#57zATjSB^lf{Pr@(^3-mTL~ZW1f;JU8a|rA#KPmbStxone*h zg}^xQfQDFktYRL2JiaU92eK8rj1+k7Y`lJ(KF-qKy@IvBxftGJ(3^yu8aHr-Z&a$3J&HF7H<{wD|WZ zg&Eb($DlQy_;dY=%t{(*G1)ji*=^JeEXg5+)ihChwYu6=_A}N+y`xW#>U?Ok7}AIF zi_?)9BK27*BBrv|IVjpwh60HI<}tPg8-9P|ng!V(7?g*6ImrkU6-St*z3>a=g{=H4 z2Zu43mToKj>2-7$9-amica(6%aGJUB;-ALfaEgn8OM04Z!`XV)qJi6rt3QZ)8n65}p9aj3y zdDHvOFguHl3lB1)D~iH3G=LXVC1qPHCDSC_V(e@xmWpbLCMB|i@>xRLT!vC~uYjE${pUi4X^wY{L0C9$4-E0SIc+I77o zgQv>m50>7$@GUZ)Ee|}|*>TNn_v!X#Vu}=MpJdE-mKgYyF&$c~OoA_(47m3lCUrlYVS?YlV-da?bb* z8s}Z&gH@F$pQeC5sX2f--fq5*wlB+{PcpzVE)8CjYYsjYiL_zq&ekln@eQ*zNy zVXMF+b6PIBNAo$=KSeqji{mr-)|zBKEBB;*{RQIDW!Xe4fxIIFcVS2ODE6$1F!EEz zp;MF)BsZ;hu%HPH=;h*zr2Yo|ntO3yb5ap2Q27;8kJ=_?4{n|#Ca;Id@6!KNLrpy> zIjw#k{uC_yd2_#IS^V1|ar*aqkx3PXK$RcQ5fSe+Z1Od8kofHTx6*!8P~Z(=p|5a< z5q+Kal}Zv~$((iEiIL+7- z)IG}jn)eIalSd>`qiCvCDZ5}33;M!0Zw6~qW0}1nzm3Z z5sFy1A-(S$1qT_p- zwOD%*7|NNTR2fUqLm{u-OGxGie=UJJ$_eAS8N+e=;!2$&!&ryo!CZoe>OjPNt7fgl zX4G__&8+1*mwj+JSy=BpTE1JiRAIUOLf1rGW_Mar<)%nRlHZH( z$}G>Pcql7;_UIN~NsLwlsZ6YSqU3&`tYvvW+WBV@$o&rw+11d6t!$z3y*Xd7E14L5 z)l7S4{q?TJffkHbwOuU3F=Wa}P<^bSm145KeR)}GHH9AMgH5A~%f$AxFLJu#VG-$f zJg~I%Pa84v{EVppu{)Wnx zl{W5+VB?9RSN_OS)dzQP>$;ibva)PGi#AWf zAtyZ}JuU!Oaf}uupHlk;{Q3KzfYGNegTD#MejSx`Ws_KlyL&p+nG{ z8F|BZXOp@Lq*t5z7mN4XKdGWTlU$GV6D6qqzJh-i**0&05?K_Pb_%%``z$MTCmq8} zKgXx72}k~(ST$_3O|IB5WS2GL>)uJs2#Hu{o3e*en~iO5&NcJL zAb!*)u(ujnsE&@1w0Y@ef`T*!I`Yn8mh(jedGCj{c2M#3A#~Rz&kYze@*d2Ly(Hc7 zQf1+ARh8t3Ok6KjI91Q2ZRx%si%_uCy@vIPSSTl|BPzLDb(zm`k&%om2^ zti{4H=VKkBgyM6OBb+5d?^AP2IbuoxZc?~Apk(lQ-14k%qF$H545Pc&i}<186Tf&6 zX4xY3x}g$}-I432fy!R@azU%BfR5Hq4Ia6NzJvnHeX!{_FY8#mVK>q0n0v?ovsLS= zO%d>u72{_hR*pHld5(rLR9)tn5SL0No>$Sm$X%HXYQV|c{(pX6(Htt>+C8*l4C{R`5$_BU#r_|dHsyay>74IO)?sLYZT|-{_ThP*)T3TW{N)I#AaqTHt8x%bCj*g?#JK{5ntB z8xb(%-HZ0iREG3t+^CefC%0rZcO61RHU2SIFn_O< zpL7l@3iI{7+iAQJinYO~OgBObQ60o4C4n$xYS3ME0{_gVHFb@W1i=tr0<#jV9h0Q) z#uh9XmwoR!vT?e27HnVM2dB;1-;i_{-B`7&dN&&1S!fpBr*c%l z;du2X3frI^ccs9pC_3tqrOl-BZC0x{+a2on1t#S?r6E|2mi>)q23!z-fsxKDHM_by zj6T)jYs7qMOx^U~5?-6e=L7JXJzI?l7b8KAiI~`h4K@zpWrcns*E<-8S6JD*#~eDg z8V-NbC6Ur9Iphi__Tuz>Db&36r#8=a~5Q@PKYi>lq(Cmk#v%tb%!Xo;A-bYoHE{^}fliP@P0t z+pl?p!f&*cg9@~f!)(YXX<-g!v)K2$W8oU&zt(0)7f?>BQ$d!URTPVdX&-S6(p$dDH2xi zN`?m)IwXFg89KA_bFpD{jW^$G{TAc&$X4+M=R*OB0N2UAw&lhj99rJhJ99R6v{6q! zr;CuqoxaXrLi3<<-^zS%OdqD~#ULwy9cMy6TuohLB0NDfA~DFN=_KKkU zjMq|Ps&M<`OgXgkBW85@fQLzalY8h>7Ld( zqSQn!mLwnKF2BFmBVrsTKCge|L}VVH$Qw#|*JN}qceLD$qJQ^8tN>;_XC&+5m~nkPho$t9|a zq56o`$6$L@vhSdnX#1)*^hkA37gKx$MQ3qlfr#F8rn08Xo>rx!v-Xrjq=q2H__1)u zC3btIRe3oF@l#{_S{%FCSqL#*dBkSARifNHaWdNWeh9tiAZC>K@2}gup(L)ip%u6E z$>#H)0?0|1%h)r?7ozg8s@QSA4HoL#zk7kcKF}QxCK_;6^^;&pr!KzVj zJTO8{C3}@xI# zBV7V(%?2za@d?8o4d0YzQvrv~Rr#8@;c=P@w?YAQww#QG38<0EeiBy<88C4mnz5e1 zD8l~CEC8&b`q(OqUIDNrTU^I>AgzYeP%`2fA1f1<<6p7xU#n8Ob&!n&vJV5I_v+-! z4n0II3H}Th0cu>vT*}ra!H*EcJ)`7EgM0s}nfnhO$K(=4sxTwC- zQn4!haRQwnXKnDQ=v4YLMCgea(*(+JnvwM0jP&t5@uYF8r>*dk_?w=iTZe(N7Pkb! zq1#|-d>Jrzl0<>>Q(+qV6z$aa_KpD^99uywXJbV7R`iu6jH`Fi%_MR23s%-zxqwH%3D3h&luYxAHI%D zY@Gb128tsb>Sr1d=KS6M7LF=@?vW)1FPPR&GXN2QI4Ovp)PKP=wq!j|Drwp+A=-8F zCR;sg)cZFZ^wjFpmvV#}QNzY^@bq1oRKQ@hijQG2Krx;tC%xTwH)->_Q@NtAexb)d z;hPJZ1krNAY@AesBVuhsPdTM@oyw5IuUzU|e|DLmSB&S$11*KYfd?*}@Tu%zJ`3|~ z)9N*u2#XNimh0>>B}{mM_Zk&cCGDP)-Q{mF!IRL!w?BR?Fl)yr0rcx+Dqd9D6?3F(a96o}?SE*nuYe z>ZkEvqK1A^AySv}&D`183=J1@Wi$oAb;e|)^N209G6ZZ-gB>w6L2R>asV;eKjSL~cG0LZL6v?e~Z3 zi{lBN2}oq=dM3EC-`Ku=ou~QX(;?Ann7&M_iwPIyImc9|kyURCtQhjOUd4IP>lL0> zR@3J{xf%rWKfszY%)!jn^e@a~a5OVlhidMcat8ig|E-Ays0oER|1AyVV1sZ%xcJz)xmelRxc{y7zZ3%H zt=ynMb})nwWCnEuNkUDmjO`hLHjc(Fmd;RPpxeJvaI^hQ@=plkKgjZ5sFCY`bVS|L z5eft;nOLj2*a1L_K%RdXBFxzZ$oYQ(BL^q%|2GVUsulTPEv?NlNa~Wm)I`G1PGE{x$X@h26BK1R(k9E`Rb`{F(wg^t(8#+qKz?j@d zs-h`MG9gkA{^M)snP3{Y6d6J|WPkYPgQaF=e7V|;JyD(m>ugvWyHQ#5$K5+;=z(IU z-7VfgQX+-t;Ib10q(q?qy<8nOS zEYz9Gdt2tzCtpCC!0Lj{$K|O$a;J*M_9{^Ib@`C=g03a=(9t6k^ zg#6u8b#QP2Lco9DSN$j4+yVGs-^o9YBv4Nf43Xyed+Xd>Tv8kmK54Fhh7imL5tD$3 zNlWqa@CpO}_mIC;{teT?{~90Q{|=~4jg0Qbdpd_ude9@$pU_29LR5A|!psp(=%l|e v0=YS`Y9MkQ#zx--#@@WK&qTQX&#pMT7{gpVV1N6-!^^`5prw^kk_P-Ay3<)0 diff --git a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/[Content_Types].xml b/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/[Content_Types].xml deleted file mode 100644 index efab09eb..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/[Content_Types].xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/_rels/.rels b/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/_rels/.rels deleted file mode 100644 index 9758543f..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/_rels/.rels +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/_rels/aasx-origin.rels b/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/_rels/aasx-origin.rels deleted file mode 100644 index fc764b65..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/_rels/aasx-origin.rels +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/_rels/data.xml.rels b/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/_rels/data.xml.rels deleted file mode 100644 index 43350edd..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/_rels/data.xml.rels +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/aasx-origin b/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/aasx-origin deleted file mode 100644 index e69de29b..00000000 diff --git a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/data.xml b/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/data.xml deleted file mode 100644 index 98afab35..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/data.xml +++ /dev/null @@ -1,2999 +0,0 @@ - - - - - TestAssetAdministrationShell123 - - - en-US - An Example Asset Administration Shell for the test application - - - de - Ein Beispiel-Verwaltungsschale für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_AssetAdministrationShell - - - - http://example.org/AdministrativeInformationTemplates/Test_AssetAdministrationShell - - https://example.org/Test_AssetAdministrationShell - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - - ModelReference - - - AssetAdministrationShell - https://example.org/TestAssetAdministrationShell2 - - - - - Instance - http://example.org/TestAsset/ - - - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - - file:///path/to/thumbnail.png - image/png - - - - - ModelReference - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/AssetIdentification - - - - - - Submodel - http://example.org/Submodels/Assets/TestAsset/Identification - - - - - ModelReference - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - Submodel - https://example.org/Test_Submodel - - - - - ModelReference - - - Submodel - http://example.org/Submodels/Assets/TestAsset/BillOfMaterial - - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel_Template - - - - - - - https://example.org/Test_AssetAdministrationShell_Mandatory - - Instance - http://example.org/Test_Asset_Mandatory/ - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel2_Mandatory - - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel_Mandatory - - - - - - - https://example.org/Test_AssetAdministrationShell2_Mandatory - - Instance - http://example.org/TestAsset2_Mandatory/ - - - - TestAssetAdministrationShell - - - en-US - An Example Asset Administration Shell for the test application - - - de - Ein Beispiel-Verwaltungsschale für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_AssetAdministrationShell_Missing - - Instance - http://example.org/Test_Asset_Missing/ - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - - file:///TestFile.pdf - application/pdf - - - - - ModelReference - - - Submodel - https://example.org/Test_Submodel_Missing - - - - - - - - - Identification - - - en-US - An example asset identification submodel for the test application - - - de - Ein Beispiel-Identifikations-Submodel für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/TestAsset/Identification - - - - http://example.org/AdministrativeInformationTemplates/TestAsset/Identification - - http://example.org/Submodels/Assets/TestAsset/Identification - Instance - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/AssetIdentification - - - - - - - - ExampleExtension - xs:string - ExampleExtensionValue - - - ModelReference - - - AssetAdministrationShell - http://example.org/RefersTo/ExampleRefersTo - - - - - - - PARAMETER - ManufacturerName - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - 0173-1#02-AAO677#002 - - - - - - ConceptQualifier - http://example.org/Qualifier/ExampleQualifier - xs:int - 100 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - TemplateQualifier - http://example.org/Qualifier/ExampleQualifier2 - xs:int - 50 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - xs:string - ACPLT - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - PARAMETER - InstanceId - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - - - ValueQualifier - http://example.org/Qualifier/ExampleQualifier3 - xs:dateTime - 2023-04-07T16:59:54.870123 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - xs:string - 978-8234-234-342 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - BillOfMaterial - - - en-US - An example bill of material submodel for the test application - - - de - Ein Beispiel-BillOfMaterial-Submodel für eine Test-Anwendung - - - - 9 - http://example.org/AdministrativeInformationTemplates/TestAsset/BillOfMaterial - - http://example.org/Submodels/Assets/TestAsset/BillOfMaterial - Instance - - ModelReference - - - Submodel - http://example.org/SubmodelTemplates/BillOfMaterial - - - - - - PARAMETER - ExampleEntity - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - - - CONSTANT - ExampleProperty2 - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - SelfManagedEntity - http://example.org/TestAsset/ - - - TestKey - TestValue - - ExternalReference - - - GlobalReference - http://example.org/SpecificAssetId/ - - - - - - - - PARAMETER - ExampleEntity2 - - - en-US - Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation. - - - de - Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist - - - - ExternalReference - - - GlobalReference - http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber - - - - CoManagedEntity - - - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_Submodel - - - - - https://example.org/Test_Submodel - Instance - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ModelReference - - - ConceptDescription - https://example.org/Test_ConceptDescription - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty2 - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty2 - - - - - - PARAMETER - ExampleAnnotatedProperty - xs:string - exampleValue - - - PARAMETER - ExampleAnnotatedRange - xs:integer - 1 - 5 - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelCollection - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - AQIDBAU= - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - /TestFile.pdf - application/pdf - - - CONSTANT - ExampleFileURI - - - en-US - Details of the Asset Administration Shell — An example for an external file reference - - - de - Details of the Asset Administration Shell – Ein Beispiel für eine extern referenzierte Datei - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - https://www.plattform-i40.de/PI40/Redaktion/DE/Downloads/Publikation/Details-of-the-Asset-Administration-Shell-Part1.pdf?__blob=publicationFile&v=5 - application/pdf - - - PARAMETER - ExampleSubmodelList - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - Property - xs:string - - - CONSTANT - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/SupplementalId1 - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/SupplementalId2 - - - - - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - CONSTANT - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty2/SupplementalId - - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty/Referred - - - - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - en-US - Example value of a MultiLanguageProperty element - - - de - Beispielwert für ein MultiLanguageProperty-Element - - - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleMultiLanguageValueId - - - - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - 100 - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - - - - - https://example.org/Test_Submodel_Mandatory - Instance - - - ExampleRelationshipElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - ExampleAnnotatedRelationshipElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - ExampleOperation - - - ExampleCapability - - - ExampleBasicEventElement - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - input - off - - - ExampleSubmodelList - SubmodelElementCollection - - - - - ExampleBlob - - application/pdf - - - ExampleFile - application/pdf - - - PARAMETER - ExampleMultiLanguageProperty - - - PARAMETER - ExampleProperty - xs:string - - - PARAMETER - ExampleRange - xs:int - - - PARAMETER - ExampleReferenceElement - - - - - - - - - ExampleSubmodelList2 - Capability - - - - - https://example.org/Test_Submodel2_Mandatory - Instance - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_Submodel_Missing - Instance - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRange - xs:integer - 1 - 5 - - - PARAMETER - ExampleAnnotatedProperty - xs:string - exampleValue - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - ExampleProperty - - - de - BeispielProperty - - - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelCollection - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - AQIDBAU= - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - /TestFile.pdf - application/pdf - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - en-US - Example value of a MultiLanguageProperty element - - - de - Beispielwert für ein MultiLanguageProperty-Element - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - - - http://example.org/Qualifier/ExampleQualifier - xs:string - - - xs:string - exampleValue - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - 100 - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - - - - - TestSubmodel - - - en-US - An example submodel for the test application - - - de - Ein Beispiel-Teilmodell für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_Submodel_Template - Template - - ExternalReference - - - GlobalReference - http://example.org/SubmodelTemplates/ExampleSubmodel - - - - - - PARAMETER - ExampleRelationshipElement - - - en-US - Example RelationshipElement object - - - de - Beispiel RelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleAnnotatedRelationshipElement - - - en-US - Example AnnotatedRelationshipElement object - - - de - Beispiel AnnotatedRelationshipElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/RelationshipElements/ExampleAnnotatedRelationshipElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - - - PARAMETER - ExampleOperation - - - en-US - Example Operation object - - - de - Beispiel Operation Element - - - - ExternalReference - - - GlobalReference - http://example.org/Operations/ExampleOperation - - - - - - - - CONSTANT - ExamplePropertyInput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInput - - - - xs:string - - - - - - - - - CONSTANT - ExamplePropertyOutput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyOutput - - - - xs:string - - - - - - - - - CONSTANT - ExamplePropertyInOutput - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExamplePropertyInOutput - - - - xs:string - - - - - - - PARAMETER - ExampleCapability - - - en-US - Example Capability object - - - de - Beispiel Capability Element - - - - ExternalReference - - - GlobalReference - http://example.org/Capabilities/ExampleCapability - - - - - - PARAMETER - ExampleBasicEventElement - - - en-US - Example BasicEventElement object - - - de - Beispiel BasicEventElement Element - - - - ExternalReference - - - GlobalReference - http://example.org/Events/ExampleBasicEventElement - - - - - ModelReference - - - Submodel - http://example.org/Test_Submodel - - - Property - ExampleProperty - - - - output - on - ExampleTopic - - ModelReference - - - Submodel - http://example.org/ExampleMessageBroker - - - - 2022-11-12T23:50:23.123456+00:00 - PT0.000001S - P1Y2M3DT4H5M6.123456S - - - PARAMETER - ExampleSubmodelList - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - SubmodelElementCollection - - - PARAMETER - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - CONSTANT - ExampleProperty - - - en-US - Example Property object - - - de - Beispiel Property Element - - - - ExternalReference - - - GlobalReference - http://example.org/Properties/ExampleProperty - - - - xs:string - - - CONSTANT - ExampleMultiLanguageProperty - - - en-US - Example MultiLanguageProperty object - - - de - Beispiel MultiLanguageProperty Element - - - - ExternalReference - - - GlobalReference - http://example.org/MultiLanguageProperties/ExampleMultiLanguageProperty - - - - - - PARAMETER - ExampleRange - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 100 - - - PARAMETER - ExampleRange2 - - - en-US - Example Range object - - - de - Beispiel Range Element - - - - ExternalReference - - - GlobalReference - http://example.org/Ranges/ExampleRange - - - - xs:int - 0 - - - PARAMETER - ExampleBlob - - - en-US - Example Blob object - - - de - Beispiel Blob Element - - - - ExternalReference - - - GlobalReference - http://example.org/Blobs/ExampleBlob - - - - - application/pdf - - - PARAMETER - ExampleFile - - - en-US - Example File object - - - de - Beispiel File Element - - - - ExternalReference - - - GlobalReference - http://example.org/Files/ExampleFile - - - - application/pdf - - - PARAMETER - ExampleReferenceElement - - - en-US - Example Reference Element object - - - de - Beispiel Reference Element Element - - - - ExternalReference - - - GlobalReference - http://example.org/ReferenceElements/ExampleReferenceElement - - - - - - - - PARAMETER - - - en-US - Example SubmodelElementCollection object - - - de - Beispiel SubmodelElementCollection Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - - - - - PARAMETER - ExampleSubmodelList2 - - - en-US - Example SubmodelElementList object - - - de - Beispiel SubmodelElementList Element - - - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementLists/ExampleSubmodelElementList - - - - true - - ExternalReference - - - GlobalReference - http://example.org/SubmodelElementCollections/ExampleSubmodelElementCollection - - - - Capability - - - - - - - TestConceptDescription - - - en-US - An example concept description for the test application - - - de - Ein Beispiel-ConceptDescription für eine Test-Anwendung - - - - - - - ExternalReference - - - GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 - - - - - - - - de - Test Specification - - - en-US - TestSpecification - - - - - de - Test Spec - - - en-US - TestSpec - - - SpaceUnit - - ExternalReference - - - GlobalReference - http://example.org/Units/SpaceUnit - - - - http://example.org/DataSpec/ExampleDef - SU - REAL_MEASURE - - - de - Dies ist eine Data Specification für Testzwecke - - - en-US - This is a DataSpecification for testing purposes - - - M - - - - exampleValue - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId - - - - - - exampleValue2 - - ExternalReference - - - GlobalReference - http://example.org/ValueId/ExampleValueId2 - - - - - - - TEST - - true - false - false - true - - - - - - 9 - 0 - - ExternalReference - - - GlobalReference - http://example.org/AdministrativeInformation/Test_ConceptDescription - - - - http://example.org/AdministrativeInformationTemplates/Test_ConceptDescription - - https://example.org/Test_ConceptDescription - - - ExternalReference - - - GlobalReference - http://example.org/DataSpecifications/ConceptDescriptions/TestConceptDescription - - - - - - - https://example.org/Test_ConceptDescription_Mandatory - - - TestConceptDescription - - - en-US - An example concept description for the test application - - - de - Ein Beispiel-ConceptDescription für eine Test-Anwendung - - - - 9 - 0 - - https://example.org/Test_ConceptDescription_Missing - - - diff --git a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/docProps/core.xml b/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/docProps/core.xml deleted file mode 100644 index 4dc0b87c..00000000 --- a/compliance_tool/test/files/test_demo_full_example_xml_wrong_attribute_aasx/docProps/core.xml +++ /dev/null @@ -1 +0,0 @@ -2020-01-01T00:00:00PyI40AAS Testing FrameworkTest_DescriptionPyI40AAS Testing Framework Compliance Tool2020-01-01T00:00:011.0Test Title2.0.1 \ No newline at end of file diff --git a/compliance_tool/test/files/test_deserializable_aas_warning.json b/compliance_tool/test/files/test_deserializable_aas_warning.json deleted file mode 100644 index 81d31890..00000000 --- a/compliance_tool/test/files/test_deserializable_aas_warning.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "assetAdministrationShells": [ - { - "id": "https://example.org/Test_AssetAdministrationShell", - "idShort": "TestAssetAdministrationShell", - "administration": { - "revision": "0" - }, - "modelType": "AssetAdministrationShell", - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/TestAsset/" - } - } - ] -} \ No newline at end of file diff --git a/compliance_tool/test/files/test_deserializable_aas_warning.xml b/compliance_tool/test/files/test_deserializable_aas_warning.xml deleted file mode 100644 index cd401732..00000000 --- a/compliance_tool/test/files/test_deserializable_aas_warning.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - TestAssetAdministrationShell - - 0 - - https://example.org/Test_AssetAdministrationShell - - Instance - http://example.org/TestAsset/ - - - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_empty.json b/compliance_tool/test/files/test_empty.json deleted file mode 100644 index 9e26dfee..00000000 --- a/compliance_tool/test/files/test_empty.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/compliance_tool/test/files/test_empty.xml b/compliance_tool/test/files/test_empty.xml deleted file mode 100644 index 2225e093..00000000 --- a/compliance_tool/test/files/test_empty.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/compliance_tool/test/files/test_empty_aasx/[Content_Types].xml b/compliance_tool/test/files/test_empty_aasx/[Content_Types].xml deleted file mode 100644 index 18520c7e..00000000 --- a/compliance_tool/test/files/test_empty_aasx/[Content_Types].xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/compliance_tool/test/files/test_empty_aasx/_rels/.rels b/compliance_tool/test/files/test_empty_aasx/_rels/.rels deleted file mode 100644 index 9c5de6cf..00000000 --- a/compliance_tool/test/files/test_empty_aasx/_rels/.rels +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/compliance_tool/test/files/test_empty_aasx/aasx/_rels/aasx-origin.rels b/compliance_tool/test/files/test_empty_aasx/aasx/_rels/aasx-origin.rels deleted file mode 100644 index 7b813240..00000000 --- a/compliance_tool/test/files/test_empty_aasx/aasx/_rels/aasx-origin.rels +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/compliance_tool/test/files/test_empty_aasx/aasx/aasx-origin b/compliance_tool/test/files/test_empty_aasx/aasx/aasx-origin deleted file mode 100644 index e69de29b..00000000 diff --git a/compliance_tool/test/files/test_empty_aasx/docProps/core.xml b/compliance_tool/test/files/test_empty_aasx/docProps/core.xml deleted file mode 100644 index 344bc075..00000000 --- a/compliance_tool/test/files/test_empty_aasx/docProps/core.xml +++ /dev/null @@ -1 +0,0 @@ -2020-09-25T16:07:16.936996PyI40AAS Testing Framework \ No newline at end of file diff --git a/compliance_tool/test/files/test_not_deserializable.json b/compliance_tool/test/files/test_not_deserializable.json deleted file mode 100644 index 9a0c369d..00000000 --- a/compliance_tool/test/files/test_not_deserializable.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "assetAdministrationShells": [], - "submodels": [] - "conceptDescriptions": [] -} \ No newline at end of file diff --git a/compliance_tool/test/files/test_not_deserializable_aas.json b/compliance_tool/test/files/test_not_deserializable_aas.json deleted file mode 100644 index 5e60151e..00000000 --- a/compliance_tool/test/files/test_not_deserializable_aas.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "assetAdministrationShells": [ - { - "id": "https://example.org/Test_AssetAdministrationShell", - "idShort": "TestAssetAdministrationShell", - "modelType": "Test", - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": "http://example.org/Test_Asset/" - } - } - ], - "submodels": [], - "conceptDescriptions": [] -} \ No newline at end of file diff --git a/compliance_tool/test/files/test_not_deserializable_aas.xml b/compliance_tool/test/files/test_not_deserializable_aas.xml deleted file mode 100644 index 36fd6dd0..00000000 --- a/compliance_tool/test/files/test_not_deserializable_aas.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - https://example.org/Test_Submodel2_Mandatory - Instance - - - - - - \ No newline at end of file diff --git a/compliance_tool/test/test_aas_compliance_tool.py b/compliance_tool/test/test_aas_compliance_tool.py index 13f044ea..df314888 100644 --- a/compliance_tool/test/test_aas_compliance_tool.py +++ b/compliance_tool/test/test_aas_compliance_tool.py @@ -6,13 +6,15 @@ # SPDX-License-Identifier: MIT import datetime import hashlib +import io import os -import subprocess -import sys +import tempfile import unittest -import io +from contextlib import redirect_stderr, redirect_stdout +from io import StringIO +from unittest.mock import patch, ANY -import tempfile +from aas_compliance_tool.cli import main, parse_cli_arguments from basyx.aas import model from basyx.aas.adapter import aasx from basyx.aas.adapter.json import read_aas_json_file @@ -21,316 +23,151 @@ from basyx.aas.examples.data._helper import AASDataChecker -def _run_compliance_tool(*compliance_tool_args, **kwargs) -> subprocess.CompletedProcess: - """ - This function runs the compliance tool using subprocess.run() - and sets the stdout and stderr parameters of subprocess.run() to PIPE. - Positional arguments are passed to the compliance tool, while keyword arguments are passed to subprocess.run(). - """ - env = os.environ.copy() - parent_dir = os.path.join( - os.path.dirname(os.path.dirname(__file__)), - 'aas_compliance_tool' - ) - env["PYTHONPATH"] = parent_dir + os.pathsep + env.get("PYTHONPATH", "") - compliance_tool_path = os.path.join( - os.path.dirname(os.path.dirname(__file__)), - 'aas_compliance_tool', - 'cli.py' - ) - return subprocess.run([sys.executable, compliance_tool_path] + list(compliance_tool_args), stdout=subprocess.PIPE, - stderr=subprocess.PIPE, env=env, **kwargs) - - -class ComplianceToolTest(unittest.TestCase): - def test_parse_args(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - # test schema check - output = _run_compliance_tool("s") - self.assertNotEqual(0, output.returncode) - self.assertIn('error: the following arguments are required: file_1', str(output.stderr)) - - output = _run_compliance_tool("s", os.path.join(test_file_path, "test_demo_full_example.json")) - self.assertNotEqual(0, output.returncode) - self.assertIn('error: one of the arguments --json --xml is required', str(output.stderr)) - - # test deserialisation check - output = _run_compliance_tool("d") - self.assertNotEqual(0, output.returncode) - self.assertIn('error: the following arguments are required: file_1', str(output.stderr)) - - output = _run_compliance_tool("d", os.path.join(test_file_path, "test_demo_full_example.json")) - self.assertNotEqual(0, output.returncode) - self.assertIn('error: one of the arguments --json --xml is required', str(output.stderr)) - - output = _run_compliance_tool("d", os.path.join(test_file_path, "test_demo_full_example.json"), "--aasx") - self.assertNotEqual(0, output.returncode) - self.assertIn('error: one of the arguments --json --xml is required', str(output.stderr)) - - # test example check - output = _run_compliance_tool("e") - self.assertNotEqual(0, output.returncode) - self.assertIn('error: the following arguments are required: file_1', str(output.stderr)) - - output = _run_compliance_tool("e", os.path.join(test_file_path, "test_demo_full_example.json")) - self.assertNotEqual(0, output.returncode) - self.assertIn('error: one of the arguments --json --xml is required', str(output.stderr)) - - output = _run_compliance_tool("e", os.path.join(test_file_path, "test_demo_full_example.json"), "--aasx") - self.assertNotEqual(0, output.returncode) - self.assertIn('error: one of the arguments --json --xml is required', str(output.stderr)) - - # test file check - output = _run_compliance_tool("f") - self.assertNotEqual(0, output.returncode) - self.assertIn('error: the following arguments are required: file_1', str(output.stderr)) - - output = _run_compliance_tool("f", os.path.join(test_file_path, "test_demo_full_example.json")) - self.assertNotEqual(0, output.returncode) - self.assertIn('error: one of the arguments --json --xml is required', str(output.stderr)) - - output = _run_compliance_tool("f", os.path.join(test_file_path, "test_demo_full_example.json"), "--aasx") - self.assertNotEqual(0, output.returncode) - self.assertIn('error: one of the arguments --json --xml is required', str(output.stderr)) - - output = _run_compliance_tool("f", os.path.join(test_file_path, "test_demo_full_example.json"), "--json") - self.assertNotEqual(0, output.returncode) - self.assertIn('error: f or files requires two file path', str(output.stderr)) - - output = _run_compliance_tool("f", os.path.join(test_file_path, "test_demo_full_example.json"), - os.path.join(test_file_path, "test_demo_full_example.json")) - self.assertNotEqual(0, output.returncode) - self.assertIn('error: one of the arguments --json --xml is required', str(output.stderr)) - - # test verbose - output = _run_compliance_tool("e", os.path.join(test_file_path, "test_demo_full_example.json"), "--json", "-v") - self.assertEqual(0, output.returncode) - self.assertNotIn('ERROR', str(output.stderr)) - self.assertNotIn('INFO', str(output.stdout)) - - output = _run_compliance_tool("e", os.path.join(test_file_path, "test_demo_full_example.json"), "--json", "-v", - "-v") - self.assertEqual(0, output.returncode) - self.assertNotIn('ERROR', str(output.stderr)) - self.assertIn('INFO', str(output.stdout)) - - # test quiet (short form) - output = _run_compliance_tool("e", os.path.join(test_file_path, "test_demo_full_example.json"), "--json", "-q") - self.assertEqual(0, output.returncode) - self.assertEqual("b''", str(output.stdout)) - - # test quiet (long form -- previously misspelled as --quite) - output = _run_compliance_tool("e", os.path.join(test_file_path, "test_demo_full_example.json"), "--json", - "--quiet") - self.assertEqual(0, output.returncode) - self.assertEqual("b''", str(output.stdout)) - - # test logfile - output = _run_compliance_tool("e", os.path.join(test_file_path, "test_demo_full_example.json"), "--json", "-l") - self.assertNotEqual(0, output.returncode) - self.assertIn('error: argument -l/--logfile: expected one argument', str(output.stderr)) - - # todo: add test for correct logfile - - def test_json_create_example(self) -> None: - file, filename = tempfile.mkstemp(suffix=".json") - os.close(file) - output = _run_compliance_tool("c", filename, "--json") - - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Create example data', str(output.stdout)) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Write data to file', str(output.stdout)) - - with open(filename, "r", encoding='utf-8-sig') as f: - json_identifiable_store = read_aas_json_file(f, failsafe=False) - data = create_example() +class ComplianceToolParserTest(unittest.TestCase): + def test_json_xml_mutually_exclusive(self): + parser = parse_cli_arguments() + with self.assertRaises(SystemExit) as cm: + with redirect_stderr(StringIO()): + parser.parse_args(["d", "f.json", "--json", "--xml"]) + self.assertEqual(2, cm.exception.code) + + +class ComplianceToolActionTest(unittest.TestCase): + def setUp(self): + self._json_patcher = patch('aas_compliance_tool.cli.compliance_tool_json') + self._xml_patcher = patch('aas_compliance_tool.cli.compliance_tool_xml') + self._aasx_patcher = patch('aas_compliance_tool.cli.compliance_tool_aasx') + self.mock_json = self._json_patcher.start() + self.mock_xml = self._xml_patcher.start() + self.mock_aasx = self._aasx_patcher.start() + + def tearDown(self): + self._json_patcher.stop() + self._xml_patcher.stop() + self._aasx_patcher.stop() + + def _call_main(self, args): + with patch('sys.argv', ['compliance_tool'] + args): + with redirect_stdout(StringIO()): + main() + + def test_route_d_json(self): + self._call_main(['d', 'f.json', '--json']) + self.mock_json.check_deserialization.assert_called_once_with('f.json', ANY) + + def test_route_d_xml(self): + self._call_main(['d', 'f.xml', '--xml']) + self.mock_xml.check_deserialization.assert_called_once_with('f.xml', ANY) + + def test_route_d_aasx(self): + self._call_main(['d', 'f.aasx', '--json', '--aasx']) + self.mock_aasx.check_deserialization.assert_called_once_with('f.aasx', ANY) + + def test_route_e_json(self): + self._call_main(['e', 'f.json', '--json']) + self.mock_json.check_aas_example.assert_called_once_with('f.json', ANY, check_extensions=True) + + def test_route_e_xml(self): + self._call_main(['e', 'f.xml', '--xml']) + self.mock_xml.check_aas_example.assert_called_once_with('f.xml', ANY, check_extensions=True) + + def test_route_e_aasx(self): + self._call_main(['e', 'f.aasx', '--json', '--aasx']) + self.mock_aasx.check_aas_example.assert_called_once_with('f.aasx', ANY, check_extensions=True) + + def test_route_f_json(self): + self._call_main(['f', 'a.json', 'b.json', '--json']) + self.mock_json.check_json_files_equivalence.assert_called_once_with('a.json', 'b.json', ANY, + check_extensions=True) + + def test_route_f_xml(self): + self._call_main(['f', 'a.xml', 'b.xml', '--xml']) + self.mock_xml.check_xml_files_equivalence.assert_called_once_with('a.xml', 'b.xml', ANY, + check_extensions=True) + + def test_route_f_aasx(self): + self._call_main(['f', 'a.aasx', 'b.aasx', '--json', '--aasx']) + self.mock_aasx.check_aasx_files_equivalence.assert_called_once_with('a.aasx', 'b.aasx', ANY, + check_extensions=True) + + def test_route_f_missing_file2(self): + with self.assertRaises(SystemExit) as cm: + with redirect_stderr(StringIO()): + self._call_main(['f', 'f.json', '--json']) + + self.assertEqual(2, cm.exception.code) + + +class ComplianceToolCreateTests(unittest.TestCase): + def _call_main(self, args) -> str: + buf = StringIO() + with patch('sys.argv', ['compliance_tool'] + args): + with redirect_stdout(buf): + main() + return buf.getvalue() + + def test_create_json(self): + with tempfile.NamedTemporaryFile(suffix=".json") as tf: + + output = self._call_main(['c', tf.name, '--json']) + + self.assertIn('SUCCESS: Create example data', output) + self.assertIn('SUCCESS: Open file', output) + self.assertIn('SUCCESS: Write data to file', output) + + json_store = read_aas_json_file(tf, failsafe=False) checker = AASDataChecker(raise_immediately=True) - checker.check_identifiable_store(json_identifiable_store, data) - os.unlink(filename) - - def test_json_deserialization(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - output = _run_compliance_tool("d", os.path.join(test_file_path, "test_demo_full_example.json"), "--json") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Read file and check if it is deserializable', str(output.stdout)) - - def test_json_example(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - output = _run_compliance_tool("e", os.path.join(test_file_path, "test_demo_full_example.json"), "--json") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Read file and check if it is deserializable', str(output.stdout)) - self.assertIn('SUCCESS: Check if data is equal to example data', str(output.stdout)) - - def test_json_file(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - output = _run_compliance_tool("f", os.path.join(test_file_path, "test_demo_full_example.json"), - os.path.join(test_file_path, "test_demo_full_example.json"), "--json") - - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Open first file', str(output.stdout)) - self.assertIn('SUCCESS: Read file', str(output.stdout)) - self.assertIn('SUCCESS: Open second file', str(output.stdout)) - self.assertIn('SUCCESS: Read file', str(output.stdout)) - self.assertIn('SUCCESS: Check if data in files are equal', str(output.stdout)) - - def test_xml_create_example(self) -> None: - file, filename = tempfile.mkstemp(suffix=".xml") - os.close(file) - output = _run_compliance_tool("c", filename, "--xml") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Create example data', str(output.stdout)) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Write data to file', str(output.stdout)) - - with open(filename, "rb") as f: - xml_identifiable_store = read_aas_xml_file(f, failsafe=False) - data = create_example() + checker.check_identifiable_store(json_store, create_example()) + + def test_create_xml(self): + with tempfile.NamedTemporaryFile(suffix=".json") as tf: + output = self._call_main(['c', tf.name, '--xml']) + + self.assertIn('SUCCESS: Create example data', output) + self.assertIn('SUCCESS: Open file', output) + self.assertIn('SUCCESS: Write data to file', output) + xml_store = read_aas_xml_file(tf, failsafe=False) checker = AASDataChecker(raise_immediately=True) - checker.check_identifiable_store(xml_identifiable_store, data) - os.unlink(filename) - - def test_xml_deseralization(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - output = _run_compliance_tool("d", os.path.join(test_file_path, "test_demo_full_example.xml"), "--xml") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Read file and check if it is deserializable', str(output.stdout)) - - def test_xml_example(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - output = _run_compliance_tool("e", os.path.join(test_file_path, "test_demo_full_example.xml"), "--xml") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Read file and check if it is deserializable', str(output.stdout)) - self.assertIn('SUCCESS: Check if data is equal to example data', str(output.stdout)) - - def test_xml_file(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - output = _run_compliance_tool("f", os.path.join(test_file_path, "test_demo_full_example.xml"), - os.path.join(test_file_path, "test_demo_full_example.xml"), "--xml") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Open first file', str(output.stdout)) - self.assertIn('SUCCESS: Read file', str(output.stdout)) - self.assertIn('SUCCESS: Open second file', str(output.stdout)) - self.assertIn('SUCCESS: Read file', str(output.stdout)) - self.assertIn('SUCCESS: Check if data in files are equal', str(output.stdout)) - - def test_aasx_create_example(self) -> None: - file, filename = tempfile.mkstemp(suffix=".aasx") - os.close(file) - output = _run_compliance_tool("c", filename, "--xml", "--aasx") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Create example data', str(output.stdout)) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Write data to file', str(output.stdout)) - - # Read AASX file - new_data: model.DictIdentifiableStore[model.Identifiable] = model.DictIdentifiableStore() - new_files = aasx.DictSupplementaryFileContainer() - with aasx.AASXReader(filename) as reader: - reader.read_into(new_data, new_files) - new_cp = reader.get_core_properties() - - # Check AAS objects - assert (isinstance(new_cp.created, datetime.datetime)) + checker.check_identifiable_store(xml_store, create_example()) + + def test_create_aasx_xml(self): + with tempfile.NamedTemporaryFile(suffix=".json") as tf: + output = self._call_main(['c', tf.name, '--xml', '--aasx']) + + self.assertIn('SUCCESS: Create example data', output) + self.assertIn('SUCCESS: Open file', output) + self.assertIn('SUCCESS: Write data to file', output) + + new_data: model.DictIdentifiableStore = model.DictIdentifiableStore() + new_files = aasx.DictSupplementaryFileContainer() + with aasx.AASXReader(tf) as reader: + reader.read_into(new_data, new_files) + new_cp = reader.get_core_properties() + self.assertIsInstance(new_cp.created, datetime.datetime) self.assertAlmostEqual(new_cp.created, datetime.datetime(2020, 1, 1, 0, 0, 0), delta=datetime.timedelta(milliseconds=20)) self.assertEqual(new_cp.creator, "Eclipse BaSyx Python Testing Framework") self.assertEqual(new_cp.description, "Test_Description") self.assertEqual(new_cp.lastModifiedBy, "Eclipse BaSyx Python Testing Framework Compliance Tool") - assert (isinstance(new_cp.modified, datetime.datetime)) + self.assertIsInstance(new_cp.modified, datetime.datetime) self.assertAlmostEqual(new_cp.modified, datetime.datetime(2020, 1, 1, 0, 0, 1), delta=datetime.timedelta(milliseconds=20)) self.assertEqual(new_cp.revision, "1.0") self.assertEqual(new_cp.version, "2.0.1") self.assertEqual(new_cp.title, "Test Title") - - # Check files self.assertEqual(new_files.get_content_type("/TestFile.pdf"), "application/pdf") file_content = io.BytesIO() new_files.write_file("/TestFile.pdf", file_content) self.assertEqual(hashlib.sha1(file_content.getvalue()).hexdigest(), "78450a66f59d74c073bf6858db340090ea72a8b1") - os.unlink(filename) - - def test_aasx_deseralization_xml(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - output = _run_compliance_tool("d", os.path.join(test_file_path, "test_demo_full_example_xml.aasx"), "--xml", - "--aasx") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Read file', str(output.stdout)) - - def test_aasx_example_xml(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - output = _run_compliance_tool("e", os.path.join(test_file_path, "test_demo_full_example_xml.aasx"), "--xml", - "--aasx") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Read file', str(output.stdout)) - self.assertIn('SUCCESS: Check if data is equal to example data', str(output.stdout)) - - def test_aasx_deseralization_json(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - output = _run_compliance_tool("d", os.path.join(test_file_path, "test_demo_full_example_json.aasx"), "--json", - "--aasx") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Read file', str(output.stdout)) - - def test_aasx_example_json(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - output = _run_compliance_tool("e", os.path.join(test_file_path, "test_demo_full_example_json.aasx"), "--json", - "--aasx") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Read file', str(output.stdout)) - self.assertIn('SUCCESS: Check if data is equal to example data', str(output.stdout)) - - def test_aasx_file(self) -> None: - test_file_path = os.path.join(os.path.dirname(__file__), 'files') - - output = _run_compliance_tool("f", os.path.join(test_file_path, "test_demo_full_example_xml.aasx"), - os.path.join(test_file_path, "test_demo_full_example_xml.aasx"), "--xml", - "--aasx") - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Open first file', str(output.stdout)) - self.assertIn('SUCCESS: Read file', str(output.stdout)) - self.assertIn('SUCCESS: Open second file', str(output.stdout)) - self.assertIn('SUCCESS: Read file', str(output.stdout)) - self.assertIn('SUCCESS: Check if data in files are equal', str(output.stdout)) - - def test_logfile(self) -> None: - file, filename = tempfile.mkstemp(suffix=".json") - file2, filename2 = tempfile.mkstemp(suffix=".log") - os.close(file) - os.close(file2) - output = _run_compliance_tool("c", filename, "--json", "-v", "-v", "-l", filename2) - self.assertEqual(0, output.returncode) - self.assertIn('SUCCESS: Create example data', str(output.stdout)) - self.assertIn('SUCCESS: Open file', str(output.stdout)) - self.assertIn('SUCCESS: Write data to file', str(output.stdout)) - - with open(filename2, "r", encoding='utf-8-sig') as f: - data = f.read() - self.assertIn('SUCCESS: Create example data', data) - self.assertIn('SUCCESS: Open file', data) - self.assertIn('SUCCESS: Write data to file', data) - os.unlink(filename) - os.unlink(filename2) + def test_logfile(self): + with tempfile.NamedTemporaryFile(suffix=".json") as tf: + with tempfile.NamedTemporaryFile("w+", encoding='utf-8-sig', suffix=".log") as lf: + + output = self._call_main(['c', tf.name, '--json', '-l', lf.name]) + + logfile_content = lf.read() + # print() appends a newline that file.write() does not + self.assertEqual(logfile_content, output.rstrip('\n')) From c015fd1a08fe40d45a5aa706f03a1713b4d24b00 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Tue, 16 Jun 2026 14:17:14 +0200 Subject: [PATCH 06/14] fix mypy and codestyle errors --- compliance_tool/test/_test_helper.py | 4 +- .../test/test_compliance_check_aasx.py | 48 +++++++++++++------ .../test/test_compliance_check_json.py | 26 ++++++---- .../test/test_compliance_check_xml.py | 19 +++++--- 4 files changed, 64 insertions(+), 33 deletions(-) diff --git a/compliance_tool/test/_test_helper.py b/compliance_tool/test/_test_helper.py index 5f5dff56..bfcac3fd 100644 --- a/compliance_tool/test/_test_helper.py +++ b/compliance_tool/test/_test_helper.py @@ -26,7 +26,7 @@ def create_example_aas_core_properties() -> pyecma376_2.OPCCoreProperties: def create_read_into_mock(file: Literal['TestFile', 'TestFileWrong', None]): """"Creates side effect function for the AASXReader.read_into mock""" - def fill_stores (store, file_store, **kwargs) -> None: + def fill_stores(store, file_store, **kwargs) -> None: for item in create_example_aas_binding(): store.add(item) @@ -37,6 +37,7 @@ def fill_stores (store, file_store, **kwargs) -> None: file_store.add_file("/TestFile.pdf", io.BytesIO(b"dummy"), "application/pdf") return fill_stores + def create_mock_effect( module: str, level: Literal['error', 'warning', 'info', 'debug'], @@ -54,4 +55,3 @@ def mock_error(*args, **kwargs): raise error_cls(error_msg) return mock_error - diff --git a/compliance_tool/test/test_compliance_check_aasx.py b/compliance_tool/test/test_compliance_check_aasx.py index 28884ccd..eb4129a2 100644 --- a/compliance_tool/test/test_compliance_check_aasx.py +++ b/compliance_tool/test/test_compliance_check_aasx.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from _test_helper import create_example_aas_core_properties, create_read_into_mock +from ._test_helper import create_example_aas_core_properties, create_read_into_mock from aas_compliance_tool import compliance_check_aasx as compliance_tool from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status @@ -59,7 +59,8 @@ def test_check_deserialization_success(self, mock_aasx_reader: mock.MagicMock) - @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) - def test_check_aas_example_fail_on_open(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + def test_check_aas_example_fail_on_open(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_aasx_reader.side_effect = ValueError("Test error!") @@ -73,7 +74,8 @@ def test_check_aas_example_fail_on_open(self, mock_data_checker: mock.MagicMock, @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) - def test_check_aas_example_fail_on_read(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + def test_check_aas_example_fail_on_read(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_aasx_reader.return_value.read_into.side_effect = ValueError("Test error!") @@ -87,7 +89,8 @@ def test_check_aas_example_fail_on_read(self, mock_data_checker: mock.MagicMock, @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) - def test_check_aas_example_fail_on_data_check(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + def test_check_aas_example_fail_on_data_check(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [CheckResult("Expected Behavior", False, dict())] @@ -103,7 +106,8 @@ def test_check_aas_example_fail_on_data_check(self, mock_data_checker: mock.Magi @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) - def test_check_aas_example_fail_on_core_properties(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + def test_check_aas_example_fail_on_core_properties(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] @@ -123,7 +127,8 @@ def test_check_aas_example_fail_on_core_properties(self, mock_data_checker: mock @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) - def test_check_aas_example_fail_on_file_missing(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + def test_check_aas_example_fail_on_file_missing(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] @@ -142,7 +147,7 @@ def test_check_aas_example_fail_on_file_missing(self, mock_data_checker: mock.Ma @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) def test_check_aas_example_fail_on_file_check(self, mock_data_checker: mock.MagicMock, - mock_aasx_reader: mock.MagicMock) -> None: + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] @@ -160,7 +165,8 @@ def test_check_aas_example_fail_on_file_check(self, mock_data_checker: mock.Magi @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) - def test_check_aas_example_success(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + def test_check_aas_example_success(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFile') @@ -177,10 +183,13 @@ def test_check_aas_example_success(self, mock_data_checker: mock.MagicMock, mock @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) - def test_check_aasx_files_equivalence_file1_fail_on_open(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + def test_check_aasx_files_equivalence_file1_fail_on_open(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_aasx_reader.side_effect = [ValueError("Test error!"), mock_aasx_reader.return_value] + mock_data_checker.return_value.checks = [] + mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() compliance_tool.check_aasx_files_equivalence("", "", manager) self.assertEqual(6, len(manager.steps)) @@ -194,10 +203,13 @@ def test_check_aasx_files_equivalence_file1_fail_on_open(self, mock_data_checker @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) - def test_check_aasx_files_equivalence_file2_fail_on_open(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + def test_check_aasx_files_equivalence_file2_fail_on_open(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_aasx_reader.side_effect = [mock_aasx_reader.return_value, ValueError("Test error!")] + mock_data_checker.return_value.checks = [] + mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() compliance_tool.check_aasx_files_equivalence("", "", manager) self.assertEqual(6, len(manager.steps)) @@ -211,11 +223,13 @@ def test_check_aasx_files_equivalence_file2_fail_on_open(self, mock_data_checker @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) - def test_check_aasx_files_equivalence_fail_on_data_check(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + def test_check_aasx_files_equivalence_fail_on_data_check(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [CheckResult("Test failure", False, dict())] mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() compliance_tool.check_aasx_files_equivalence("", "", manager) self.assertEqual(6, len(manager.steps)) @@ -230,11 +244,12 @@ def test_check_aasx_files_equivalence_fail_on_data_check(self, mock_data_checker @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) def test_check_aasx_files_equivalence_fail_on_core_properties(self, mock_data_checker: mock.MagicMock, - mock_aasx_reader: mock.MagicMock) -> None: + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFile') mock_data_checker.return_value.checks = [] + mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() mock_data_checker.return_value.failed_checks = iter([]) wrong_cp = create_example_aas_core_properties() @@ -256,7 +271,7 @@ def test_check_aasx_files_equivalence_fail_on_core_properties(self, mock_data_ch @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) def test_check_aasx_files_equivalence_fail_on_file_missing(self, mock_data_checker: mock.MagicMock, - mock_aasx_reader: mock.MagicMock) -> None: + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] @@ -264,6 +279,7 @@ def test_check_aasx_files_equivalence_fail_on_file_missing(self, mock_data_check mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() call_count = [0] + def setup_file_stores(*args, **kwargs): call_count[0] += 1 if call_count[0] == 1: @@ -279,7 +295,7 @@ def setup_file_stores(*args, **kwargs): @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) def test_check_aasx_files_equivalence_fail_on_file_check(self, mock_data_checker: mock.MagicMock, - mock_aasx_reader: mock.MagicMock) -> None: + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] @@ -287,6 +303,7 @@ def test_check_aasx_files_equivalence_fail_on_file_check(self, mock_data_checker mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() call_count = [0] + def setup_file_stores(*args, **kwargs): call_count[0] += 1 if call_count[0] == 1: @@ -301,7 +318,8 @@ def setup_file_stores(*args, **kwargs): @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) - def test_check_aasx_files_equivalence_success(self, mock_data_checker: mock.MagicMock, mock_aasx_reader: mock.MagicMock) -> None: + def test_check_aasx_files_equivalence_success(self, mock_data_checker: mock.MagicMock, + mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFile') diff --git a/compliance_tool/test/test_compliance_check_json.py b/compliance_tool/test/test_compliance_check_json.py index 1a33582c..ad89f294 100644 --- a/compliance_tool/test/test_compliance_check_json.py +++ b/compliance_tool/test/test_compliance_check_json.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from _test_helper import create_mock_effect +from ._test_helper import create_mock_effect from aas_compliance_tool import compliance_check_json as compliance_tool from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status @@ -16,7 +16,6 @@ class ComplianceToolJsonTest(unittest.TestCase): - def test_check_deserialization_no_file(self) -> None: manager = ComplianceToolStateManager() @@ -67,7 +66,8 @@ def test_check_deserialization_success(self, mock_read_json_file, mock_open) -> @mock.patch("builtins.open") @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) - def test_check_example_success(self, mock_data_checker: mock.MagicMock, mock_read_json_file: mock.MagicMock, mock_open: mock.MagicMock) -> None: + def test_check_example_success(self, mock_data_checker: mock.MagicMock, mock_read_json_file: mock.MagicMock, + mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] @@ -83,23 +83,24 @@ def test_check_example_success(self, mock_data_checker: mock.MagicMock, mock_rea @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) def test_check_example_fail_on_read(self, mock_data_checker: mock.MagicMock, mock_read_json_file: mock.MagicMock, - mock_open: mock.MagicMock) -> None: + mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - mock_read_json_file.side_effect = create_mock_effect('basyx.aas.adapter.json.json_deserialization', 'error', error_msg="Error on reading aas json file!") + mock_read_json_file.side_effect = create_mock_effect('basyx.aas.adapter.json.json_deserialization', 'error', + error_msg="Error on reading aas json file!") compliance_tool.check_aas_example("", manager) self.assertEqual(3, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.FAILED, manager.steps[1].status) - self.assertIn("Error on reading aas json file!", manager.format_step(1, verbose_level=1) ) + self.assertIn("Error on reading aas json file!", manager.format_step(1, verbose_level=1)) self.assertEqual(Status.NOT_EXECUTED, manager.steps[2].status) @mock.patch("builtins.open") @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) def test_check_example_fail_on_check(self, mock_data_checker: mock.MagicMock, mock_read_json_file: mock.MagicMock, - mock_open: mock.MagicMock) -> None: + mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [CheckResult("Expected Behavior", False, dict())] mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) @@ -115,10 +116,12 @@ def test_check_example_fail_on_check(self, mock_data_checker: mock.MagicMock, mo @mock.patch("builtins.open") @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) - def test_check_json_files_equivalence_file1_fail_on_deserialization(self, mock_data_checker, mock_read_json_file, mock_open) -> None: + def test_check_json_files_equivalence_file1_fail_on_deserialization(self, mock_data_checker, mock_read_json_file, + mock_open) -> None: manager = ComplianceToolStateManager() call_count = [0] + def mock_first_fails(*args, **kwargs): call_count[0] += 1 if call_count[0] == 1: @@ -138,10 +141,12 @@ def mock_first_fails(*args, **kwargs): @mock.patch("builtins.open") @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) - def test_check_json_files_equivalence_file2_fail_on_deserialization(self, mock_data_checker, mock_read_json_file, mock_open) -> None: + def test_check_json_files_equivalence_file2_fail_on_deserialization(self, mock_data_checker, mock_read_json_file, + mock_open) -> None: manager = ComplianceToolStateManager() call_count = [0] + def mock_second_fails(*args, **kwargs): call_count[0] += 1 if call_count[0] == 2: @@ -178,7 +183,8 @@ def test_check_json_files_equivalence_success(self, mock_data_checker, mock_read @mock.patch("builtins.open") @mock.patch("basyx.aas.adapter.json.json_deserialization.read_aas_json_file", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_json.AASDataChecker", autospec=True) - def test_check_json_files_equivalence_fail_on_check(self, mock_data_checker: mock.MagicMock, mock_read_json_file, mock_open) -> None: + def test_check_json_files_equivalence_fail_on_check(self, mock_data_checker: mock.MagicMock, mock_read_json_file, + mock_open) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [CheckResult("Test failure", False, dict())] diff --git a/compliance_tool/test/test_compliance_check_xml.py b/compliance_tool/test/test_compliance_check_xml.py index 43809025..245e238f 100644 --- a/compliance_tool/test/test_compliance_check_xml.py +++ b/compliance_tool/test/test_compliance_check_xml.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from _test_helper import create_mock_effect +from ._test_helper import create_mock_effect from aas_compliance_tool import compliance_check_xml as compliance_tool from aas_compliance_tool.state_manager import ComplianceToolStateManager, Status @@ -66,7 +66,8 @@ def test_check_deserialization_success(self, mock_read_xml_file, mock_open) -> N @mock.patch("builtins.open") @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_xml.AASDataChecker", autospec=True) - def test_check_example_success(self, mock_data_checker: mock.MagicMock, mock_read_xml_file: mock.MagicMock, mock_open: mock.MagicMock) -> None: + def test_check_example_success(self, mock_data_checker: mock.MagicMock, mock_read_xml_file: mock.MagicMock, + mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] @@ -85,7 +86,8 @@ def test_check_example_fail_on_read(self, mock_data_checker: mock.MagicMock, moc mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - mock_read_xml_file.side_effect = create_mock_effect('basyx.aas.adapter.xml.xml_deserialization', 'error', error_msg="Error on reading aas xml file!") + mock_read_xml_file.side_effect = create_mock_effect('basyx.aas.adapter.xml.xml_deserialization', 'error', + error_msg="Error on reading aas xml file!") compliance_tool.check_aas_example("", manager) self.assertEqual(3, len(manager.steps)) @@ -114,10 +116,12 @@ def test_check_example_fail_on_check(self, mock_data_checker: mock.MagicMock, mo @mock.patch("builtins.open") @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_xml.AASDataChecker", autospec=True) - def test_check_xml_files_equivalence_file1_fail_on_deserialization(self, mock_data_checker, mock_read_xml_file, mock_open) -> None: + def test_check_xml_files_equivalence_file1_fail_on_deserialization(self, mock_data_checker, mock_read_xml_file, + mock_open) -> None: manager = ComplianceToolStateManager() call_count = [0] + def mock_first_fails(*args, **kwargs): call_count[0] += 1 if call_count[0] == 1: @@ -137,10 +141,12 @@ def mock_first_fails(*args, **kwargs): @mock.patch("builtins.open") @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_xml.AASDataChecker", autospec=True) - def test_check_xml_files_equivalence_file2_fail_on_deserialization(self, mock_data_checker, mock_read_xml_file, mock_open) -> None: + def test_check_xml_files_equivalence_file2_fail_on_deserialization(self, mock_data_checker, mock_read_xml_file, + mock_open) -> None: manager = ComplianceToolStateManager() call_count = [0] + def mock_second_fails(*args, **kwargs): call_count[0] += 1 if call_count[0] == 2: @@ -177,7 +183,8 @@ def test_check_xml_files_equivalence_success(self, mock_data_checker, mock_read_ @mock.patch("builtins.open") @mock.patch("basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_xml.AASDataChecker", autospec=True) - def test_check_xml_files_equivalence_fail_on_check(self, mock_data_checker: mock.MagicMock, mock_read_xml_file, mock_open) -> None: + def test_check_xml_files_equivalence_fail_on_check(self, mock_data_checker: mock.MagicMock, mock_read_xml_file, + mock_open) -> None: manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [CheckResult("Test failure", False, dict())] From d98b5a663dcbd44b077c73032b600e1c015a513a Mon Sep 17 00:00:00 2001 From: hpoeche Date: Tue, 16 Jun 2026 14:26:41 +0200 Subject: [PATCH 07/14] Re-enable complaince_tool tests in CI --- .github/workflows/ci.yml | 58 +++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8f22657..5330806f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -203,37 +203,35 @@ jobs: chmod +x ./etc/scripts/set_copyright_year.sh ./etc/scripts/set_copyright_year.sh --check -# Todo: reset when the compliance-tool was updated (#485) + compliance-tool-test: + # This job runs the unittests on the python versions specified down at the matrix + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.12"] + defaults: + run: + working-directory: ./compliance_tool -# compliance-tool-test: -# # This job runs the unittests on the python versions specified down at the matrix -# runs-on: ubuntu-latest -# strategy: -# matrix: -# python-version: ["3.10", "3.12"] -# defaults: -# run: -# working-directory: ./compliance_tool -# -# steps: -# - uses: actions/checkout@v4 -# - name: Set up Python ${{ matrix.python-version }} -# uses: actions/setup-python@v5 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Install Python dependencies -# # install the local sdk in editable mode so it does not get overwritten -# run: | -# python -m pip install --upgrade pip -# python -m pip install ../sdk -# python -m pip install .[dev] -# - name: Test with coverage + unittest -# run: | -# python -m coverage run --source=aas_compliance_tool -m unittest -# - name: Report test coverage -# if: ${{ always() }} -# run: | -# python -m coverage report -m + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python dependencies + # install the local sdk in editable mode so it does not get overwritten + run: | + python -m pip install --upgrade pip + python -m pip install ../sdk + python -m pip install .[dev] + - name: Test with coverage + unittest + run: | + python -m coverage run --source=aas_compliance_tool -m unittest + - name: Report test coverage + if: ${{ always() }} + run: | + python -m coverage report -m compliance-tool-static-analysis: # This job runs static code analysis, namely pycodestyle and mypy From 79625a93f08e1ca0ba214ad040b66b047e28b485 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Tue, 16 Jun 2026 21:11:27 +0200 Subject: [PATCH 08/14] compliance_tool: fix aasx file equivalence Previously the aasx file equivalence check would 1. still execute subsequent steps if the loading of one file fails. This was caused by checking only if `state_manager.status is Status.FAILED`, missing that `Status.NOT_EXECUTED > Status.FAILED`. 2. use blank assertions to ensure core_properties `created` attribute is of type `datetime.datetime`. This resulted in the compliance_tool failing with `AssertionError` in cases that were caused by (1). Status guards for fast-failing are now corrected to take `Status.NOT_EXECUTED` into account. The assertions are removed and replaced with `DataChecker` checks to inform the user gracefully on problems. `cast(...)` is used to inform the type-checker about the `isinstance(...)` result. --- .../compliance_check_aasx.py | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/compliance_tool/aas_compliance_tool/compliance_check_aasx.py b/compliance_tool/aas_compliance_tool/compliance_check_aasx.py index 40c4f2cd..48917b87 100644 --- a/compliance_tool/aas_compliance_tool/compliance_check_aasx.py +++ b/compliance_tool/aas_compliance_tool/compliance_check_aasx.py @@ -13,7 +13,7 @@ """ import datetime import logging -from typing import Optional, Tuple +from typing import Optional, Tuple, cast import io from lxml import etree # type: ignore @@ -224,7 +224,7 @@ def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manag identifiable_store_2, files_2, cp_2 = check_deserialization(file_path_2, state_manager, 'second') - if state_manager.status is Status.FAILED: + if state_manager.status >= Status.FAILED: state_manager.add_step('Check if data in files are equal') state_manager.set_step_status(Status.NOT_EXECUTED) state_manager.add_step('Check if core properties are equal') @@ -244,18 +244,30 @@ def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manag state_manager.add_log_records_from_data_checker(checker) - if state_manager.status is Status.FAILED: + if state_manager.status >= Status.FAILED: state_manager.add_step('Check if core properties are equal') state_manager.set_step_status(Status.NOT_EXECUTED) return state_manager.add_step('Check if core properties are equal') checker2 = DataChecker(raise_immediately=False) - assert (isinstance(cp_1.created, datetime.datetime)) - assert (isinstance(cp_2.created, datetime.datetime)) - duration = cp_1.created - cp_2.created + checker2.check(isinstance(cp_1.created, datetime.datetime), + "core property created of first file must be of type datetime", + created=type(cp_1.created)) + checker2.check(isinstance(cp_2.created, datetime.datetime), + "core property created of second file must be of type datetime", + created=type(cp_2.created)) + + if any(True for _ in checker2.failed_checks): + state_manager.add_log_records_from_data_checker(checker2) + return + + duration = cast(datetime.datetime, cp_1.created) - cast(datetime.datetime, cp_2.created) checker2.check(duration.microseconds < 20, "created must be {}".format(cp_1.created), value=cp_2.created) checker2.check(cp_1.creator == cp_2.creator, "creator must be {}".format(cp_1.creator), value=cp_2.creator) checker2.check(cp_1.lastModifiedBy == cp_2.lastModifiedBy, "lastModifiedBy must be {}".format(cp_1.lastModifiedBy), value=cp_2.lastModifiedBy) + checker2.check(cp_1.revision == cp_2.revision, "revision must be {}".format(cp_2.revision), revision=cp_1.revision) + checker2.check(cp_1.version == cp_2.version, "version must be {}".format(cp_2.version), version=cp_1.version) + checker2.check(cp_1.title == cp_2.title, "title must be {}".format(cp_2.title), title=cp_1.title) state_manager.add_log_records_from_data_checker(checker2) From 5fd041c7b62c94e760fda22b559bfc4df0d41c91 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Tue, 16 Jun 2026 21:41:04 +0200 Subject: [PATCH 09/14] add supp_files check for aasx file equivalence Previously the supplementary files of the aasx container were not tested for presence or equality although the check_aas_example did it. Now a two-way check, coparing presence, content-type and sha256 is implemented. Tests were adapted to expect the additional step. --- .../compliance_check_aasx.py | 30 +++++++++++++++ .../test/test_compliance_check_aasx.py | 37 +++++++++++++++---- 2 files changed, 60 insertions(+), 7 deletions(-) diff --git a/compliance_tool/aas_compliance_tool/compliance_check_aasx.py b/compliance_tool/aas_compliance_tool/compliance_check_aasx.py index 48917b87..abc1a654 100644 --- a/compliance_tool/aas_compliance_tool/compliance_check_aasx.py +++ b/compliance_tool/aas_compliance_tool/compliance_check_aasx.py @@ -229,6 +229,8 @@ def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manag state_manager.set_step_status(Status.NOT_EXECUTED) state_manager.add_step('Check if core properties are equal') state_manager.set_step_status(Status.NOT_EXECUTED) + state_manager.add_step('Check if supplementary files are equal') + state_manager.set_step_status(Status.NOT_EXECUTED) return checker = AASDataChecker(raise_immediately=False, **kwargs) @@ -240,6 +242,8 @@ def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manag logger.error(error) state_manager.add_step('Check if core properties are equal') state_manager.set_step_status(Status.NOT_EXECUTED) + state_manager.add_step('Check if supplementary files are equal') + state_manager.set_step_status(Status.NOT_EXECUTED) return state_manager.add_log_records_from_data_checker(checker) @@ -247,6 +251,8 @@ def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manag if state_manager.status >= Status.FAILED: state_manager.add_step('Check if core properties are equal') state_manager.set_step_status(Status.NOT_EXECUTED) + state_manager.add_step('Check if supplementary files are equal') + state_manager.set_step_status(Status.NOT_EXECUTED) return state_manager.add_step('Check if core properties are equal') @@ -271,3 +277,27 @@ def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manag checker2.check(cp_1.version == cp_2.version, "version must be {}".format(cp_2.version), version=cp_1.version) checker2.check(cp_1.title == cp_2.title, "title must be {}".format(cp_2.title), title=cp_1.title) state_manager.add_log_records_from_data_checker(checker2) + + state_manager.add_step('Check if supplementary files are equal') + + file_checker = DataChecker(raise_immediately=False) + for file_name in files_1: + both_contain = file_checker.check(file_name in files_2, + "second file must contain supplementary file {}".format(file_name)) + if both_contain: + expected_type = files_1.get_content_type(file_name) + file_checker.check(expected_type == files_2.get_content_type(file_name), + "second file must contain supplementary file {} with content-type {}".format(file_name, + expected_type), + content_type=files_2.get_content_type(file_name)) + expected_checksum = files_1.get_sha256(file_name) + file_checker.check(expected_checksum == files_2.get_sha256(file_name), + "second file must contain supplementary file {} with sha256 {}".format(file_name, + expected_checksum), + checksum=files_2.get_sha256(file_name)) + + for file_name in files_2: + file_checker.check(file_name in files_1, + "first file must contain supplementary file {}".format(file_name)) + + state_manager.add_log_records_from_data_checker(file_checker) \ No newline at end of file diff --git a/compliance_tool/test/test_compliance_check_aasx.py b/compliance_tool/test/test_compliance_check_aasx.py index eb4129a2..ce9407a1 100644 --- a/compliance_tool/test/test_compliance_check_aasx.py +++ b/compliance_tool/test/test_compliance_check_aasx.py @@ -192,7 +192,7 @@ def test_check_aasx_files_equivalence_file1_fail_on_open(self, mock_data_checker mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() compliance_tool.check_aasx_files_equivalence("", "", manager) - self.assertEqual(6, len(manager.steps)) + self.assertEqual(7, len(manager.steps)) self.assertEqual(Status.FAILED, manager.steps[0].status) self.assertIn("Test error!", manager.format_step(0, verbose_level=1)) self.assertEqual(Status.NOT_EXECUTED, manager.steps[1].status) @@ -200,6 +200,7 @@ def test_check_aasx_files_equivalence_file1_fail_on_open(self, mock_data_checker self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[4].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[5].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[6].status) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -212,7 +213,7 @@ def test_check_aasx_files_equivalence_file2_fail_on_open(self, mock_data_checker mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() compliance_tool.check_aasx_files_equivalence("", "", manager) - self.assertEqual(6, len(manager.steps)) + self.assertEqual(7, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.FAILED, manager.steps[2].status) @@ -220,6 +221,7 @@ def test_check_aasx_files_equivalence_file2_fail_on_open(self, mock_data_checker self.assertEqual(Status.NOT_EXECUTED, manager.steps[3].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[4].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[5].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[6].status) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -232,7 +234,7 @@ def test_check_aasx_files_equivalence_fail_on_data_check(self, mock_data_checker mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() compliance_tool.check_aasx_files_equivalence("", "", manager) - self.assertEqual(6, len(manager.steps)) + self.assertEqual(7, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) @@ -240,6 +242,7 @@ def test_check_aasx_files_equivalence_fail_on_data_check(self, mock_data_checker self.assertEqual(Status.FAILED, manager.steps[4].status) self.assertIn("Test failure", manager.format_step(4, verbose_level=1)) self.assertEqual(Status.NOT_EXECUTED, manager.steps[5].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[6].status) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -259,7 +262,7 @@ def test_check_aasx_files_equivalence_fail_on_core_properties(self, mock_data_ch compliance_tool.check_aasx_files_equivalence("", "", manager) - self.assertEqual(6, len(manager.steps)) + self.assertEqual(7, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) @@ -267,6 +270,7 @@ def test_check_aasx_files_equivalence_fail_on_core_properties(self, mock_data_ch self.assertEqual(Status.SUCCESS, manager.steps[4].status) self.assertEqual(Status.FAILED, manager.steps[5].status) self.assertIn("Wrong Creator", manager.format_step(5, verbose_level=1)) + self.assertEqual(Status.SUCCESS, manager.steps[6].status) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -290,7 +294,16 @@ def setup_file_stores(*args, **kwargs): mock_aasx_reader.return_value.read_into.side_effect = setup_file_stores compliance_tool.check_aasx_files_equivalence("", "", manager) - self.assertEqual(Status.FAILED, manager.status) + self.assertEqual(7, len(manager.steps)) + self.assertEqual(Status.SUCCESS, manager.steps[0].status) + self.assertEqual(Status.SUCCESS, manager.steps[1].status) + self.assertEqual(Status.SUCCESS, manager.steps[2].status) + self.assertEqual(Status.SUCCESS, manager.steps[3].status) + self.assertEqual(Status.SUCCESS, manager.steps[4].status) + self.assertEqual(Status.SUCCESS, manager.steps[5].status) + self.assertEqual(Status.FAILED, manager.steps[6].status) + self.assertIn("second file must contain supplementary file /TestFile.pdf", + manager.format_step(6, verbose_level=1)) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -314,7 +327,16 @@ def setup_file_stores(*args, **kwargs): mock_aasx_reader.return_value.read_into.side_effect = setup_file_stores compliance_tool.check_aasx_files_equivalence("", "", manager) - self.assertEqual(Status.FAILED, manager.status) + self.assertEqual(7, len(manager.steps)) + self.assertEqual(Status.SUCCESS, manager.steps[0].status) + self.assertEqual(Status.SUCCESS, manager.steps[1].status) + self.assertEqual(Status.SUCCESS, manager.steps[2].status) + self.assertEqual(Status.SUCCESS, manager.steps[3].status) + self.assertEqual(Status.SUCCESS, manager.steps[4].status) + self.assertEqual(Status.SUCCESS, manager.steps[5].status) + self.assertEqual(Status.FAILED, manager.steps[6].status) + self.assertIn("second file must contain supplementary file /TestFile.pdf with sha256", + manager.format_step(6, verbose_level=1)) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -328,10 +350,11 @@ def test_check_aasx_files_equivalence_success(self, mock_data_checker: mock.Magi mock_data_checker.return_value.failed_checks = iter([]) compliance_tool.check_aasx_files_equivalence("", "", manager) - self.assertEqual(6, len(manager.steps)) + self.assertEqual(7, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.SUCCESS, manager.steps[4].status) self.assertEqual(Status.SUCCESS, manager.steps[5].status) + self.assertEqual(Status.SUCCESS, manager.steps[6].status) From dfcf9379c99d61e8ba57339343a5a3e23afa4b8f Mon Sep 17 00:00:00 2001 From: hpoeche Date: Wed, 17 Jun 2026 10:57:48 +0200 Subject: [PATCH 10/14] fix supp_file check for aasx check_example_aas The previous check on the supplementary file was broken, as it compared the sha256 value of the TestFile to itself. Introduced a new step which checks for presence and equality of supplementary file `/TestFile.pdf` in the AASX container. Refactored the core property checks to no longer use `assert` in combination with `try ... except AssertionError`. --- .../compliance_check_aasx.py | 80 ++++++++----------- .../test/test_compliance_check_aasx.py | 29 ++++--- 2 files changed, 53 insertions(+), 56 deletions(-) diff --git a/compliance_tool/aas_compliance_tool/compliance_check_aasx.py b/compliance_tool/aas_compliance_tool/compliance_check_aasx.py index abc1a654..82b25766 100644 --- a/compliance_tool/aas_compliance_tool/compliance_check_aasx.py +++ b/compliance_tool/aas_compliance_tool/compliance_check_aasx.py @@ -118,6 +118,8 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager, state_manager.set_step_status(Status.NOT_EXECUTED) state_manager.add_step('Check if core properties are equal') state_manager.set_step_status(Status.NOT_EXECUTED) + state_manager.add_step('Check if supplementary files are equal') + state_manager.set_step_status(Status.NOT_EXECUTED) return checker = AASDataChecker(raise_immediately=False, **kwargs) @@ -130,6 +132,8 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager, if state_manager.status in (Status.FAILED, Status.NOT_EXECUTED): state_manager.add_step('Check if core properties are equal') state_manager.set_step_status(Status.NOT_EXECUTED) + state_manager.add_step('Check if supplementary files are equal') + state_manager.set_step_status(Status.NOT_EXECUTED) return state_manager.add_step('Check if core properties are equal') @@ -145,60 +149,46 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager, cp.title = "Test Title" checker2 = DataChecker(raise_immediately=False) - try: - assert isinstance(cp_new.created, datetime.datetime) - checker2.check(isinstance(cp_new.created, datetime.datetime), "core property created must be of type datetime", - created=type(cp_new.created)) - duration = cp_new.created - cp.created + if checker2.check(isinstance(cp_new.created, datetime.datetime), "core property created must be of type datetime", + created=type(cp_new.created)): + duration = cast(datetime.datetime, cp_new.created) - cp.created checker2.check(duration.microseconds < 20, "created must be {}".format(cp.created), created=cp_new.created) - except AssertionError: - checker2.check(isinstance(cp_new.created, datetime.datetime), "core property created must be of type datetime", - created=type(cp_new.created)) checker2.check(cp_new.creator == cp.creator, "creator must be {}".format(cp.creator), creator=cp_new.creator) checker2.check(cp_new.description == cp.description, "description must be {}".format(cp.description), description=cp_new.description) checker2.check(cp_new.lastModifiedBy == cp.lastModifiedBy, "lastModifiedBy must be {}".format(cp.lastModifiedBy), lastModifiedBy=cp_new.lastModifiedBy) - try: - assert isinstance(cp_new.modified, datetime.datetime) - checker2.check(isinstance(cp_new.modified, datetime.datetime), "modified bust be of type datetime", - modified=type(cp_new.modified)) - duration = cp_new.modified - cp.modified + + if checker2.check(isinstance(cp_new.modified, datetime.datetime), "modified must be of type datetime", + modified=type(cp_new.modified)): + duration = cast(datetime.datetime, cp_new.modified) - cp.modified checker2.check(duration.microseconds < 20, "modified must be {}".format(cp.modified), modified=cp_new.modified) - except AssertionError: - checker2.check(isinstance(cp_new.modified, datetime.datetime), "modified bust be of type datetime", - modified=type(cp_new.modified)) + checker2.check(cp_new.revision == cp.revision, "revision must be {}".format(cp.revision), revision=cp_new.revision) checker2.check(cp_new.version == cp.version, "version must be {}".format(cp.version), version=cp_new.version) checker2.check(cp_new.title == cp.title, "title must be {}".format(cp.title), title=cp_new.title) + state_manager.add_log_records_from_data_checker(checker2) + # Check if file in file object is the same + state_manager.add_step('Check if supplementary files are equal') + file_checker = DataChecker(raise_immediately=False) + list_of_id_shorts = ["ExampleSubmodelCollection", "ExampleFile"] identifiable = example_data.get_item("https://example.org/Test_Submodel") for id_short in list_of_id_shorts: identifiable = identifiable.get_referable(id_short) - obj2 = identifiable_store.get_item("https://example.org/Test_Submodel") - for id_short in list_of_id_shorts: - obj2 = obj2.get_referable(id_short) - try: - sha_file = files.get_sha256(identifiable.value) - except KeyError as error: - state_manager.add_log_records_from_data_checker(checker2) - logger.error(error) - state_manager.set_step_status(Status.FAILED) - return + file_name = identifiable.value + if file_checker.check(file_name in files, f"Supplementary File {file_name} must exist"): + test_file_checksum = 'b18229b24a4ee92c6c2b6bc6a8018563b17472f1150d35d5a5945afeb447ed44' + file_checker.check( + files.get_sha256(file_name).hex() == test_file_checksum, + f"Supplementary File {file_name} checksum must be '{test_file_checksum}'.", + value=files.get_sha256(file_name) + ) - checker2.check( - sha_file == files.get_sha256(obj2.value), - "File of {} must be {}.".format(identifiable.value, obj2.value), - value=obj2.value - ) - state_manager.add_log_records_from_data_checker(checker2) - if state_manager.status in (Status.FAILED, Status.NOT_EXECUTED): - state_manager.set_step_status(Status.FAILED) - else: - state_manager.set_step_status(Status.SUCCESS) + state_manager.add_log_records_from_data_checker(file_checker) def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manager: ComplianceToolStateManager, @@ -283,21 +273,21 @@ def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manag file_checker = DataChecker(raise_immediately=False) for file_name in files_1: both_contain = file_checker.check(file_name in files_2, - "second file must contain supplementary file {}".format(file_name)) + "second file must contain supplementary file {}".format(file_name)) if both_contain: expected_type = files_1.get_content_type(file_name) file_checker.check(expected_type == files_2.get_content_type(file_name), - "second file must contain supplementary file {} with content-type {}".format(file_name, - expected_type), - content_type=files_2.get_content_type(file_name)) + f"second file must contain supplementary file {file_name}" + " with content-type {expected_type}", + content_type=files_2.get_content_type(file_name)) expected_checksum = files_1.get_sha256(file_name) file_checker.check(expected_checksum == files_2.get_sha256(file_name), - "second file must contain supplementary file {} with sha256 {}".format(file_name, - expected_checksum), - checksum=files_2.get_sha256(file_name)) + f"second file must contain supplementary file {file_name}" + f" with sha256 {expected_checksum.hex()}", + checksum=files_2.get_sha256(file_name).hex()) for file_name in files_2: file_checker.check(file_name in files_1, - "first file must contain supplementary file {}".format(file_name)) + "first file must contain supplementary file {}".format(file_name)) - state_manager.add_log_records_from_data_checker(file_checker) \ No newline at end of file + state_manager.add_log_records_from_data_checker(file_checker) diff --git a/compliance_tool/test/test_compliance_check_aasx.py b/compliance_tool/test/test_compliance_check_aasx.py index ce9407a1..bce293f3 100644 --- a/compliance_tool/test/test_compliance_check_aasx.py +++ b/compliance_tool/test/test_compliance_check_aasx.py @@ -66,11 +66,12 @@ def test_check_aas_example_fail_on_open(self, mock_data_checker: mock.MagicMock, mock_aasx_reader.side_effect = ValueError("Test error!") compliance_tool.check_aas_example("", manager) - self.assertEqual(4, len(manager.steps)) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.FAILED, manager.steps[0].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[1].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[2].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[3].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[4].status) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -81,11 +82,12 @@ def test_check_aas_example_fail_on_read(self, mock_data_checker: mock.MagicMock, mock_aasx_reader.return_value.read_into.side_effect = ValueError("Test error!") compliance_tool.check_aas_example("", manager) - self.assertEqual(4, len(manager.steps)) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.FAILED, manager.steps[1].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[2].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[3].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[4].status) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -97,12 +99,13 @@ def test_check_aas_example_fail_on_data_check(self, mock_data_checker: mock.Magi mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) compliance_tool.check_aas_example("", manager) - self.assertEqual(4, len(manager.steps)) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.FAILED, manager.steps[2].status) self.assertIn("Expected Behavior", manager.format_step(2, verbose_level=1)) self.assertEqual(Status.NOT_EXECUTED, manager.steps[3].status) + self.assertEqual(Status.NOT_EXECUTED, manager.steps[4].status) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -118,12 +121,13 @@ def test_check_aas_example_fail_on_core_properties(self, mock_data_checker: mock mock_aasx_reader.return_value.get_core_properties.return_value = wrong_cp compliance_tool.check_aas_example("", manager) - self.assertEqual(4, len(manager.steps)) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.FAILED, manager.steps[3].status) self.assertIn("Wrong Creator", manager.format_step(3, verbose_level=1)) + self.assertEqual(Status.SUCCESS, manager.steps[4].status) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -137,12 +141,13 @@ def test_check_aas_example_fail_on_file_missing(self, mock_data_checker: mock.Ma mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() compliance_tool.check_aas_example("", manager) - self.assertEqual(4, len(manager.steps)) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) - self.assertEqual(Status.FAILED, manager.steps[3].status) - self.assertIn("/TestFile.pdf", manager.format_step(3, verbose_level=1)) + self.assertEqual(Status.SUCCESS, manager.steps[3].status) + self.assertEqual(Status.FAILED, manager.steps[4].status) + self.assertIn("/TestFile.pdf", manager.format_step(4, verbose_level=1)) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -156,12 +161,13 @@ def test_check_aas_example_fail_on_file_check(self, mock_data_checker: mock.Magi mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() compliance_tool.check_aas_example("", manager) - self.assertEqual(4, len(manager.steps)) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) - self.assertEqual(Status.FAILED, manager.steps[3].status) - self.assertIn("/TestFile.pdf", manager.format_step(3, verbose_level=1)) + self.assertEqual(Status.SUCCESS, manager.steps[3].status) + self.assertEqual(Status.FAILED, manager.steps[4].status) + self.assertIn("/TestFile.pdf", manager.format_step(4, verbose_level=1)) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) @@ -175,11 +181,12 @@ def test_check_aas_example_success(self, mock_data_checker: mock.MagicMock, mock_data_checker.return_value.failed_checks = iter([]) compliance_tool.check_aas_example("", manager) - self.assertEqual(4, len(manager.steps)) + self.assertEqual(5, len(manager.steps)) self.assertEqual(Status.SUCCESS, manager.steps[0].status) self.assertEqual(Status.SUCCESS, manager.steps[1].status) self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) + self.assertEqual(Status.SUCCESS, manager.steps[4].status) @mock.patch("basyx.aas.adapter.aasx.AASXReader", autospec=True) @mock.patch("aas_compliance_tool.compliance_check_aasx.AASDataChecker", autospec=True) From c91848fed617a3920efc154aeafbd22290817ca6 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Wed, 17 Jun 2026 11:55:14 +0200 Subject: [PATCH 11/14] fix: DataChecker `failed_checks` mock property The `failed_checks` is a property that returns a fresh iterator at each call. With `mock_data_checker.return_value.failed_checks = iter([])` only one iterator is created that may be exhausted at subsequent calls. The introduced `PropertyMock` fixes this. --- .../test/test_compliance_check_aasx.py | 28 ++++++++++--------- .../test/test_compliance_check_json.py | 16 ++++++----- .../test/test_compliance_check_xml.py | 16 ++++++----- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/compliance_tool/test/test_compliance_check_aasx.py b/compliance_tool/test/test_compliance_check_aasx.py index bce293f3..b6e3ffbe 100644 --- a/compliance_tool/test/test_compliance_check_aasx.py +++ b/compliance_tool/test/test_compliance_check_aasx.py @@ -95,8 +95,9 @@ def test_check_aas_example_fail_on_data_check(self, mock_data_checker: mock.Magi mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - mock_data_checker.return_value.checks = [CheckResult("Expected Behavior", False, dict())] - mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + failed = [CheckResult("Expected Behavior", False, dict())] + mock_data_checker.return_value.checks = failed + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter(failed)) compliance_tool.check_aas_example("", manager) self.assertEqual(5, len(manager.steps)) @@ -114,7 +115,7 @@ def test_check_aas_example_fail_on_core_properties(self, mock_data_checker: mock manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFile') wrong_cp = create_example_aas_core_properties() wrong_cp.creator = "Wrong Creator" @@ -136,7 +137,7 @@ def test_check_aas_example_fail_on_file_missing(self, mock_data_checker: mock.Ma manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file=None) mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() compliance_tool.check_aas_example("", manager) @@ -156,7 +157,7 @@ def test_check_aas_example_fail_on_file_check(self, mock_data_checker: mock.Magi manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFileWrong') mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() compliance_tool.check_aas_example("", manager) @@ -178,7 +179,7 @@ def test_check_aas_example_success(self, mock_data_checker: mock.MagicMock, mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFile') mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() mock_data_checker.return_value.checks = [] - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) compliance_tool.check_aas_example("", manager) self.assertEqual(5, len(manager.steps)) @@ -236,8 +237,9 @@ def test_check_aasx_files_equivalence_fail_on_data_check(self, mock_data_checker mock_aasx_reader: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - mock_data_checker.return_value.checks = [CheckResult("Test failure", False, dict())] - mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + failed = [CheckResult("Expected Behavior", False, dict())] + mock_data_checker.return_value.checks = failed + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter(failed)) mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() compliance_tool.check_aasx_files_equivalence("", "", manager) @@ -247,7 +249,7 @@ def test_check_aasx_files_equivalence_fail_on_data_check(self, mock_data_checker self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.FAILED, manager.steps[4].status) - self.assertIn("Test failure", manager.format_step(4, verbose_level=1)) + self.assertIn("Expected Behavior", manager.format_step(4, verbose_level=1)) self.assertEqual(Status.NOT_EXECUTED, manager.steps[5].status) self.assertEqual(Status.NOT_EXECUTED, manager.steps[6].status) @@ -260,7 +262,7 @@ def test_check_aasx_files_equivalence_fail_on_core_properties(self, mock_data_ch mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFile') mock_data_checker.return_value.checks = [] mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) wrong_cp = create_example_aas_core_properties() wrong_cp.creator = "Wrong Creator" @@ -286,7 +288,7 @@ def test_check_aasx_files_equivalence_fail_on_file_missing(self, mock_data_check manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() call_count = [0] @@ -319,7 +321,7 @@ def test_check_aasx_files_equivalence_fail_on_file_check(self, mock_data_checker manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() call_count = [0] @@ -354,7 +356,7 @@ def test_check_aasx_files_equivalence_success(self, mock_data_checker: mock.Magi mock_aasx_reader.return_value.read_into.side_effect = create_read_into_mock(file='TestFile') mock_aasx_reader.return_value.get_core_properties.return_value = create_example_aas_core_properties() mock_data_checker.return_value.checks = [] - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) compliance_tool.check_aasx_files_equivalence("", "", manager) self.assertEqual(7, len(manager.steps)) diff --git a/compliance_tool/test/test_compliance_check_json.py b/compliance_tool/test/test_compliance_check_json.py index ad89f294..e889bc39 100644 --- a/compliance_tool/test/test_compliance_check_json.py +++ b/compliance_tool/test/test_compliance_check_json.py @@ -71,7 +71,7 @@ def test_check_example_success(self, mock_data_checker: mock.MagicMock, mock_rea manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) compliance_tool.check_aas_example("", manager) self.assertEqual(3, len(manager.steps)) @@ -102,8 +102,9 @@ def test_check_example_fail_on_read(self, mock_data_checker: mock.MagicMock, moc def test_check_example_fail_on_check(self, mock_data_checker: mock.MagicMock, mock_read_json_file: mock.MagicMock, mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - mock_data_checker.return_value.checks = [CheckResult("Expected Behavior", False, dict())] - mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + failed = [CheckResult("Expected Behavior", False, dict())] + mock_data_checker.return_value.checks = failed + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter(failed)) compliance_tool.check_aas_example("", manager) @@ -170,7 +171,7 @@ def test_check_json_files_equivalence_success(self, mock_data_checker, mock_read manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) compliance_tool.check_json_files_equivalence("", "", manager) self.assertEqual(5, len(manager.steps)) @@ -187,8 +188,9 @@ def test_check_json_files_equivalence_fail_on_check(self, mock_data_checker: moc mock_open) -> None: manager = ComplianceToolStateManager() - mock_data_checker.return_value.checks = [CheckResult("Test failure", False, dict())] - mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + failed = [CheckResult("Expected Behavior", False, dict())] + mock_data_checker.return_value.checks = failed + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter(failed)) compliance_tool.check_json_files_equivalence("", "", manager) self.assertEqual(5, len(manager.steps)) @@ -197,4 +199,4 @@ def test_check_json_files_equivalence_fail_on_check(self, mock_data_checker: moc self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.FAILED, manager.steps[4].status) - self.assertIn("Test failure", manager.format_step(4, verbose_level=1)) + self.assertIn("Expected Behavior", manager.format_step(4, verbose_level=1)) diff --git a/compliance_tool/test/test_compliance_check_xml.py b/compliance_tool/test/test_compliance_check_xml.py index 245e238f..0a85e330 100644 --- a/compliance_tool/test/test_compliance_check_xml.py +++ b/compliance_tool/test/test_compliance_check_xml.py @@ -71,7 +71,7 @@ def test_check_example_success(self, mock_data_checker: mock.MagicMock, mock_rea manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) compliance_tool.check_aas_example("", manager) self.assertEqual(3, len(manager.steps)) @@ -102,8 +102,9 @@ def test_check_example_fail_on_read(self, mock_data_checker: mock.MagicMock, moc def test_check_example_fail_on_check(self, mock_data_checker: mock.MagicMock, mock_read_xml_file: mock.MagicMock, mock_open: mock.MagicMock) -> None: manager = ComplianceToolStateManager() - mock_data_checker.return_value.checks = [CheckResult("Expected Behavior", False, dict())] - mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + failed = [CheckResult("Expected Behavior", False, dict())] + mock_data_checker.return_value.checks = failed + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter(failed)) compliance_tool.check_aas_example("", manager) @@ -170,7 +171,7 @@ def test_check_xml_files_equivalence_success(self, mock_data_checker, mock_read_ manager = ComplianceToolStateManager() mock_data_checker.return_value.checks = [] - mock_data_checker.return_value.failed_checks = iter([]) + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter([])) compliance_tool.check_xml_files_equivalence("", "", manager) self.assertEqual(5, len(manager.steps)) @@ -187,8 +188,9 @@ def test_check_xml_files_equivalence_fail_on_check(self, mock_data_checker: mock mock_open) -> None: manager = ComplianceToolStateManager() - mock_data_checker.return_value.checks = [CheckResult("Test failure", False, dict())] - mock_data_checker.return_value.failed_checks = iter(mock_data_checker.return_value.checks) + failed = [CheckResult("Expected Behavior", False, dict())] + mock_data_checker.return_value.checks = failed + type(mock_data_checker.return_value).failed_checks = mock.PropertyMock(side_effect=lambda: iter(failed)) compliance_tool.check_xml_files_equivalence("", "", manager) self.assertEqual(5, len(manager.steps)) @@ -197,4 +199,4 @@ def test_check_xml_files_equivalence_fail_on_check(self, mock_data_checker: mock self.assertEqual(Status.SUCCESS, manager.steps[2].status) self.assertEqual(Status.SUCCESS, manager.steps[3].status) self.assertEqual(Status.FAILED, manager.steps[4].status) - self.assertIn("Test failure", manager.format_step(4, verbose_level=1)) + self.assertIn("Expected Behavior", manager.format_step(4, verbose_level=1)) From 3f106bcb5ffa7ff3ad7c953487ab4b9684dd8d8e Mon Sep 17 00:00:00 2001 From: hpoeche Date: Wed, 17 Jun 2026 14:02:03 +0200 Subject: [PATCH 12/14] compliance_tool: add integration tests As the new test structure uses mocking extensively, the risk for missing error cases in these tests increases. To overcome this simple end-to-end integration tests are integrated now, which do not use mocking but operate on real temporary files. For all three adapters a full cycle is implemented: 1. create -> check_example (both success and fail) 2. create x2 -> check_file_equivalence (both sucess and fail) --- .../test/test_compliance_tool_integration.py | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 compliance_tool/test/test_compliance_tool_integration.py diff --git a/compliance_tool/test/test_compliance_tool_integration.py b/compliance_tool/test/test_compliance_tool_integration.py new file mode 100644 index 00000000..512c312e --- /dev/null +++ b/compliance_tool/test/test_compliance_tool_integration.py @@ -0,0 +1,132 @@ +# Copyright (c) 2026 the Eclipse BaSyx Authors +# +# This program and the accompanying materials are made available under the terms of the MIT License, available in +# the LICENSE file of this project. +# +# SPDX-License-Identifier: MIT +""" +Integration tests that exercise the full compliance check pipeline without mocking AASDataChecker. +Each test creates a real file on disk and runs the compliance tool CLI against it. +""" +import tempfile +import unittest +from contextlib import redirect_stdout +from io import StringIO +from typing import cast +from unittest.mock import patch + +from basyx.aas import model +from basyx.aas.adapter import aasx +from basyx.aas.adapter.json import write_aas_json_file +from basyx.aas.adapter.xml import write_aas_xml_file +from basyx.aas.examples.data.example_aas import create_full_example + +from aas_compliance_tool.cli import main + + +class ComplianceToolIntegrationTest(unittest.TestCase): + + def _call_main(self, args) -> str: + buf = StringIO() + with patch('sys.argv', ['compliance_tool'] + args): + with redirect_stdout(buf): + main() + return buf.getvalue() + + def _modified_example(self) -> model.DictIdentifiableStore: + modified_example = create_full_example() + submodel = cast(model.Submodel, modified_example.get_item("https://example.org/Test_Submodel")) + submodel.submodel_element.remove(next(iter(submodel.submodel_element))) + return modified_example + + # --- JSON --- + + def test_json_example_success(self) -> None: + with tempfile.NamedTemporaryFile(suffix=".json") as tf: + self._call_main(['c', tf.name, '--json']) + output = self._call_main(['e', tf.name, '--json']) + self.assertNotIn('FAILED:', output) + + def test_json_example_fail(self) -> None: + with tempfile.NamedTemporaryFile(suffix=".json", mode='w', encoding='utf-8-sig') as tf: + write_aas_json_file(tf, self._modified_example()) + tf.flush() + output = self._call_main(['e', tf.name, '--json']) + self.assertIn('FAILED:', output) + + def test_json_files_equivalence_success(self) -> None: + with tempfile.NamedTemporaryFile(suffix=".json") as tf1, \ + tempfile.NamedTemporaryFile(suffix=".json") as tf2: + self._call_main(['c', tf1.name, '--json']) + self._call_main(['c', tf2.name, '--json']) + output = self._call_main(['f', tf1.name, tf2.name, '--json']) + self.assertNotIn('FAILED:', output) + + def test_json_files_equivalence_fail(self) -> None: + with tempfile.NamedTemporaryFile(suffix=".json") as tf1, \ + tempfile.NamedTemporaryFile(suffix=".json", mode='w', encoding='utf-8-sig') as tf2: + self._call_main(['c', tf1.name, '--json']) + write_aas_json_file(tf2, self._modified_example()) + tf2.flush() + output = self._call_main(['f', tf1.name, tf2.name, '--json']) + self.assertIn('FAILED:', output) + + # --- XML --- + + def test_xml_example_success(self) -> None: + with tempfile.NamedTemporaryFile(suffix=".xml") as tf: + self._call_main(['c', tf.name, '--xml']) + output = self._call_main(['e', tf.name, '--xml']) + self.assertNotIn('FAILED:', output) + + def test_xml_example_fail(self) -> None: + with tempfile.NamedTemporaryFile(suffix=".xml") as tf: + write_aas_xml_file(tf, self._modified_example()) + tf.flush() + output = self._call_main(['e', tf.name, '--xml']) + self.assertIn('FAILED:', output) + + def test_xml_files_equivalence_success(self) -> None: + with tempfile.NamedTemporaryFile(suffix=".xml") as tf1, \ + tempfile.NamedTemporaryFile(suffix=".xml") as tf2: + self._call_main(['c', tf1.name, '--xml']) + self._call_main(['c', tf2.name, '--xml']) + output = self._call_main(['f', tf1.name, tf2.name, '--xml']) + self.assertNotIn('FAILED:', output) + + def test_xml_files_equivalence_fail(self) -> None: + with tempfile.NamedTemporaryFile(suffix=".xml") as tf1, \ + tempfile.NamedTemporaryFile(suffix=".xml") as tf2: + self._call_main(['c', tf1.name, '--xml']) + write_aas_xml_file(tf2, self._modified_example()) + tf2.flush() + output = self._call_main(['f', tf1.name, tf2.name, '--xml']) + self.assertIn('FAILED:', output) + + # --- AASX --- + + def test_aasx_example_success(self) -> None: + with tempfile.NamedTemporaryFile(suffix=".aasx") as tf: + self._call_main(['c', tf.name, '--xml', '--aasx']) + output = self._call_main(['e', tf.name, '--xml', '--aasx']) + self.assertNotIn('FAILED:', output) + + def test_aasx_files_equivalence_success(self) -> None: + with tempfile.NamedTemporaryFile(suffix=".aasx") as tf1, \ + tempfile.NamedTemporaryFile(suffix=".aasx") as tf2: + self._call_main(['c', tf1.name, '--xml', '--aasx']) + self._call_main(['c', tf2.name, '--xml', '--aasx']) + output = self._call_main(['f', tf1.name, tf2.name, '--xml', '--aasx']) + self.assertNotIn('FAILED:', output) + + def test_aasx_files_equivalence_fail(self) -> None: + with tempfile.NamedTemporaryFile(suffix=".aasx") as tf1, \ + tempfile.NamedTemporaryFile(suffix=".aasx") as tf2: + self._call_main(['c', tf1.name, '--xml', '--aasx']) + + with aasx.AASXWriter(tf2.name) as writer: + writer.write_aas([], model.DictIdentifiableStore(), aasx.DictSupplementaryFileContainer()) + + output = self._call_main(['f', tf1.name, tf2.name, '--xml', '--aasx']) + + self.assertIn('FAILED:', output) From e13c72c018a76b04c6548fdf16a2c800eb135673 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Wed, 17 Jun 2026 14:05:45 +0200 Subject: [PATCH 13/14] complaince_tool: clean up The help output of the compliance tool is cleaned. Old fragments of the long ago removed schema-checking functionality were still in place. --- compliance_tool/aas_compliance_tool/cli.py | 11 +++++------ compliance_tool/aas_compliance_tool/state_manager.py | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/compliance_tool/aas_compliance_tool/cli.py b/compliance_tool/aas_compliance_tool/cli.py index 112c95b0..1c10bed9 100644 --- a/compliance_tool/aas_compliance_tool/cli.py +++ b/compliance_tool/aas_compliance_tool/cli.py @@ -37,12 +37,11 @@ def parse_cli_arguments() -> argparse.ArgumentParser: 'Asset Administration Shell" specification of Plattform Industrie 4.0. \n\n' 'This tool has five features: \n' '1. create a xml or json file or an AASX file using xml or json files with example aas elements\n' - '2. check if a given xml or json file is compliant with the official json or xml aas schema and ' - 'is deserializable\n' + '2. check if a given xml or json file is deserializable and therefore compliant with the schema\n' '3. check if the data in a given xml, json or aasx file is the same as the example data\n' '4. check if two given xml, json or aasx files contain the same aas elements in any order\n\n' - 'As a first argument, the feature must be specified (create, schema, deserialization, example, ' - 'files) or in short (c, s, d, e or f).\n' + 'As a first argument, the feature must be specified (create, deserialization, example, ' + 'files) or in short (c, d, e or f).\n' 'Depending the chosen feature, different additional arguments must be specified:\n' 'create or c: path to the file which shall be created (file_1)\n' 'deseriable or d: file to be checked (file_1)\n' @@ -50,7 +49,7 @@ def parse_cli_arguments() -> argparse.ArgumentParser: 'file_compare or f: files to compare (file_1, file_2)\n,' 'In any case, it must be specified whether the (given or created) files are json (--json) or ' 'xml (--xml).\n' - 'All features except "schema" support reading/writing AASX packages instead of plain XML or JSON ' + 'All features support reading/writing AASX packages instead of plain XML or JSON ' 'files via the --aasx option.\n\n' 'Additionally, the tool offers some extra features for more convenient usage:\n\n' 'a. Different levels of verbosity:\n' @@ -63,7 +62,7 @@ def parse_cli_arguments() -> argparse.ArgumentParser: ' With -l or --logfile, a path to the file where the logfiles shall be created can be specified.', formatter_class=argparse.RawTextHelpFormatter) - parser.add_argument('action', choices=['create', 'c', 'schema', 's', 'deserialization', 'd', 'example', 'e', + parser.add_argument('action', choices=['create', 'c', 'deserialization', 'd', 'example', 'e', 'files', 'f'], help='c or create: creates a file with example data\n' 'd or deserialization: checks if a given file is compliance with the official schema and ' diff --git a/compliance_tool/aas_compliance_tool/state_manager.py b/compliance_tool/aas_compliance_tool/state_manager.py index 33153038..235260d3 100644 --- a/compliance_tool/aas_compliance_tool/state_manager.py +++ b/compliance_tool/aas_compliance_tool/state_manager.py @@ -26,7 +26,7 @@ class Status(enum.IntEnum): :cvar NOT_EXECUTED: """ SUCCESS = 0 - SUCCESS_WITH_WARNINGS = 1 + SUCCESS_WITH_WARNINGS = 1 # never used FAILED = 2 NOT_EXECUTED = 3 From 60353bd9c270a668d7e41892a50d6014ad5df6d8 Mon Sep 17 00:00:00 2001 From: hpoeche Date: Wed, 17 Jun 2026 14:12:05 +0200 Subject: [PATCH 14/14] fix copyright year info --- compliance_tool/aas_compliance_tool/state_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compliance_tool/aas_compliance_tool/state_manager.py b/compliance_tool/aas_compliance_tool/state_manager.py index 235260d3..1efe5199 100644 --- a/compliance_tool/aas_compliance_tool/state_manager.py +++ b/compliance_tool/aas_compliance_tool/state_manager.py @@ -1,4 +1,4 @@ -# Copyright (c) 2025 the Eclipse BaSyx Authors +# Copyright (c) 2026 the Eclipse BaSyx Authors # # This program and the accompanying materials are made available under the terms of the MIT License, available in # the LICENSE file of this project.