diff --git a/compliance_tool/aas_compliance_tool/schemas/aasJSONSchema.json b/compliance_tool/aas_compliance_tool/schemas/aasJSONSchema.json index f48db4d17..7ba1a360f 100644 --- a/compliance_tool/aas_compliance_tool/schemas/aasJSONSchema.json +++ b/compliance_tool/aas_compliance_tool/schemas/aasJSONSchema.json @@ -7,7 +7,7 @@ "$ref": "#/definitions/Environment" } ], - "$id": "https://admin-shell.io/aas/3/0", + "$id": "https://admin-shell.io/aas/3/1", "definitions": { "AasSubmodelElements": { "type": "string", diff --git a/compliance_tool/aas_compliance_tool/schemas/aasXMLSchema.xsd b/compliance_tool/aas_compliance_tool/schemas/aasXMLSchema.xsd index 25d7a52b9..95096ecb4 100644 --- a/compliance_tool/aas_compliance_tool/schemas/aasXMLSchema.xsd +++ b/compliance_tool/aas_compliance_tool/schemas/aasXMLSchema.xsd @@ -1,5 +1,5 @@ - + diff --git a/compliance_tool/test/files/test_demo_full_example.json b/compliance_tool/test/files/test_demo_full_example.json index 68e154f73..6e7e8b936 100644 --- a/compliance_tool/test/files/test_demo_full_example.json +++ b/compliance_tool/test/files/test_demo_full_example.json @@ -124,7 +124,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, @@ -618,7 +618,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, @@ -1492,7 +1492,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, @@ -3073,7 +3073,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, diff --git a/compliance_tool/test/files/test_demo_full_example.xml b/compliance_tool/test/files/test_demo_full_example.xml index 759e3c403..7fdbb279c 100644 --- a/compliance_tool/test/files/test_demo_full_example.xml +++ b/compliance_tool/test/files/test_demo_full_example.xml @@ -1,5 +1,5 @@ - + TestAssetAdministrationShell @@ -35,7 +35,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 @@ -1229,7 +1229,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 @@ -2851,7 +2851,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 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 index 7ddb5f17c..82fc54618 100644 --- 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 @@ -132,7 +132,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, @@ -626,7 +626,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, @@ -1500,7 +1500,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, @@ -3081,7 +3081,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, 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 index d748e7908..7d8aa9481 100644 --- a/compliance_tool/test/files/test_demo_full_example_wrong_attribute.json +++ b/compliance_tool/test/files/test_demo_full_example_wrong_attribute.json @@ -124,7 +124,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, @@ -618,7 +618,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, @@ -1492,7 +1492,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, @@ -3073,7 +3073,7 @@ "keys": [ { "type": "GlobalReference", - "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + "value": "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3" } ] }, 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 index 94c47d36b..1c19b0631 100644 --- a/compliance_tool/test/files/test_demo_full_example_wrong_attribute.xml +++ b/compliance_tool/test/files/test_demo_full_example_wrong_attribute.xml @@ -1,5 +1,5 @@ - + TestAssetAdministrationShell123 @@ -35,7 +35,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 @@ -1229,7 +1229,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 @@ -2851,7 +2851,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 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 index cb203c9d8..c473776a8 100644 --- 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 @@ -1,5 +1,5 @@ - + TestAssetAdministrationShell @@ -35,7 +35,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 @@ -1237,7 +1237,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 @@ -2859,7 +2859,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 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 index 7f2531f6c..d8df3fedc 100644 --- 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 @@ -1,5 +1,5 @@ - + TestAssetAdministrationShell123 @@ -35,7 +35,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 @@ -1237,7 +1237,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 @@ -2859,7 +2859,7 @@ GlobalReference - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 + https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3 diff --git a/compliance_tool/test/files/test_deserializable_aas_warning.xml b/compliance_tool/test/files/test_deserializable_aas_warning.xml index 53f72ab71..d57556eaf 100644 --- a/compliance_tool/test/files/test_deserializable_aas_warning.xml +++ b/compliance_tool/test/files/test_deserializable_aas_warning.xml @@ -1,5 +1,5 @@ - + TestAssetAdministrationShell diff --git a/compliance_tool/test/files/test_empty.xml b/compliance_tool/test/files/test_empty.xml index 0329f4b5a..2225e0934 100644 --- a/compliance_tool/test/files/test_empty.xml +++ b/compliance_tool/test/files/test_empty.xml @@ -1,3 +1,3 @@ - + \ 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 index d673e80ec..5c9c982a8 100644 --- a/compliance_tool/test/files/test_not_deserializable_aas.xml +++ b/compliance_tool/test/files/test_not_deserializable_aas.xml @@ -1,5 +1,5 @@ - + diff --git a/sdk/basyx/aas/adapter/_generic.py b/sdk/basyx/aas/adapter/_generic.py index 65d14d8d3..657915269 100644 --- a/sdk/basyx/aas/adapter/_generic.py +++ b/sdk/basyx/aas/adapter/_generic.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. @@ -27,7 +27,7 @@ ) # XML Namespace definition -XML_NS_MAP = {"aas": "https://admin-shell.io/aas/3/0"} +XML_NS_MAP = {"aas": "https://admin-shell.io/aas/3/1"} XML_NS_AAS = "{" + XML_NS_MAP["aas"] + "}" MODELLING_KIND: Dict[model.ModellingKind, str] = { diff --git a/sdk/basyx/aas/adapter/xml/xml_deserialization.py b/sdk/basyx/aas/adapter/xml/xml_deserialization.py index ce628f5bd..d1376b9fd 100644 --- a/sdk/basyx/aas/adapter/xml/xml_deserialization.py +++ b/sdk/basyx/aas/adapter/xml/xml_deserialization.py @@ -98,7 +98,7 @@ def _element_pretty_identifier(element: etree._Element) -> str: If the prefix is known, the namespace in the element tag is replaced by the prefix. If additionally also the sourceline is known, it is added as a suffix to name. - For example, instead of "{https://admin-shell.io/aas/3/0}assetAdministrationShell" this function would return + For example, instead of "{https://admin-shell.io/aas/3/1}assetAdministrationShell" this function would return "aas:assetAdministrationShell on line $line", if both, prefix and sourceline, are known. :param element: The xml element. diff --git a/sdk/basyx/aas/adapter/xml/xml_serialization.py b/sdk/basyx/aas/adapter/xml/xml_serialization.py index 454de95fd..b74a993cb 100644 --- a/sdk/basyx/aas/adapter/xml/xml_serialization.py +++ b/sdk/basyx/aas/adapter/xml/xml_serialization.py @@ -322,7 +322,8 @@ def value_reference_pair_to_xml(obj: model.ValueReferencePair, et_vrp = _generate_element(tag) # TODO: value_type isn't used at all by _value_to_xml(), thus we can ignore the type here for now et_vrp.append(_generate_element(NS_AAS+"value", text=obj.value)) # type: ignore - et_vrp.append(reference_to_xml(obj.value_id, NS_AAS+"valueId")) + if obj.value_id is not None: + et_vrp.append(reference_to_xml(obj.value_id, NS_AAS+"valueId")) return et_vrp diff --git a/sdk/basyx/aas/examples/data/example_aas.py b/sdk/basyx/aas/examples/data/example_aas.py index 26340b1a0..10d200205 100644 --- a/sdk/basyx/aas/examples/data/example_aas.py +++ b/sdk/basyx/aas/examples/data/example_aas.py @@ -23,7 +23,7 @@ _embedded_data_specification_iec61360 = model.EmbeddedDataSpecification( data_specification=model.ExternalReference((model.Key(type_=model.KeyTypes.GLOBAL_REFERENCE, value='https://admin-shell.io/DataSpecificationTemplates/' - 'DataSpecificationIEC61360/3/0'),)), + 'DataSpecificationIEC61360/3'),)), data_specification_content=model.DataSpecificationIEC61360(preferred_name=model.PreferredNameTypeIEC61360({ 'de': 'Test Specification', 'en-US': 'TestSpecification' diff --git a/sdk/basyx/aas/model/_string_constraints.py b/sdk/basyx/aas/model/_string_constraints.py index 376f76b0e..e382b8256 100644 --- a/sdk/basyx/aas/model/_string_constraints.py +++ b/sdk/basyx/aas/model/_string_constraints.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. @@ -100,7 +100,7 @@ def check_short_name_type(value: str, type_name: str = "ShortNameType") -> None: def check_value_type_iec61360(value: str, type_name: str = "ValueTypeIEC61360") -> None: - return check(value, type_name, 1, 2000) + return check(value, type_name, 1, 2048) def check_version_type(value: str, type_name: str = "VersionType") -> None: diff --git a/sdk/basyx/aas/model/base.py b/sdk/basyx/aas/model/base.py index f6b55fa8f..26f079fd4 100644 --- a/sdk/basyx/aas/model/base.py +++ b/sdk/basyx/aas/model/base.py @@ -1172,7 +1172,7 @@ class DataSpecificationContent: **Constraint AASc-3a-050:** If the ``Data_specification_IEC_61360`` is used for an element, the value of ``HasDataSpecification.embedded_data_specifications`` shall contain the external reference to the IRI of the corresponding data specification - template ``https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0`` + template ``https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3`` """ @abc.abstractmethod def __init__(self): @@ -1720,14 +1720,14 @@ class ValueReferencePair: def __init__(self, value: ValueTypeIEC61360, - value_id: Reference): + value_id: Optional[Reference] = None): """ TODO: Add instruction what to do after construction """ - self.value_id: Reference = value_id self.value: ValueTypeIEC61360 = value + self.value_id: Optional[Reference] = value_id def __repr__(self) -> str: return "ValueReferencePair(value={}, value_id={})".format(self.value, self.value_id) diff --git a/sdk/docs/source/constraints.rst b/sdk/docs/source/constraints.rst index f51ea0ed5..6b037b084 100644 --- a/sdk/docs/source/constraints.rst +++ b/sdk/docs/source/constraints.rst @@ -57,8 +57,8 @@ an :class:`~basyx.aas.model.base.AASConstraintViolation` will be raised .. |aasc006| replace:: For a ``ConceptDescription`` with ``category`` DOCUMENT using data specification template IEC61360 - ``DataSpecificationIEC61360/dataType`` shall be one of the following values: STRING or URL. .. |aasc007| replace:: For a ``ConceptDescription`` with ``category`` QUALIFIER_TYPE using data specification template IEC61360 - ``DataSpecificationIEC61360/dataType`` is mandatory and shall be defined. .. |aasc008| replace:: For a ConceptDescriptions except for a ``ConceptDescription`` of ``category`` VALUE using data specification template IEC61360 - ``DataSpecificationIEC61360/definition`` is mandatory and shall be defined at least in English. -.. |aasc009| replace:: If ``DataSpecificationIEC61360/dataType`` one of: INTEGER_MEASURE, REAL_MEASURE, RATIONAL_MEASURE, INTEGER_CURRENCY, REAL_CURRENCY, then ``DataSpecificationIEC61360/unit`` or ``DataSpecificationIEC61360/unitId`` shall be defined. -.. |aasc010| replace:: If ``DataSpecificationIEC61360/value`` is not empty then ``DataSpecificationIEC61360/valueList`` shall be empty and vice versa. +.. |aasc3a009| replace:: If ``DataSpecificationIEC61360/dataType`` is one of: INTEGER_MEASURE, REAL_MEASURE, RATIONAL_MEASURE, INTEGER_CURRENCY, REAL_CURRENCY, then ``DataSpecificationIEC61360/unit`` or ``DataSpecificationIEC61360/unitId`` shall be defined. +.. |aasc3a010| replace:: If ``DataSpecificationIEC61360/value`` is not empty then ``DataSpecificationIEC61360/valueList`` shall be empty and vice versa. .. csv-table:: @@ -106,5 +106,5 @@ an :class:`~basyx.aas.model.base.AASConstraintViolation` will be raised AASc-006, |aasc006|, tbd AASc-007, |aasc007|, tbd AASc-008, |aasc008|, tbd - AASc-009, |aasc009|, tbd - AASc-010, |aasc010|, tbd + AASc-3a-009, |aasc3a009|, tbd + AASc-3a-010, |aasc3a010|, tbd diff --git a/sdk/test/adapter/xml/test_xml_deserialization.py b/sdk/test/adapter/xml/test_xml_deserialization.py index 1f51d9059..cc9e0ed5b 100644 --- a/sdk/test/adapter/xml/test_xml_deserialization.py +++ b/sdk/test/adapter/xml/test_xml_deserialization.py @@ -456,22 +456,22 @@ def construct_submodel(cls, element: etree._Element, object_class=EnhancedSubmod class TestTagReplaceNamespace(unittest.TestCase): def test_known_namespace(self): - tag = '{https://admin-shell.io/aas/3/0}tag' + tag = '{https://admin-shell.io/aas/3/1}tag' expected = 'aas:tag' self.assertEqual(_tag_replace_namespace(tag, XML_NS_MAP), expected) def test_empty_prefix(self): # Empty prefix should not be replaced as otherwise it would apply everywhere - tag = '{https://admin-shell.io/aas/3/0}tag' - nsmap = {"": "https://admin-shell.io/aas/3/0"} - expected = '{https://admin-shell.io/aas/3/0}tag' + tag = '{https://admin-shell.io/aas/3/1}tag' + nsmap = {"": "https://admin-shell.io/aas/3/1"} + expected = '{https://admin-shell.io/aas/3/1}tag' self.assertEqual(_tag_replace_namespace(tag, nsmap), expected) def test_empty_namespace(self): # Empty namespaces should also have no effect - tag = '{https://admin-shell.io/aas/3/0}tag' + tag = '{https://admin-shell.io/aas/3/1}tag' nsmap = {"aas": ""} - expected = '{https://admin-shell.io/aas/3/0}tag' + expected = '{https://admin-shell.io/aas/3/1}tag' self.assertEqual(_tag_replace_namespace(tag, nsmap), expected) def test_unknown_namespace(self):