diff --git a/basyx/aas/adapter/_generic.py b/basyx/aas/adapter/_generic.py
index 9ecdd2972..6bd07794f 100644
--- a/basyx/aas/adapter/_generic.py
+++ b/basyx/aas/adapter/_generic.py
@@ -16,9 +16,9 @@
XML_NS_MAP = {"aas": "https://admin-shell.io/aas/3/0"}
XML_NS_AAS = "{" + XML_NS_MAP["aas"] + "}"
-MODELING_KIND: Dict[model.ModelingKind, str] = {
- model.ModelingKind.TEMPLATE: 'Template',
- model.ModelingKind.INSTANCE: 'Instance'}
+MODELLING_KIND: Dict[model.ModellingKind, str] = {
+ model.ModellingKind.TEMPLATE: 'Template',
+ model.ModellingKind.INSTANCE: 'Instance'}
ASSET_KIND: Dict[model.AssetKind, str] = {
model.AssetKind.TYPE: 'Type',
@@ -92,7 +92,7 @@
model.base.IEC61360LevelType.MAX: 'max',
}
-MODELING_KIND_INVERSE: Dict[str, model.ModelingKind] = {v: k for k, v in MODELING_KIND.items()}
+MODELLING_KIND_INVERSE: Dict[str, model.ModellingKind] = {v: k for k, v in MODELLING_KIND.items()}
ASSET_KIND_INVERSE: Dict[str, model.AssetKind] = {v: k for k, v in ASSET_KIND.items()}
QUALIFIER_KIND_INVERSE: Dict[str, model.QualifierKind] = {v: k for k, v in QUALIFIER_KIND.items()}
DIRECTION_INVERSE: Dict[str, model.Direction] = {v: k for k, v in DIRECTION.items()}
diff --git a/basyx/aas/adapter/json/aasJSONSchema.json b/basyx/aas/adapter/json/aasJSONSchema.json
index 3355cb33d..697dc0620 100644
--- a/basyx/aas/adapter/json/aasJSONSchema.json
+++ b/basyx/aas/adapter/json/aasJSONSchema.json
@@ -663,7 +663,7 @@
"type": "object",
"properties": {
"kind": {
- "$ref": "#/definitions/ModelingKind"
+ "$ref": "#/definitions/ModellingKind"
}
}
},
@@ -811,7 +811,7 @@
"SubmodelElementList"
]
},
- "ModelingKind": {
+ "ModellingKind": {
"type": "string",
"enum": [
"Instance",
diff --git a/basyx/aas/adapter/json/json_deserialization.py b/basyx/aas/adapter/json/json_deserialization.py
index 38c4401b0..ee36df87e 100644
--- a/basyx/aas/adapter/json/json_deserialization.py
+++ b/basyx/aas/adapter/json/json_deserialization.py
@@ -36,7 +36,7 @@
from typing import Dict, Callable, TypeVar, Type, List, IO, Optional, Set
from basyx.aas import model
-from .._generic import MODELING_KIND_INVERSE, ASSET_KIND_INVERSE, KEY_TYPES_INVERSE, ENTITY_TYPES_INVERSE, \
+from .._generic import MODELLING_KIND_INVERSE, ASSET_KIND_INVERSE, KEY_TYPES_INVERSE, ENTITY_TYPES_INVERSE, \
IEC61360_DATA_TYPES_INVERSE, IEC61360_LEVEL_TYPES_INVERSE, KEY_TYPES_CLASSES_INVERSE, REFERENCE_TYPES_INVERSE, \
DIRECTION_INVERSE, STATE_OF_EVENT_INVERSE, QUALIFIER_KIND_INVERSE
@@ -275,14 +275,14 @@ def _amend_abstract_attributes(cls, obj: object, dct: Dict[str, object]) -> None
obj.extension.add(cls._construct_extension(extension))
@classmethod
- def _get_kind(cls, dct: Dict[str, object]) -> model.ModelingKind:
+ def _get_kind(cls, dct: Dict[str, object]) -> model.ModellingKind:
"""
Utility method to get the kind of an HasKind object from its JSON representation.
:param dct: The object's dict representation from JSON
:return: The object's `kind` value
"""
- return MODELING_KIND_INVERSE[_get_ts(dct, "kind", str)] if 'kind' in dct else model.ModelingKind.INSTANCE
+ return MODELLING_KIND_INVERSE[_get_ts(dct, "kind", str)] if 'kind' in dct else model.ModellingKind.INSTANCE
# #############################################################################
# Helper Constructor Methods starting from here
diff --git a/basyx/aas/adapter/json/json_serialization.py b/basyx/aas/adapter/json/json_serialization.py
index 4a79290ac..704917995 100644
--- a/basyx/aas/adapter/json/json_serialization.py
+++ b/basyx/aas/adapter/json/json_serialization.py
@@ -144,8 +144,8 @@ def _abstract_classes_to_json(cls, obj: object) -> Dict[str, object]:
if obj.supplemental_semantic_id:
data['supplementalSemanticIds'] = list(obj.supplemental_semantic_id)
if isinstance(obj, model.HasKind):
- if obj.kind is model.ModelingKind.TEMPLATE:
- data['kind'] = _generic.MODELING_KIND[obj.kind]
+ if obj.kind is model.ModellingKind.TEMPLATE:
+ data['kind'] = _generic.MODELLING_KIND[obj.kind]
if isinstance(obj, model.Qualifiable) and not cls.stripped:
if obj.qualifier:
data['qualifiers'] = list(obj.qualifier)
diff --git a/basyx/aas/adapter/xml/AAS.xsd b/basyx/aas/adapter/xml/AAS.xsd
index 745b21d33..32b00802c 100644
--- a/basyx/aas/adapter/xml/AAS.xsd
+++ b/basyx/aas/adapter/xml/AAS.xsd
@@ -535,7 +535,7 @@
-
+
@@ -1110,7 +1110,7 @@
-
+
diff --git a/basyx/aas/adapter/xml/xml_deserialization.py b/basyx/aas/adapter/xml/xml_deserialization.py
index 7bdce87d0..892ff205b 100644
--- a/basyx/aas/adapter/xml/xml_deserialization.py
+++ b/basyx/aas/adapter/xml/xml_deserialization.py
@@ -49,9 +49,9 @@
import enum
from typing import Any, Callable, Dict, IO, Iterable, Optional, Set, Tuple, Type, TypeVar
-from .._generic import XML_NS_AAS, MODELING_KIND_INVERSE, ASSET_KIND_INVERSE, KEY_TYPES_INVERSE, ENTITY_TYPES_INVERSE, \
- IEC61360_DATA_TYPES_INVERSE, IEC61360_LEVEL_TYPES_INVERSE, KEY_TYPES_CLASSES_INVERSE, REFERENCE_TYPES_INVERSE, \
- DIRECTION_INVERSE, STATE_OF_EVENT_INVERSE, QUALIFIER_KIND_INVERSE
+from .._generic import XML_NS_AAS, MODELLING_KIND_INVERSE, ASSET_KIND_INVERSE, KEY_TYPES_INVERSE, \
+ ENTITY_TYPES_INVERSE, IEC61360_DATA_TYPES_INVERSE, IEC61360_LEVEL_TYPES_INVERSE, KEY_TYPES_CLASSES_INVERSE, \
+ REFERENCE_TYPES_INVERSE, DIRECTION_INVERSE, STATE_OF_EVENT_INVERSE, QUALIFIER_KIND_INVERSE
NS_AAS = XML_NS_AAS
@@ -388,15 +388,15 @@ def _child_text_mandatory_mapped(parent: etree.Element, child_tag: str, dct: Dic
return _get_text_mandatory_mapped(_get_child_mandatory(parent, child_tag), dct)
-def _get_modeling_kind(element: etree.Element) -> model.ModelingKind:
+def _get_kind(element: etree.Element) -> model.ModellingKind:
"""
- Returns the modeling kind of an element with the default value INSTANCE, if none specified.
+ Returns the modelling kind of an element with the default value INSTANCE, if none specified.
:param element: The xml element.
- :return: The modeling kind of the element.
+ :return: The modelling kind of the element.
"""
- modeling_kind = _get_text_mapped_or_none(element.find(NS_AAS + "kind"), MODELING_KIND_INVERSE)
- return modeling_kind if modeling_kind is not None else model.ModelingKind.INSTANCE
+ modelling_kind = _get_text_mapped_or_none(element.find(NS_AAS + "kind"), MODELLING_KIND_INVERSE)
+ return modelling_kind if modelling_kind is not None else model.ModellingKind.INSTANCE
def _expect_reference_type(element: etree.Element, expected_type: Type[model.Reference]) -> None:
@@ -1003,7 +1003,7 @@ def construct_submodel(cls, element: etree.Element, object_class=model.Submodel,
-> model.Submodel:
submodel = object_class(
_child_text_mandatory(element, NS_AAS + "id"),
- kind=_get_modeling_kind(element)
+ kind=_get_kind(element)
)
if not cls.stripped:
submodel_elements = element.find(NS_AAS + "submodelElements")
diff --git a/basyx/aas/adapter/xml/xml_serialization.py b/basyx/aas/adapter/xml/xml_serialization.py
index 987cc1e56..3cb75a158 100644
--- a/basyx/aas/adapter/xml/xml_serialization.py
+++ b/basyx/aas/adapter/xml/xml_serialization.py
@@ -102,10 +102,10 @@ def abstract_classes_to_xml(tag: str, obj: object) -> etree.Element:
elm.append(administrative_information_to_xml(obj.administration))
elm.append(_generate_element(name=NS_AAS + "id", text=obj.id))
if isinstance(obj, model.HasKind):
- if obj.kind is model.ModelingKind.TEMPLATE:
+ if obj.kind is model.ModellingKind.TEMPLATE:
elm.append(_generate_element(name=NS_AAS + "kind", text="Template"))
else:
- # then modeling-kind is Instance
+ # then modelling-kind is Instance
elm.append(_generate_element(name=NS_AAS + "kind", text="Instance"))
if isinstance(obj, model.HasSemantics):
if obj.semantic_id:
diff --git a/basyx/aas/examples/data/example_aas.py b/basyx/aas/examples/data/example_aas.py
index 4e2d5302b..7c8be81ac 100644
--- a/basyx/aas/examples/data/example_aas.py
+++ b/basyx/aas/examples/data/example_aas.py
@@ -206,7 +206,7 @@ def create_example_asset_identification_submodel() -> model.Submodel:
value='http://acplt.org/SubmodelTemplates/AssetIdentification'),),
model.Submodel),
qualifier=(),
- kind=model.ModelingKind.INSTANCE,
+ kind=model.ModellingKind.INSTANCE,
extension=(),
supplemental_semantic_id=(),
embedded_data_specifications=()
@@ -330,7 +330,7 @@ def create_example_bill_of_material_submodel() -> model.Submodel:
value='http://acplt.org/SubmodelTemplates/BillOfMaterial'),),
model.Submodel),
qualifier=(),
- kind=model.ModelingKind.INSTANCE,
+ kind=model.ModellingKind.INSTANCE,
extension=(),
supplemental_semantic_id=(),
embedded_data_specifications=()
@@ -728,7 +728,7 @@ def create_example_submodel() -> model.Submodel:
value='http://acplt.org/SubmodelTemplates/'
'ExampleSubmodel'),)),
qualifier=(),
- kind=model.ModelingKind.INSTANCE,
+ kind=model.ModellingKind.INSTANCE,
extension=(),
supplemental_semantic_id=(),
embedded_data_specifications=(_embedded_data_specification_physical_unit,)
diff --git a/basyx/aas/examples/data/example_aas_missing_attributes.py b/basyx/aas/examples/data/example_aas_missing_attributes.py
index c408a9642..bb5a0b14b 100644
--- a/basyx/aas/examples/data/example_aas_missing_attributes.py
+++ b/basyx/aas/examples/data/example_aas_missing_attributes.py
@@ -288,7 +288,7 @@ def create_example_submodel() -> model.Submodel:
value='http://acplt.org/SubmodelTemplates/'
'ExampleSubmodel'),)),
qualifier=(),
- kind=model.ModelingKind.INSTANCE)
+ kind=model.ModellingKind.INSTANCE)
return submodel
diff --git a/basyx/aas/examples/data/example_submodel_template.py b/basyx/aas/examples/data/example_submodel_template.py
index 226b8d612..a260f39df 100644
--- a/basyx/aas/examples/data/example_submodel_template.py
+++ b/basyx/aas/examples/data/example_submodel_template.py
@@ -297,7 +297,7 @@ def create_example_submodel_template() -> model.Submodel:
value='http://acplt.org/SubmodelTemplates/'
'ExampleSubmodel'),)),
qualifier=(),
- kind=model.ModelingKind.TEMPLATE)
+ kind=model.ModellingKind.TEMPLATE)
return submodel
diff --git a/basyx/aas/model/aas.py b/basyx/aas/model/aas.py
index c4f63804d..0bb634f2a 100644
--- a/basyx/aas/model/aas.py
+++ b/basyx/aas/model/aas.py
@@ -31,7 +31,7 @@ class AssetInformation:
:ivar asset_kind: Denotes whether the Asset is of :class:`~aas.model.base.AssetKind` "TYPE" or "INSTANCE".
Default is "INSTANCE".
- :ivar global_asset_id: :class:`~aas.model.base.Identifier` modeling the identifier of the asset the AAS is
+ :ivar global_asset_id: :class:`~aas.model.base.Identifier` modelling the identifier of the asset the AAS is
representing.
This attribute is required as soon as the AAS is exchanged via partners in the
life cycle of the asset. In a first phase of the life cycle the asset might not yet have a
diff --git a/basyx/aas/model/base.py b/basyx/aas/model/base.py
index 6695d204c..857641116 100644
--- a/basyx/aas/model/base.py
+++ b/basyx/aas/model/base.py
@@ -189,19 +189,19 @@ class EntityType(Enum):
@unique
-class ModelingKind(Enum):
+class ModellingKind(Enum):
"""
Enumeration for denoting whether an element is a type or an instance.
- *Note:* An :attr:`~.ModelingKind.INSTANCE` becomes an individual entity of a template, for example a device model,
+ *Note:* An :attr:`~.ModellingKind.INSTANCE` becomes an individual entity of a template, for example a device model,
by defining specific property values.
- *Note:* In an object oriented view, an instance denotes an object of a template (class).
+ *Note:* In an object-oriented view, an instance denotes an object of a template (class).
:cvar TEMPLATE: Software element which specifies the common attributes shared by all instances of the template
:cvar INSTANCE: concrete, clearly identifiable component of a certain template.
*Note:* It becomes an individual entity of a template, for example a device model, by defining
specific property values.
- *Note:* In an object oriented view, an instance denotes an object of a template (class).
+ *Note:* In an object-oriented view, an instance denotes an object of a template (class).
"""
TEMPLATE = 0
@@ -1425,12 +1425,12 @@ class HasKind(metaclass=abc.ABCMeta):
<>
- :ivar _kind: Kind of the element: either type or instance. Default = :attr:`~ModelingKind.INSTANCE`.
+ :ivar _kind: Kind of the element: either type or instance. Default = :attr:`~ModellingKind.INSTANCE`.
"""
@abc.abstractmethod
def __init__(self):
super().__init__()
- self._kind: ModelingKind = ModelingKind.INSTANCE
+ self._kind: ModellingKind = ModellingKind.INSTANCE
@property
def kind(self):
diff --git a/basyx/aas/model/submodel.py b/basyx/aas/model/submodel.py
index 86a9e2501..8540bbd33 100644
--- a/basyx/aas/model/submodel.py
+++ b/basyx/aas/model/submodel.py
@@ -130,7 +130,7 @@ def __init__(self,
administration: Optional[base.AdministrativeInformation] = None,
semantic_id: Optional[base.Reference] = None,
qualifier: Iterable[base.Qualifier] = (),
- kind: base.ModelingKind = base.ModelingKind.INSTANCE,
+ kind: base.ModellingKind = base.ModellingKind.INSTANCE,
extension: Iterable[base.Extension] = (),
supplemental_semantic_id: Iterable[base.Reference] = (),
embedded_data_specifications: Iterable[base.EmbeddedDataSpecification] = ()):
@@ -145,7 +145,7 @@ def __init__(self,
self.administration: Optional[base.AdministrativeInformation] = administration
self.semantic_id: Optional[base.Reference] = semantic_id
self.qualifier = base.NamespaceSet(self, [("type", True)], qualifier)
- self._kind: base.ModelingKind = kind
+ self._kind: base.ModellingKind = kind
self.extension = base.NamespaceSet(self, [("name", True)], extension)
self.supplemental_semantic_id: base.ConstrainedList[base.Reference] = \
base.ConstrainedList(supplemental_semantic_id)
diff --git a/test/adapter/xml/test_xml_deserialization.py b/test/adapter/xml/test_xml_deserialization.py
index 995a52519..263413239 100644
--- a/test/adapter/xml/test_xml_deserialization.py
+++ b/test/adapter/xml/test_xml_deserialization.py
@@ -130,7 +130,7 @@ def test_invalid_boolean(self) -> None:
""")
self._assertInExceptionAndLog(xml, "False", ValueError, logging.ERROR)
- def test_no_modeling_kind(self) -> None:
+ def test_no_modelling_kind(self) -> None:
xml = _xml_wrap("""
@@ -140,11 +140,11 @@ def test_no_modeling_kind(self) -> None:
""")
# should get parsed successfully
object_store = read_aas_xml_file(io.BytesIO(xml.encode("utf-8")), failsafe=False)
- # modeling kind should default to INSTANCE
+ # modelling kind should default to INSTANCE
submodel = object_store.pop()
self.assertIsInstance(submodel, model.Submodel)
assert isinstance(submodel, model.Submodel) # to make mypy happy
- self.assertEqual(submodel.kind, model.ModelingKind.INSTANCE)
+ self.assertEqual(submodel.kind, model.ModellingKind.INSTANCE)
def test_reference_kind_mismatch(self) -> None:
xml = _xml_wrap("""