Skip to content

Conversation

@stiebitzhofer
Copy link

Summary

  • Fix XML element ordering for AssetAdministrationShell and include AAS.xsd in AASX packages
  • Correct XML Operation serialization/deserialization wrappers to align with XSD
  • Enforce AASd-108 SubmodelElementList single-type constraint
  • Update IEC61360 data specification template IDs in test fixtures
  • Fix embeddedDataSpecifications XML deserialization, including nested content

Testing

  • mvn -Djacoco.skip=true -DargLine="-javaagent:/Users/hannes/.m2/repository/org/mockito/mockito-core/5.20.0/mockito-core-5.20.0.jar" test

Commits

Copy link
Contributor

@FriedJannik FriedJannik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for implementing this, I was about to do this as well :)
In regards to #208 #448 and #389 that Looks Good to me!

Copy link
Contributor

@mdanish98 mdanish98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @stiebitzhofer ,
Many thanks for the PR!

I have some remarks.

General
During the upgradation of aas4j to 2.0 we have ignored some XML validation tests due to issues #389 and #390. However, when I unignored these tests, all unignored tests are failing. So, I think this PR needs to be adjusted in order to determine the root cause and fix it. Could you please check this as well?

public static final Environment ENVIRONMENT = createEnvironment();
public static final String AAS_3_1_DATA_SPECIFICATION_IEC_61360 =
"https://admin-shell.io/aas/3/1/DataSpecificationIec61360";
"https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIec61360/3";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the latest documentation of IDTA-01003-a - Data Specification IEC61360, the schema for IEC61360 is included as embedded data specification in the release of IDTA-01001-3-1 or its bugfix releases.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to look up the link again (I should add that to the commit): https://industrialdigitaltwin.io/aas-specifications/IDTA-01003-a/v3.1.1/specification.html Your thoughts?

private static final String SUBMODEL_OPERATIONAL_DATA_PROPERTY_VALUETYPE = "integer";
public static final String AAS_3_1_DATA_SPECIFICATION_IEC_61360 =
"https://admin-shell.io/aas/3/1/DataSpecificationIec61360";
"https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIec61360/3";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

.type(KeyTypes.GLOBAL_REFERENCE)
.value(
"https://admin-shell.io/aas/3/1/DataSpecificationIec61360")
"https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIec61360/3")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

"keys" : [ {
"type" : "GlobalReference",
"value" : "https://admin-shell.io/aas/3/1/DataSpecificationIec61360"
"value" : "https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIec61360/3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above regarding 'DataSpecificationIec61360'

<aas:key>
<aas:type>GlobalReference</aas:type>
<aas:value>https://admin-shell.io/aas/3/1/DataSpecificationIec61360</aas:value>
<aas:value>https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIec61360/3</aas:value>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above regarding 'DataSpecificationIec61360'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above regarding 'DataSpecificationIec61360'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above regarding 'DataSpecificationIec61360'

…clipse-aas4j#456, eclipse-aas4j#390)

- Fix SubmodelElementMixin property order to match XSD requirements
- Change "hasExtensions" to "extensions" and "qualifier" to "qualifiers"
- Remove duplicate properties from SubmodelElement ordering
- Add OperationVariable empty list handling to prevent invalid XML
- Remove test skip logic as all 2,593 XML validation tests now pass

Signed-off-by: Hannes Stiebitzhofer <hannes@stiebitzhofer.com>
Add SLF4J debug logging to help troubleshoot deserialization issues when
attempting to deserialize DataSpecificationContent subtypes. The logging
only activates when debug level is enabled and provides visibility into
which classes were attempted and why they failed.

Include unit tests that exercise the deserialization code paths with both
valid IEC61360 data specifications and empty content.

Signed-off-by: Hannes Stiebitzhofer <hannes@stiebitzhofer.com>
Remove automatic inclusion of AAS.xsd in AASX packages as this is not
part of the official AASX specification (IDTA-01005-3-0). While including
the schema enables offline validation, it is not explicitly required or
recommended by the specification.

Changes:
- Remove addXmlSchemaPart() method from AASXSerializer
- Remove XML_SCHEMA_PATH and XML_SCHEMA_RESOURCE constants
- Remove XSD inclusion call in XML serialization path
- Update AASXSerializerTest to remove XSD assertion

Addresses review feedback from mdanish98 on PR eclipse-aas4j#458.

Signed-off-by: Hannes Stiebitzhofer <hannes@stiebitzhofer.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants