From d4a2c6e1d960435b254e5673e88257100ce90177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20M=C3=B6ller?= Date: Fri, 3 Nov 2023 17:18:53 +0100 Subject: [PATCH] make `OperationVariable` a `Namespace` This commit makes `OperationVariable` inherit from `UniqueIdShortNamespace`, to implement Constraint AASd-134: For an Operation, the idShort of all inputVariable/value, outputVariable/value, and inoutputVariable/value shall be unique. In the DotAAS spec, the attributes `inputVariable`, `outputVariable` and `inoutputVariable` of `Operation` are defined to be a collection of `OperationVariable` instances, which themselves just contain a single `SubmodelElement`. Thus, the `OperationVariable` isn't really required for `Operation`, as the `Operation` can just contain the `SubmodelElements` directly, without an unnecessary wrapper. This makes `Operation` less tedious to use and also allows us to use normal `NamespaceSets` for the 3 attributes, which together with the `UniqueIdShortNamespace` ensure, that the `idShort` of all contained `SubmodelElements` is unique across all 3 attributes. Aside this, the examples are updated since `SubmodelElements` as children of an `Operation` are now linked to the parent. This prevents us from reusing other `SubmodelElements` as `OperationVariables` as it was done previously, since each `SubmodelElement` can only have one parent. Fix #146 #148 --- .../aas/adapter/json/json_deserialization.py | 12 ++-- basyx/aas/adapter/json/json_serialization.py | 27 ++++---- basyx/aas/adapter/xml/xml_deserialization.py | 53 +++++++--------- basyx/aas/adapter/xml/xml_serialization.py | 47 +++++++------- basyx/aas/examples/data/_helper.py | 30 +++------ basyx/aas/examples/data/example_aas.py | 57 +++++++++++++---- .../data/example_aas_missing_attributes.py | 63 ++++++++++++++++--- .../data/example_submodel_template.py | 48 +++++++++++--- basyx/aas/model/submodel.py | 42 ++++++------- .../files/test_demo_full_example.json | 36 +++++------ .../files/test_demo_full_example.xml | 36 +++++------ .../aasx/data.json | 36 +++++------ ...est_demo_full_example_wrong_attribute.json | 42 +++++++------ ...test_demo_full_example_wrong_attribute.xml | 36 +++++------ .../aasx/data.xml | 36 +++++------ .../aasx/data.xml | 36 +++++------ 16 files changed, 355 insertions(+), 282 deletions(-) diff --git a/basyx/aas/adapter/json/json_deserialization.py b/basyx/aas/adapter/json/json_deserialization.py index 636531564..95ecd23b3 100644 --- a/basyx/aas/adapter/json/json_deserialization.py +++ b/basyx/aas/adapter/json/json_deserialization.py @@ -364,12 +364,14 @@ def _construct_administrative_information( return ret @classmethod - def _construct_operation_variable( - cls, dct: Dict[str, object], object_class=model.OperationVariable) -> model.OperationVariable: + def _construct_operation_variable(cls, dct: Dict[str, object]) -> model.SubmodelElement: + """ + Since we don't implement `OperationVariable`, this constructor discards the wrapping `OperationVariable` object + and just returns the contained :class:`~aas.model.submodel.SubmodelElement`. + """ # TODO: remove the following type: ignore comments when mypy supports abstract types for Type[T] # see https://github.com/python/mypy/issues/5374 - ret = object_class(value=_get_ts(dct, 'value', model.SubmodelElement)) # type: ignore - return ret + return _get_ts(dct, 'value', model.SubmodelElement) # type: ignore @classmethod def _construct_lang_string_set(cls, lst: List[Dict[str, object]], object_class: Type[LSS]) -> LSS: @@ -590,7 +592,7 @@ def _construct_operation(cls, dct: Dict[str, object], object_class=model.Operati if json_name in dct: for variable_data in _get_ts(dct, json_name, list): try: - target.append(cls._construct_operation_variable(variable_data)) + target.add(cls._construct_operation_variable(variable_data)) except (KeyError, TypeError) as e: error_message = "Error while trying to convert JSON object into {} of {}: {}".format( json_name, ret, pprint.pformat(variable_data, depth=2, width=2 ** 14, compact=True)) diff --git a/basyx/aas/adapter/json/json_serialization.py b/basyx/aas/adapter/json/json_serialization.py index c2f6e11cd..c861e8f1c 100644 --- a/basyx/aas/adapter/json/json_serialization.py +++ b/basyx/aas/adapter/json/json_serialization.py @@ -28,7 +28,7 @@ """ import base64 import inspect -from typing import List, Dict, IO, Optional, Type, Callable +from typing import List, Dict, IO, Iterable, Optional, Type, Callable import json from basyx.aas import model @@ -79,7 +79,6 @@ def default(self, obj: object) -> object: model.LangStringSet: self._lang_string_set_to_json, model.MultiLanguageProperty: self._multi_language_property_to_json, model.Operation: self._operation_to_json, - model.OperationVariable: self._operation_variable_to_json, model.Property: self._property_to_json, model.Qualifier: self._qualifier_to_json, model.Range: self._range_to_json, @@ -576,16 +575,17 @@ def _annotated_relationship_element_to_json(cls, obj: model.AnnotatedRelationshi return data @classmethod - def _operation_variable_to_json(cls, obj: model.OperationVariable) -> Dict[str, object]: + def _operation_variables_to_json(cls, obj: Iterable[model.SubmodelElement]) -> List[Dict[str, object]]: """ serialization of an object from class OperationVariable to json + Since we don't implement the `OperationVariable` class, which is just a wrapper for a single + :class:`~aas.model.submodel.SubmodelElement`, elements are serialized as the `value` attribute of an + `operationVariable` object. - :param obj: object of class OperationVariable - :return: dict with the serialized attributes of this object + :param obj: object of class `SubmodelElement` + :return: list of `OperationVariable` wrappers containing the serialized `SubmodelElement` """ - data = cls._abstract_classes_to_json(obj) - data['value'] = obj.value - return data + return [{'value': se} for se in obj] @classmethod def _operation_to_json(cls, obj: model.Operation) -> Dict[str, object]: @@ -596,12 +596,11 @@ def _operation_to_json(cls, obj: model.Operation) -> Dict[str, object]: :return: dict with the serialized attributes of this object """ data = cls._abstract_classes_to_json(obj) - if obj.input_variable: - data['inputVariables'] = list(obj.input_variable) - if obj.output_variable: - data['outputVariables'] = list(obj.output_variable) - if obj.in_output_variable: - data['inoutputVariables'] = list(obj.in_output_variable) + for tag, nss in (('inputVariables', obj.input_variable), + ('outputVariables', obj.output_variable), + ('inoutputVariables', obj.in_output_variable)): + if nss: + data[tag] = cls._operation_variables_to_json(nss) return data @classmethod diff --git a/basyx/aas/adapter/xml/xml_deserialization.py b/basyx/aas/adapter/xml/xml_deserialization.py index fdf346af5..aaadf309e 100644 --- a/basyx/aas/adapter/xml/xml_deserialization.py +++ b/basyx/aas/adapter/xml/xml_deserialization.py @@ -533,6 +533,20 @@ def _construct_referable_reference(cls, element: etree.Element, **kwargs: Any) \ # see https://github.com/python/mypy/issues/5374 return cls.construct_model_reference_expect_type(element, model.Referable, **kwargs) # type: ignore + @classmethod + def _construct_operation_variable(cls, element: etree.Element, **kwargs: Any) -> model.SubmodelElement: + """ + Since we don't implement `OperationVariable`, this constructor discards the wrapping `aas:operationVariable` + and `aas:value` and just returns the contained :class:`~aas.model.submodel.SubmodelElement`. + """ + value = _get_child_mandatory(element, NS_AAS + "value") + if len(value) == 0: + raise KeyError(f"{_element_pretty_identifier(value)} has no submodel element!") + if len(value) > 1: + logger.warning(f"{_element_pretty_identifier(value)} has more than one submodel element, " + "using the first one...") + return cls.construct_submodel_element(value[0], **kwargs) + @classmethod def construct_key(cls, element: etree.Element, object_class=model.Key, **_kwargs: Any) \ -> model.Key: @@ -722,19 +736,6 @@ def construct_data_element(cls, element: etree.Element, abstract_class_name: str raise KeyError(_element_pretty_identifier(element) + f" is not a valid {abstract_class_name}!") return data_elements[element.tag](element, **kwargs) - @classmethod - def construct_operation_variable(cls, element: etree.Element, object_class=model.OperationVariable, - **_kwargs: Any) -> model.OperationVariable: - value = _get_child_mandatory(element, NS_AAS + "value") - if len(value) == 0: - raise KeyError(f"{_element_pretty_identifier(value)} has no submodel element!") - if len(value) > 1: - logger.warning(f"{_element_pretty_identifier(value)} has more than one submodel element, " - "using the first one...") - return object_class( - _failsafe_construct_mandatory(value[0], cls.construct_submodel_element) - ) - @classmethod def construct_annotated_relationship_element(cls, element: etree.Element, object_class=model.AnnotatedRelationshipElement, **_kwargs: Any) \ @@ -856,21 +857,14 @@ def construct_multi_language_property(cls, element: etree.Element, object_class= def construct_operation(cls, element: etree.Element, object_class=model.Operation, **_kwargs: Any) \ -> model.Operation: operation = object_class(None) - input_variables = element.find(NS_AAS + "inputVariables") - if input_variables is not None: - for input_variable in _child_construct_multiple(input_variables, NS_AAS + "operationVariable", - cls.construct_operation_variable, cls.failsafe): - operation.input_variable.append(input_variable) - output_variables = element.find(NS_AAS + "outputVariables") - if output_variables is not None: - for output_variable in _child_construct_multiple(output_variables, NS_AAS + "operationVariable", - cls.construct_operation_variable, cls.failsafe): - operation.output_variable.append(output_variable) - in_output_variables = element.find(NS_AAS + "inoutputVariables") - if in_output_variables is not None: - for in_output_variable in _child_construct_multiple(in_output_variables, NS_AAS + "operationVariable", - cls.construct_operation_variable, cls.failsafe): - operation.in_output_variable.append(in_output_variable) + for tag, target in ((NS_AAS + "inputVariables", operation.input_variable), + (NS_AAS + "outputVariables", operation.output_variable), + (NS_AAS + "inoutputVariables", operation.in_output_variable)): + variables = element.find(tag) + if variables is not None: + for var in _child_construct_multiple(variables, NS_AAS + "operationVariable", + cls._construct_operation_variable, cls.failsafe): + target.add(var) cls._amend_abstract_attributes(operation, element) return operation @@ -1236,7 +1230,6 @@ class XMLConstructables(enum.Enum): ADMINISTRATIVE_INFORMATION = enum.auto() QUALIFIER = enum.auto() SECURITY = enum.auto() - OPERATION_VARIABLE = enum.auto() ANNOTATED_RELATIONSHIP_ELEMENT = enum.auto() BASIC_EVENT_ELEMENT = enum.auto() BLOB = enum.auto() @@ -1306,8 +1299,6 @@ def read_aas_xml_element(file: IO, construct: XMLConstructables, failsafe: bool constructor = decoder_.construct_administrative_information elif construct == XMLConstructables.QUALIFIER: constructor = decoder_.construct_qualifier - elif construct == XMLConstructables.OPERATION_VARIABLE: - constructor = decoder_.construct_operation_variable elif construct == XMLConstructables.ANNOTATED_RELATIONSHIP_ELEMENT: constructor = decoder_.construct_annotated_relationship_element elif construct == XMLConstructables.BASIC_EVENT_ELEMENT: diff --git a/basyx/aas/adapter/xml/xml_serialization.py b/basyx/aas/adapter/xml/xml_serialization.py index 55446dac9..c0bf4e7dd 100644 --- a/basyx/aas/adapter/xml/xml_serialization.py +++ b/basyx/aas/adapter/xml/xml_serialization.py @@ -19,7 +19,7 @@ """ from lxml import etree # type: ignore -from typing import Dict, IO, Optional, Type +from typing import Dict, IO, Iterable, Optional, Type import base64 from basyx.aas import model @@ -726,20 +726,25 @@ def annotated_relationship_element_to_xml(obj: model.AnnotatedRelationshipElemen return et_annotated_relationship_element -def operation_variable_to_xml(obj: model.OperationVariable, - tag: str = NS_AAS+"operationVariable") -> etree.Element: +def operation_variables_to_xml(obj: Iterable[model.SubmodelElement], tag: str) -> etree.Element: """ - Serialization of objects of class :class:`~aas.model.submodel.OperationVariable` to XML + Serialization of multiple :class:`~aas.model.submodel.SubmodelElement` objects to OperationVariables + Since we don't implement the `OperationVariable` class, which is just a wrapper for a single + :class:`~aas.model.submodel.SubmodelElement`, elements are serialized as the `aas:value` child of an + `aas:operationVariable` element. - :param obj: Object of class :class:`~aas.model.submodel.OperationVariable` - :param tag: Namespace+Tag of the serialized element (optional). Default is "aas:operationVariable" + :param obj: Object of class :class:`~aas.model.submodel.SubmodelElement` + :param tag: Namespace+Tag of the serialized element. Either `inputVariable`, `outputVariable` or `inoutputVariable`. :return: Serialized ElementTree object """ - et_operation_variable = _generate_element(tag) - et_value = _generate_element(NS_AAS+"value") - et_value.append(submodel_element_to_xml(obj.value)) - et_operation_variable.append(et_value) - return et_operation_variable + et_variables = _generate_element(tag) + for se in obj: + et_operation_variable = _generate_element(NS_AAS+"operationVariable") + et_value = _generate_element(NS_AAS+"value") + et_value.append(submodel_element_to_xml(se)) + et_operation_variable.append(et_value) + et_variables.append(et_operation_variable) + return et_variables def operation_to_xml(obj: model.Operation, @@ -752,21 +757,11 @@ def operation_to_xml(obj: model.Operation, :return: Serialized ElementTree object """ et_operation = abstract_classes_to_xml(tag, obj) - if obj.input_variable: - et_input_variables = _generate_element(NS_AAS+"inputVariables") - for input_ov in obj.input_variable: - et_input_variables.append(operation_variable_to_xml(input_ov, NS_AAS+"operationVariable")) - et_operation.append(et_input_variables) - if obj.output_variable: - et_output_variables = _generate_element(NS_AAS+"outputVariables") - for output_ov in obj.output_variable: - et_output_variables.append(operation_variable_to_xml(output_ov, NS_AAS+"operationVariable")) - et_operation.append(et_output_variables) - if obj.in_output_variable: - et_inoutput_variables = _generate_element(NS_AAS+"inoutputVariables") - for in_out_ov in obj.in_output_variable: - et_inoutput_variables.append(operation_variable_to_xml(in_out_ov, NS_AAS+"operationVariable")) - et_operation.append(et_inoutput_variables) + for tag, nss in ((NS_AAS+"inputVariables", obj.input_variable), + (NS_AAS+"outputVariables", obj.output_variable), + (NS_AAS+"inoutputVariables", obj.in_output_variable)): + if nss: + et_operation.append(operation_variables_to_xml(nss, tag)) return et_operation diff --git a/basyx/aas/examples/data/_helper.py b/basyx/aas/examples/data/_helper.py index 9bf53e8aa..01fe59a42 100644 --- a/basyx/aas/examples/data/_helper.py +++ b/basyx/aas/examples/data/_helper.py @@ -550,17 +550,6 @@ def _find_extra_elements_by_id_short(self, object_list: model.NamespaceSet, sear found_elements.add(object_list_element) return found_elements - def _check_operation_variable_equal(self, object_: model.OperationVariable, - expected_value: model.OperationVariable): - """ - Checks if the given OperationVariable objects are equal - - :param object_: Given OperationVariable object to check - :param expected_value: expected OperationVariable object - :return: - """ - self._check_submodel_element(object_.value, expected_value.value) - def check_operation_equal(self, object_: model.Operation, expected_value: model.Operation): """ Checks if the given Operation objects are equal @@ -570,18 +559,13 @@ def check_operation_equal(self, object_: model.Operation, expected_value: model. :return: """ self._check_abstract_attributes_submodel_element_equal(object_, expected_value) - self.check_contained_element_length(object_, 'input_variable', model.OperationVariable, - len(expected_value.input_variable)) - self.check_contained_element_length(object_, 'output_variable', model.OperationVariable, - len(expected_value.output_variable)) - self.check_contained_element_length(object_, 'in_output_variable', model.OperationVariable, - len(expected_value.in_output_variable)) - for iv1, iv2 in zip(object_.input_variable, expected_value.input_variable): - self._check_operation_variable_equal(iv1, iv2) - for ov1, ov2 in zip(object_.output_variable, expected_value.output_variable): - self._check_operation_variable_equal(ov1, ov2) - for iov1, iov2 in zip(object_.in_output_variable, expected_value.in_output_variable): - self._check_operation_variable_equal(iov1, iov2) + for input_nss, expected_nss, attr_name in ( + (object_.input_variable, expected_value.input_variable, 'input_variable'), + (object_.output_variable, expected_value.output_variable, 'output_variable'), + (object_.in_output_variable, expected_value.in_output_variable, 'in_output_variable')): + self.check_contained_element_length(object_, attr_name, model.SubmodelElement, len(expected_nss)) + for var1, var2 in zip(input_nss, expected_nss): + self._check_submodel_element(var1, var2) def check_capability_equal(self, object_: model.Capability, expected_value: model.Capability): """ diff --git a/basyx/aas/examples/data/example_aas.py b/basyx/aas/examples/data/example_aas.py index 7b0a98541..a7f52b171 100644 --- a/basyx/aas/examples/data/example_aas.py +++ b/basyx/aas/examples/data/example_aas.py @@ -557,8 +557,8 @@ def create_example_submodel() -> model.Submodel: embedded_data_specifications=() ) - operation_variable_property = model.Property( - id_short='ExampleProperty', + input_variable_property = model.Property( + id_short='ExamplePropertyInput', value_type=model.datatypes.String, value='exampleValue', value_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, @@ -570,27 +570,58 @@ def create_example_submodel() -> model.Submodel: 'de': 'Beispiel Property Element'}), parent=None, semantic_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, - value='http://acplt.org/Properties/ExampleProperty'),)), + value='http://acplt.org/Properties/ExamplePropertyInput'),)), qualifier=(), extension=(), supplemental_semantic_id=(), embedded_data_specifications=() ) - submodel_element_operation_variable_input = model.OperationVariable( - value=operation_variable_property) - - submodel_element_operation_variable_output = model.OperationVariable( - value=operation_variable_property) + output_variable_property = model.Property( + id_short='ExamplePropertyOutput', + value_type=model.datatypes.String, + value='exampleValue', + value_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/ValueId/ExampleValueId'),)), + display_name=model.MultiLanguageNameType({'en-US': 'ExampleProperty', + 'de': 'BeispielProperty'}), + category='CONSTANT', + description=model.MultiLanguageTextType({'en-US': 'Example Property object', + 'de': 'Beispiel Property Element'}), + parent=None, + semantic_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/Properties/ExamplePropertyOutput'),)), + qualifier=(), + extension=(), + supplemental_semantic_id=(), + embedded_data_specifications=() + ) - submodel_element_operation_variable_in_output = model.OperationVariable( - value=operation_variable_property) + in_output_variable_property = model.Property( + id_short='ExamplePropertyInOutput', + value_type=model.datatypes.String, + value='exampleValue', + value_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/ValueId/ExampleValueId'),)), + display_name=model.MultiLanguageNameType({'en-US': 'ExampleProperty', + 'de': 'BeispielProperty'}), + category='CONSTANT', + description=model.MultiLanguageTextType({'en-US': 'Example Property object', + 'de': 'Beispiel Property Element'}), + parent=None, + semantic_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/Properties/ExamplePropertyInOutput'),)), + qualifier=(), + extension=(), + supplemental_semantic_id=(), + embedded_data_specifications=() + ) submodel_element_operation = model.Operation( id_short='ExampleOperation', - input_variable=[submodel_element_operation_variable_input], - output_variable=[submodel_element_operation_variable_output], - in_output_variable=[submodel_element_operation_variable_in_output], + input_variable=[input_variable_property], + output_variable=[output_variable_property], + in_output_variable=[in_output_variable_property], category='PARAMETER', description=model.MultiLanguageTextType({'en-US': 'Example Operation object', 'de': 'Beispiel Operation Element'}), diff --git a/basyx/aas/examples/data/example_aas_missing_attributes.py b/basyx/aas/examples/data/example_aas_missing_attributes.py index d33bf7221..cb296c764 100644 --- a/basyx/aas/examples/data/example_aas_missing_attributes.py +++ b/basyx/aas/examples/data/example_aas_missing_attributes.py @@ -193,20 +193,65 @@ def create_example_submodel() -> model.Submodel: value='http://acplt.org/Properties/ExampleProperty'),)), qualifier=()) - submodel_element_operation_variable_input = model.OperationVariable( - value=operation_variable_property) + input_variable_property = model.Property( + id_short='ExamplePropertyInput', + value_type=model.datatypes.String, + value='exampleValue', + value_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/ValueId/ExampleValueId'),)), + display_name=model.MultiLanguageNameType({'en-US': 'ExampleProperty', + 'de': 'BeispielProperty'}), + category='CONSTANT', + description=model.MultiLanguageTextType({'en-US': 'Example Property object', + 'de': 'Beispiel Property Element'}), + parent=None, + semantic_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/Properties/ExamplePropertyInput'),)), + qualifier=()) - submodel_element_operation_variable_output = model.OperationVariable( - value=operation_variable_property) + output_variable_property = model.Property( + id_short='ExamplePropertyOutput', + value_type=model.datatypes.String, + value='exampleValue', + value_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/ValueId/ExampleValueId'),)), + display_name=model.MultiLanguageNameType({'en-US': 'ExampleProperty', + 'de': 'BeispielProperty'}), + category='CONSTANT', + description=model.MultiLanguageTextType({'en-US': 'Example Property object', + 'de': 'Beispiel Property Element'}), + parent=None, + semantic_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/Properties/ExamplePropertyOutput'),)), + qualifier=(), + extension=(), + supplemental_semantic_id=(), + embedded_data_specifications=()) - submodel_element_operation_variable_in_output = model.OperationVariable( - value=operation_variable_property) + in_output_variable_property = model.Property( + id_short='ExamplePropertyInOutput', + value_type=model.datatypes.String, + value='exampleValue', + value_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/ValueId/ExampleValueId'),)), + display_name=model.MultiLanguageNameType({'en-US': 'ExampleProperty', + 'de': 'BeispielProperty'}), + category='CONSTANT', + description=model.MultiLanguageTextType({'en-US': 'Example Property object', + 'de': 'Beispiel Property Element'}), + parent=None, + semantic_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/Properties/ExamplePropertyInOutput'),)), + qualifier=(), + extension=(), + supplemental_semantic_id=(), + embedded_data_specifications=()) submodel_element_operation = model.Operation( id_short='ExampleOperation', - input_variable=[submodel_element_operation_variable_input], - output_variable=[submodel_element_operation_variable_output], - in_output_variable=[submodel_element_operation_variable_in_output], + input_variable=[input_variable_property], + output_variable=[output_variable_property], + in_output_variable=[in_output_variable_property], category='PARAMETER', description=model.MultiLanguageTextType({'en-US': 'Example Operation object', 'de': 'Beispiel Operation Element'}), diff --git a/basyx/aas/examples/data/example_submodel_template.py b/basyx/aas/examples/data/example_submodel_template.py index aab28f35a..ad930f794 100644 --- a/basyx/aas/examples/data/example_submodel_template.py +++ b/basyx/aas/examples/data/example_submodel_template.py @@ -154,20 +154,50 @@ def create_example_submodel_template() -> model.Submodel: 'ExampleAnnotatedRelationshipElement'),)), qualifier=()) - submodel_element_operation_variable_input = model.OperationVariable( - value=submodel_element_property) + input_variable_property = model.Property( + id_short='ExamplePropertyInput', + value_type=model.datatypes.String, + value=None, + value_id=None, + category='CONSTANT', + description=model.MultiLanguageTextType({'en-US': 'Example Property object', + 'de': 'Beispiel Property Element'}), + parent=None, + semantic_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/Properties/ExamplePropertyInput'),)), + qualifier=()) - submodel_element_operation_variable_output = model.OperationVariable( - value=submodel_element_property) + output_variable_property = model.Property( + id_short='ExamplePropertyOutput', + value_type=model.datatypes.String, + value=None, + value_id=None, + category='CONSTANT', + description=model.MultiLanguageTextType({'en-US': 'Example Property object', + 'de': 'Beispiel Property Element'}), + parent=None, + semantic_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/Properties/ExamplePropertyOutput'),)), + qualifier=()) - submodel_element_operation_variable_in_output = model.OperationVariable( - value=submodel_element_property) + in_output_variable_property = model.Property( + id_short='ExamplePropertyInOutput', + value_type=model.datatypes.String, + value=None, + value_id=None, + category='CONSTANT', + description=model.MultiLanguageTextType({'en-US': 'Example Property object', + 'de': 'Beispiel Property Element'}), + parent=None, + semantic_id=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, + value='http://acplt.org/Properties/ExamplePropertyInOutput'),)), + qualifier=()) submodel_element_operation = model.Operation( id_short='ExampleOperation', - input_variable=[submodel_element_operation_variable_input], - output_variable=[submodel_element_operation_variable_output], - in_output_variable=[submodel_element_operation_variable_in_output], + input_variable=[input_variable_property], + output_variable=[output_variable_property], + in_output_variable=[in_output_variable_property], category='PARAMETER', description=model.MultiLanguageTextType({'en-US': 'Example Operation object', 'de': 'Beispiel Operation Element'}), diff --git a/basyx/aas/model/submodel.py b/basyx/aas/model/submodel.py index 7ca7d70f4..41edc6183 100644 --- a/basyx/aas/model/submodel.py +++ b/basyx/aas/model/submodel.py @@ -931,30 +931,24 @@ def __init__(self, self.annotation = base.NamespaceSet(self, [("id_short", True)], annotation) -class OperationVariable: +class Operation(SubmodelElement, base.UniqueIdShortNamespace): """ - An operation variable is part of an operation that is used to define an input or output variable of that operation. - - :ivar value: Describes the needed argument for an operation via a :class:`~.SubmodelElement` of `kind=TYPE`. - """ - - def __init__(self, - value: SubmodelElement): - """ - TODO: Add instruction what to do after construction - """ - self.value: SubmodelElement = value + An operation is a :class:`~.SubmodelElement` with input and output variables. + In- and output variables are implemented as :class:`SubmodelElements <.SubmodelElement>` directly without the + wrapping `OperationVariable`. This makes implementing *Constraint AASd-134* much easier since we can just use normal + :class:`NamespaceSets <~aas.model.base.NamespaceSet>`. Furthermore, an `OperationVariable` contains nothing besides + a single :class:`~.SubmodelElement` anyway, so implementing it would just make using `Operations` more tedious + for no reason. -class Operation(SubmodelElement): - """ - An operation is a :class:`~.SubmodelElement` with input and output variables. + *Constraint AASd-134:* For an Operation, the idShort of all inputVariable/value, outputVariable/value, + and inoutputVariable/value shall be unique. :ivar id_short: Identifying string of the element within its name space. (inherited from :class:`~aas.model.base.Referable`) - :ivar input_variable: List of input parameters (:class:`OperationVariables <.OperationVariable>`) of the operation - :ivar output_variable: List of output parameters (:class:`OperationVariables <.OperationVariable>`) of the operation - :ivar in_output_variable: List of parameters (:class:`OperationVariables <.OperationVariable>`) that are input and + :ivar input_variable: List of input parameters (:class:`SubmodelElements <.SubmodelElement>`) of the operation + :ivar output_variable: List of output parameters (:class:`SubmodelElements <.SubmodelElement>`) of the operation + :ivar in_output_variable: List of parameters (:class:`SubmodelElements <.SubmodelElement>`) that are input and output of the operation :ivar display_name: Can be provided in several languages. (inherited from :class:`~aas.model.base.Referable`) :ivar category: The category is a value that gives further meta information w.r.t. to the class of the element. @@ -978,9 +972,9 @@ class Operation(SubmodelElement): """ def __init__(self, id_short: Optional[base.NameType], - input_variable: Optional[List[OperationVariable]] = None, - output_variable: Optional[List[OperationVariable]] = None, - in_output_variable: Optional[List[OperationVariable]] = None, + input_variable: Iterable[SubmodelElement] = (), + output_variable: Iterable[SubmodelElement] = (), + in_output_variable: Iterable[SubmodelElement] = (), display_name: Optional[base.MultiLanguageNameType] = None, category: Optional[base.NameType] = None, description: Optional[base.MultiLanguageTextType] = None, @@ -996,9 +990,9 @@ def __init__(self, super().__init__(id_short, display_name, category, description, parent, semantic_id, qualifier, extension, supplemental_semantic_id, embedded_data_specifications) - self.input_variable = input_variable if input_variable is not None else [] - self.output_variable = output_variable if output_variable is not None else [] - self.in_output_variable = in_output_variable if in_output_variable is not None else [] + self.input_variable = base.NamespaceSet(self, [("id_short", True)], input_variable) + self.output_variable = base.NamespaceSet(self, [("id_short", True)], output_variable) + self.in_output_variable = base.NamespaceSet(self, [("id_short", True)], in_output_variable) class Capability(SubmodelElement): diff --git a/test/compliance_tool/files/test_demo_full_example.json b/test/compliance_tool/files/test_demo_full_example.json index 6dbe924ea..340055662 100644 --- a/test/compliance_tool/files/test_demo_full_example.json +++ b/test/compliance_tool/files/test_demo_full_example.json @@ -941,7 +941,7 @@ "inputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInput", "displayName": [ { "language": "en-US", @@ -969,7 +969,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInput" } ] }, @@ -991,7 +991,7 @@ "outputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyOutput", "displayName": [ { "language": "en-US", @@ -1019,7 +1019,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyOutput" } ] }, @@ -1041,7 +1041,7 @@ "inoutputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInOutput", "displayName": [ { "language": "en-US", @@ -1069,7 +1069,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInOutput" } ] }, @@ -1972,7 +1972,7 @@ "inputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInput", "displayName": [ { "language": "en-US", @@ -2000,7 +2000,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInput" } ] }, @@ -2022,7 +2022,7 @@ "outputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyOutput", "displayName": [ { "language": "en-US", @@ -2050,7 +2050,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyOutput" } ] }, @@ -2072,7 +2072,7 @@ "inoutputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInOutput", "displayName": [ { "language": "en-US", @@ -2100,7 +2100,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInOutput" } ] }, @@ -2564,7 +2564,7 @@ "inputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInput", "category": "CONSTANT", "description": [ { @@ -2582,7 +2582,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInput" } ] }, @@ -2595,7 +2595,7 @@ "outputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyOutput", "category": "CONSTANT", "description": [ { @@ -2613,7 +2613,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyOutput" } ] }, @@ -2626,7 +2626,7 @@ "inoutputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInOutput", "category": "CONSTANT", "description": [ { @@ -2644,7 +2644,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInOutput" } ] }, diff --git a/test/compliance_tool/files/test_demo_full_example.xml b/test/compliance_tool/files/test_demo_full_example.xml index 3c1c4eafa..9443df2c8 100644 --- a/test/compliance_tool/files/test_demo_full_example.xml +++ b/test/compliance_tool/files/test_demo_full_example.xml @@ -824,7 +824,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -851,7 +851,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -875,7 +875,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -902,7 +902,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -926,7 +926,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -953,7 +953,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput @@ -1845,7 +1845,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -1872,7 +1872,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -1896,7 +1896,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -1923,7 +1923,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -1947,7 +1947,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -1974,7 +1974,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput @@ -2436,7 +2436,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -2453,7 +2453,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -2467,7 +2467,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -2484,7 +2484,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -2498,7 +2498,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -2515,7 +2515,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput diff --git a/test/compliance_tool/files/test_demo_full_example_json_aasx/aasx/data.json b/test/compliance_tool/files/test_demo_full_example_json_aasx/aasx/data.json index d7669dd99..ee4678d7c 100644 --- a/test/compliance_tool/files/test_demo_full_example_json_aasx/aasx/data.json +++ b/test/compliance_tool/files/test_demo_full_example_json_aasx/aasx/data.json @@ -949,7 +949,7 @@ "inputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInput", "displayName": [ { "language": "en-US", @@ -977,7 +977,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInput" } ] }, @@ -999,7 +999,7 @@ "outputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyOutput", "displayName": [ { "language": "en-US", @@ -1027,7 +1027,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyOutput" } ] }, @@ -1049,7 +1049,7 @@ "inoutputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInOutput", "displayName": [ { "language": "en-US", @@ -1077,7 +1077,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInOutput" } ] }, @@ -1980,7 +1980,7 @@ "inputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInput", "displayName": [ { "language": "en-US", @@ -2008,7 +2008,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInput" } ] }, @@ -2030,7 +2030,7 @@ "outputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyOutput", "displayName": [ { "language": "en-US", @@ -2058,7 +2058,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyOutput" } ] }, @@ -2080,7 +2080,7 @@ "inoutputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInOutput", "displayName": [ { "language": "en-US", @@ -2108,7 +2108,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInOutput" } ] }, @@ -2572,7 +2572,7 @@ "inputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInput", "category": "CONSTANT", "description": [ { @@ -2590,7 +2590,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInput" } ] }, @@ -2603,7 +2603,7 @@ "outputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyOutput", "category": "CONSTANT", "description": [ { @@ -2621,7 +2621,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyOutput" } ] }, @@ -2634,7 +2634,7 @@ "inoutputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInOutput", "category": "CONSTANT", "description": [ { @@ -2652,7 +2652,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInOutput" } ] }, diff --git a/test/compliance_tool/files/test_demo_full_example_wrong_attribute.json b/test/compliance_tool/files/test_demo_full_example_wrong_attribute.json index d10beb9a8..1451e9105 100644 --- a/test/compliance_tool/files/test_demo_full_example_wrong_attribute.json +++ b/test/compliance_tool/files/test_demo_full_example_wrong_attribute.json @@ -679,7 +679,8 @@ "value": "http://acplt.org/ValueId/ExampleValueId" } ] - } + }, + "valueType": "xs:string" }, { "value": "exampleValue2", @@ -691,7 +692,8 @@ "value": "http://acplt.org/ValueId/ExampleValueId2" } ] - } + }, + "valueType": "xs:string" } ] }, @@ -939,7 +941,7 @@ "inputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInput", "displayName": [ { "language": "en-US", @@ -967,7 +969,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInput" } ] }, @@ -989,7 +991,7 @@ "outputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyOutput", "displayName": [ { "language": "en-US", @@ -1017,7 +1019,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyOutput" } ] }, @@ -1039,7 +1041,7 @@ "inoutputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInOutput", "displayName": [ { "language": "en-US", @@ -1067,7 +1069,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInOutput" } ] }, @@ -1970,7 +1972,7 @@ "inputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInput", "displayName": [ { "language": "en-US", @@ -1998,7 +2000,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInput" } ] }, @@ -2020,7 +2022,7 @@ "outputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyOutput", "displayName": [ { "language": "en-US", @@ -2048,7 +2050,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyOutput" } ] }, @@ -2070,7 +2072,7 @@ "inoutputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInOutput", "displayName": [ { "language": "en-US", @@ -2098,7 +2100,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInOutput" } ] }, @@ -2562,7 +2564,7 @@ "inputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInput", "category": "CONSTANT", "description": [ { @@ -2580,7 +2582,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInput" } ] }, @@ -2593,7 +2595,7 @@ "outputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyOutput", "category": "CONSTANT", "description": [ { @@ -2611,7 +2613,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyOutput" } ] }, @@ -2624,7 +2626,7 @@ "inoutputVariables": [ { "value": { - "idShort": "ExampleProperty", + "idShort": "ExamplePropertyInOutput", "category": "CONSTANT", "description": [ { @@ -2642,7 +2644,7 @@ "keys": [ { "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" + "value": "http://acplt.org/Properties/ExamplePropertyInOutput" } ] }, diff --git a/test/compliance_tool/files/test_demo_full_example_wrong_attribute.xml b/test/compliance_tool/files/test_demo_full_example_wrong_attribute.xml index 52d39d0a6..3c2568e5b 100644 --- a/test/compliance_tool/files/test_demo_full_example_wrong_attribute.xml +++ b/test/compliance_tool/files/test_demo_full_example_wrong_attribute.xml @@ -824,7 +824,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -851,7 +851,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -875,7 +875,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -902,7 +902,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -926,7 +926,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -953,7 +953,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput @@ -1845,7 +1845,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -1872,7 +1872,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -1896,7 +1896,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -1923,7 +1923,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -1947,7 +1947,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -1974,7 +1974,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput @@ -2436,7 +2436,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -2453,7 +2453,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -2467,7 +2467,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -2484,7 +2484,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -2498,7 +2498,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -2515,7 +2515,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput diff --git a/test/compliance_tool/files/test_demo_full_example_xml_aasx/aasx/data.xml b/test/compliance_tool/files/test_demo_full_example_xml_aasx/aasx/data.xml index 6922d53d3..4fdd31251 100644 --- a/test/compliance_tool/files/test_demo_full_example_xml_aasx/aasx/data.xml +++ b/test/compliance_tool/files/test_demo_full_example_xml_aasx/aasx/data.xml @@ -832,7 +832,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -859,7 +859,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -883,7 +883,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -910,7 +910,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -934,7 +934,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -961,7 +961,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput @@ -1853,7 +1853,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -1880,7 +1880,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -1904,7 +1904,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -1931,7 +1931,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -1955,7 +1955,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -1982,7 +1982,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput @@ -2444,7 +2444,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -2461,7 +2461,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -2475,7 +2475,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -2492,7 +2492,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -2506,7 +2506,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -2523,7 +2523,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput diff --git a/test/compliance_tool/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/data.xml b/test/compliance_tool/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/data.xml index 6fda1e2c5..946cd44df 100644 --- a/test/compliance_tool/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/data.xml +++ b/test/compliance_tool/files/test_demo_full_example_xml_wrong_attribute_aasx/aasx/data.xml @@ -832,7 +832,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -859,7 +859,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -883,7 +883,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -910,7 +910,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -934,7 +934,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -961,7 +961,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput @@ -1853,7 +1853,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -1880,7 +1880,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -1904,7 +1904,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -1931,7 +1931,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -1955,7 +1955,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -1982,7 +1982,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput @@ -2444,7 +2444,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInput en-US @@ -2461,7 +2461,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInput @@ -2475,7 +2475,7 @@ CONSTANT - ExampleProperty + ExamplePropertyOutput en-US @@ -2492,7 +2492,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyOutput @@ -2506,7 +2506,7 @@ CONSTANT - ExampleProperty + ExamplePropertyInOutput en-US @@ -2523,7 +2523,7 @@ GlobalReference - http://acplt.org/Properties/ExampleProperty + http://acplt.org/Properties/ExamplePropertyInOutput