1- # Copyright (c) 2025 the Eclipse BaSyx Authors
1+ # Copyright (c) 2026 the Eclipse BaSyx Authors
22#
33# This program and the accompanying materials are made available under the terms of the MIT License, available in
44# the LICENSE file of this project.
3131
3232def check_deserialization (file_path : str , state_manager : ComplianceToolStateManager ,
3333 file_info : Optional [str ] = None ) \
34- -> Tuple [model .DictObjectStore , aasx .DictSupplementaryFileContainer , pyecma376_2 .OPCCoreProperties ]:
34+ -> Tuple [model .DictIdentifiableStore , aasx .DictSupplementaryFileContainer , pyecma376_2 .OPCCoreProperties ]:
3535 """
3636 Read a AASX file and reports any issues using the given
3737 :class:`~basyx.aas.compliance_tool.state_manager.ComplianceToolStateManager`
@@ -68,24 +68,24 @@ def check_deserialization(file_path: str, state_manager: ComplianceToolStateMana
6868 state_manager .set_step_status_from_log ()
6969 state_manager .add_step ('Read file' )
7070 state_manager .set_step_status (Status .NOT_EXECUTED )
71- return model .DictObjectStore (), aasx .DictSupplementaryFileContainer (), pyecma376_2 .OPCCoreProperties ()
71+ return model .DictIdentifiableStore (), aasx .DictSupplementaryFileContainer (), pyecma376_2 .OPCCoreProperties ()
7272
7373 try :
7474 # read given file
7575 state_manager .add_step ('Read file' )
76- obj_store : model .DictObjectStore [model .Identifiable ] = model .DictObjectStore ()
76+ identifiable_store : model .DictIdentifiableStore [model .Identifiable ] = model .DictIdentifiableStore ()
7777 files = aasx .DictSupplementaryFileContainer ()
78- reader .read_into (obj_store , files )
78+ reader .read_into (identifiable_store , files )
7979 new_cp = reader .get_core_properties ()
8080 state_manager .set_step_status (Status .SUCCESS )
8181 except (ValueError , KeyError ) as error :
8282 logger .error (error )
8383 state_manager .set_step_status (Status .FAILED )
84- return model .DictObjectStore (), aasx .DictSupplementaryFileContainer (), pyecma376_2 .OPCCoreProperties ()
84+ return model .DictIdentifiableStore (), aasx .DictSupplementaryFileContainer (), pyecma376_2 .OPCCoreProperties ()
8585 finally :
8686 reader .close ()
8787
88- return obj_store , files , new_cp
88+ return identifiable_store , files , new_cp
8989
9090
9191def check_schema (file_path : str , state_manager : ComplianceToolStateManager ) -> None :
@@ -174,7 +174,7 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager,
174174 logger_example .propagate = False
175175 logger_example .setLevel (logging .INFO )
176176
177- obj_store , files , cp_new = check_deserialization (file_path , state_manager )
177+ identifiable_store , files , cp_new = check_deserialization (file_path , state_manager )
178178
179179 if state_manager .status in (Status .FAILED , Status .NOT_EXECUTED ):
180180 state_manager .add_step ('Check if data is equal to example data' )
@@ -187,7 +187,7 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager,
187187
188188 state_manager .add_step ('Check if data is equal to example data' )
189189 example_data = create_example_aas_binding ()
190- checker .check_object_store ( obj_store , example_data )
190+ checker .check_identifiable_store ( identifiable_store , example_data )
191191 state_manager .add_log_records_from_data_checker (checker )
192192
193193 if state_manager .status in (Status .FAILED , Status .NOT_EXECUTED ):
@@ -238,22 +238,25 @@ def check_aas_example(file_path: str, state_manager: ComplianceToolStateManager,
238238
239239 # Check if file in file object is the same
240240 list_of_id_shorts = ["ExampleSubmodelCollection" , "ExampleFile" ]
241- obj = example_data .get_identifiable ("https://acplt.org/Test_Submodel" )
241+ identifiable = example_data .get_item ("https://acplt.org/Test_Submodel" )
242242 for id_short in list_of_id_shorts :
243- obj = obj .get_referable (id_short )
244- obj2 = obj_store . get_identifiable ("https://acplt.org/Test_Submodel" )
243+ identifiable = identifiable .get_referable (id_short )
244+ obj2 = identifiable_store . get_item ("https://acplt.org/Test_Submodel" )
245245 for id_short in list_of_id_shorts :
246246 obj2 = obj2 .get_referable (id_short )
247247 try :
248- sha_file = files .get_sha256 (obj .value )
248+ sha_file = files .get_sha256 (identifiable .value )
249249 except KeyError as error :
250250 state_manager .add_log_records_from_data_checker (checker2 )
251251 logger .error (error )
252252 state_manager .set_step_status (Status .FAILED )
253253 return
254254
255- checker2 .check (sha_file == files .get_sha256 (obj2 .value ), "File of {} must be {}." .format (obj .value , obj2 .value ),
256- value = obj2 .value )
255+ checker2 .check (
256+ sha_file == files .get_sha256 (obj2 .value ),
257+ "File of {} must be {}." .format (identifiable .value , obj2 .value ),
258+ value = obj2 .value
259+ )
257260 state_manager .add_log_records_from_data_checker (checker2 )
258261 if state_manager .status in (Status .FAILED , Status .NOT_EXECUTED ):
259262 state_manager .set_step_status (Status .FAILED )
@@ -280,9 +283,9 @@ def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manag
280283 logger .propagate = False
281284 logger .setLevel (logging .INFO )
282285
283- obj_store_1 , files_1 , cp_1 = check_deserialization (file_path_1 , state_manager , 'first' )
286+ identifiable_store_1 , files_1 , cp_1 = check_deserialization (file_path_1 , state_manager , 'first' )
284287
285- obj_store_2 , files_2 , cp_2 = check_deserialization (file_path_2 , state_manager , 'second' )
288+ identifiable_store_2 , files_2 , cp_2 = check_deserialization (file_path_2 , state_manager , 'second' )
286289
287290 if state_manager .status is Status .FAILED :
288291 state_manager .add_step ('Check if data in files are equal' )
@@ -294,7 +297,7 @@ def check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manag
294297 checker = AASDataChecker (raise_immediately = False , ** kwargs )
295298 try :
296299 state_manager .add_step ('Check if data in files are equal' )
297- checker .check_object_store ( obj_store_1 , obj_store_2 )
300+ checker .check_identifiable_store ( identifiable_store_1 , identifiable_store_2 )
298301 except (KeyError , AssertionError ) as error :
299302 state_manager .set_step_status (Status .FAILED )
300303 logger .error (error )
0 commit comments