This repository was archived by the owner on Feb 15, 2024. It is now read-only.
Conversation
* submodels are collected and added to AAS * LangString, ReferenceElement, RelationshipElement are properly handled * refactoring utility methods to handle custom subtypes (e.g. when cloning or creating new references) * updated MappingProvider to also accept classes with remaining generic type
* submodels are collected and added to AAS * LangString, ReferenceElement, RelationshipElement are properly handled * refactoring utility methods to handle custom subtypes (e.g. when cloning or creating new references) * updated MappingProvider to also accept classes with remaining generic type
…hell-io/java-serializer into feature/aml-deserializer # Conflicts: # dataformat-aml/src/main/java/io/adminshell/aas/v3/dataformat/aml/deserialization/Aml2AasMapper.java
…fication. Adapt FullExample and some bugfixing
accepted merge request Feature/aml deserializer
Contributor
|
@akiskips here is the PR. |
akiskips
approved these changes
Aug 27, 2021
akiskips
left a comment
There was a problem hiding this comment.
My comments are more of informative nature
| .build()); | ||
| return mapper.map(aml); | ||
| } catch (JAXBException ex) { | ||
| throw new DeserializationException("error deserializing AssetAdministrationShellEnvironment", ex); |
There was a problem hiding this comment.
Should it not be error deserializing AML file?
| context.setDocumentInfo(AmlDocumentInfo.fromFile(aml)); | ||
| Object result = context.getMappingProvider().getMapper(AssetAdministrationShellEnvironment.class).map(parser, context); | ||
| AssetAdministrationShellEnvironment result = context.map(AssetAdministrationShellEnvironment.class, parser); | ||
| parser.resolveIdsToReferences(result); |
There was a problem hiding this comment.
should this call modify the AASEnvironment object?
| //not possible with AML due to the mapping specifications | ||
|
|
||
| //remove asset administration shells with no submodels | ||
| adaptAssetAdministrationShells(expected); |
There was a problem hiding this comment.
why is this required? should the submodels that are not referenced from an AAShell just be ignored?
| assertEquals(expected.getAssetAdministrationShells(), actual.getAssetAdministrationShells()); | ||
| } | ||
|
|
||
| private void adaptAssetAdministrationShells(AssetAdministrationShellEnvironment env){ |
There was a problem hiding this comment.
Maybe the test AASEnv should be revised to contain no such invalid cases.
Adapting an existing test object makes the test class much more complex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation from Jens' fork.
Small fix for Eclipse IDE.