Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the implementation to V3.0RC02 #18

Merged
merged 339 commits into from
Apr 17, 2023

Conversation

jkhsjdhjs
Copy link
Contributor

@jkhsjdhjs jkhsjdhjs commented Jun 23, 2022

This PR updates the implementation to V3.0RC02 of the DotAAS spec. It is WIP and there's still a lot of work to be done:

  • AnnotatedRelationshipElement/annotation: Type changed from ModelReference<DataElement> to DataElement.
  • Asset: Removed, asset referenced via globalAssetId only.
  • AssetAdministrationShell/security: Removed.
    Note: Security is still part of the AssetAdministration Shell, but the Asset Administration Shell and its elements are referenced from Security.
  • AssetAdministrationShell/view: Removed, Views not langer supported.
  • AssetAdministrationShell/billOfMaterial: Removed.
  • AssetInformation/defaultThumbnail: Type changed from File to Resource.
  • AssetInformation/specificAssetId: Type changed from IdentifierKeyValuePair to SpecificAssetId.
  • BasicEvent: Renamed to BasicEventElement.
  • Constraint: Abstract class removed. Formula now used in Security part only.
  • DataTypeDef: Splitted into DataTypeDefXsd and DataTypeDefRdf. Some types excluded and not supported (see noted in corresponding clause).
    Before: just string allowing all anySimpleTypes of xsd and langString of rdf.
  • Entity/globalAssetId: Bugfix: Type change from reference of Reference to Reference (from Reference* to Reference).
  • Event: Renamed to EventElement.
  • Extension/refersTo: Type changed from Reference to ModelReference.
  • File/mimeType: Renamed to contentType + Type name changed from MimeType to ContentType.
  • Formula: Now abstract class. Formula now used in Security part only.
  • Formula/dependsOn: Removed since formula language not yet defined.
  • Identifiable/identification: Removed. Substituted by Identifiable/id.
  • IdentifiableElements: Renamed to AasIdentifiables.
  • Identifier: Type changed. Before struct class with two attributed: id and idType. Now string data type only.
  • IdentifierKeyValuePair: Renamed to SpecificAssetId and change of attribute key to name.
  • IdentifierType: Enumeration removed because no idType any longer.
  • Key/idType: removed.
  • KeyElements: Renamed to KeyTypes.
    The elements remain except for new SubmodelElementList, and renamed submodel elements Event and BasicEvent to EventElement and BasicEventElement.
  • KeyType: Enumeration removed because no Key/idType any longer.
  • LocalKeyType: Enumeration removed because no Key/idType any longer.
  • MimeType: Type name changed to ContentType.
  • Property/valueType: Type changed from DataTypeDef to DataTypeDefXsd.
  • Qualifiable/qualifier: Type changed from Constraint to Qualifier.
  • Qualifier: Does not inherit from abstract class Constraint any longer.
  • Qualifier/valueType: Type changed from DataTypeDef to DataTypeDefXsd.
  • Range/valueType: Type changed from DataTypeDef to DataTypeDefXsd.
  • Referable/idShort: Now optional, was mandatory.
  • ReferableElements: Substituted with enumeration AasSubmodelElements and AasIdentifiables.
  • ReferableElements/AccessPermissionRule: Removed from Enumeration, AccessPermissionRule is not referable any longer.
    Not part of new AasReferableNonIdentifiables.
  • ReferableElement/BasicEvent: Renamed to BasicEventElement. Now part of AasSubmodelElements.
  • ReferablesElements/ConceptDictionary: Bugfix: ConceptDictionary removed from enumeration since ConceptDictionary not part of specification any longer.
    Now part of new KeyTypes.
  • ReferableElements/Event: Renamed to EventElement. Now part of AasSubmodelElements.
  • RelationshipElement/first: Type changes from model reference Referable to Reference (global or model reference).
  • RelationshipElement/second: Type changes from model reference Referable to Reference (global or model reference).
  • ValueDataType: Before as specified via DataTypeDef, now any xsd atomatic type as specified via DataTypeDefXsd.
    + Prefix xs: added to every value in list.
  • ValueList/valueReferencePairType: Bugfix: renamed to ValueList/valueReferencePairs.
  • View: removed.

TODO aside from the V30RC02 changes:

  • add missing attributes to EventElement and BasicEventElement
  • implement SubmodelElementList
  • add the new official JSON/XML schemata
  • try having ValueReferencePair default to String value_type (also adjust json/xml adapters, especially # type: ignore comments in both deserializations

Once SubmodelElementList is implemented:

  • re-enable skipped unittests
  • add SubmodelElementList to KeyTypes
  • add SubmodelElementList constraints to Reference
  • add exemplary SubmodelElementList objects to example data

mhthies and others added 30 commits January 13, 2021 08:56
…onceptDescription

This requires further fixes in test files of the compliance tool.
SubmodelElementCollection.submodel_element_collection_factory -> SubmodelElementCollection.create
jkhsjdhjs and others added 8 commits March 28, 2023 16:59
…modelElementList`"

This reverts commit 2362f26.
It's better to always serialize the value instead of having multiple
places where the default value is specified.
It's better to always serialize optional values instead of specifying
their default value in multiple locations.
See also: 0a735db
This saves us a 'type: ignore' comment.
Class names: PascalCase
Attribute names: snake_case
The following classes were missing from the implementation, because only XML
1.0 datatypes have been implemented so far:

`yearMonthDuration` is a restriction of duration, were only years
and months are allowed.

`dayTimeDuration` is a restriction of duration, were specifying
years and months is not allowed.

`dateTimeStamp` is a restriction of dateTime, were the timezone is
required.

yearMonthDuration and dayTimeDuration are implemented as subclasses of
Duration. The constraints are only checked on serialization, which makes
it a bit hacky. However, since this commit will be reverted with DotAAS
3.0 anyways, it's good enough for now.

Close #49

Furthermore, this PR removes an unused definition and fixes a typo. Obviously, these commits shouldn't be reverted with 3.0.
Since a recent version, wheel requires a comma between lower and upper
version bound.
'value' is not required in Schema
…and schema

Changes:
- fix bugs in XML/JSON schema by copying some sections from the V3.0 schema
- remove `ABAC.xsd` and `IEC61360.xsd` (not needed anymore, now unified in a single schema)
- adapter.json: fix `HasDataSpecification` (de-)serialization
- adapter.xml: add `HasDataSpecification` (de-)serialization
- move XML namespace definitions to `adapter._generic`
- remove `ConceptDescriptionIEC61360`
- remove `example_concept_description.py` (as it only contained `ConceptDescriptionIEC61360`)
- fix some minor issues in `AASDataChecker` (type hints, error messages, etc.)
- add `HasDataSpecification` support to `AASDataChecker`
- add `EmbeddedDataSpecifications` to example data
- add `__repr__()` to `EmbeddedDataSpecification`, `DataSpecificationIEC61360` and `DataSpecificationPhysicalUnit`
- remove `value_id` attribute from `DataSpecificationIEC61360`
- rename attribute accesses of `DataSpecificationPhysicalUnit` that were missed in 6cc19c6
- update tests and compliance tool example files in accordance to the changes
Furthermore, check `Qualifier.kind` with `AASDataChecker` and add
examplary values to example files.
…ng to `String`

2373167 and
9da564c changed the default
`value_format` and `value_type` of `DataSpecificationIEC61360` and
`ValueReferencePair` to `String`.
This commit adjusts the JSON/XML adapters accordingly.
The security model wasn't implemented and isn't part of the new V3.0
schemata. The (de-)serialization functions weren't used since the
removal of the security attribute from `AssetAdministrationShell` in
1c45c3c.

In turn, also remove security (de-)serialization functions from JSON/XML
adapters.
Remove ABAC XML namespace definition as it isn't used.
@jkhsjdhjs jkhsjdhjs marked this pull request as ready for review April 17, 2023 11:45
@jkhsjdhjs jkhsjdhjs changed the title WIP: Update the implementation to V3.0RC02 Update the implementation to V3.0RC02 Apr 17, 2023
@s-heppner s-heppner merged commit ab298a7 into eclipse-basyx:improve/V30RC02 Apr 17, 2023
@s-heppner s-heppner added the v3.0 label Nov 21, 2023
@jkhsjdhjs jkhsjdhjs deleted the improve/V30RC02 branch January 5, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants