Skip to content

Conversation

@moritzsommer
Copy link
Contributor

@moritzsommer moritzsommer commented Nov 3, 2025

Previously, the AbstractObjectProvider only worked with Identifiables, which made it incompatible with the new version of the AAS metamodel.

This renames and restructures both the AbstractObjectProvider and the AbstractObjectStore. In all non-abstract subclasses where Object appears in the class or method name, it has been replaced with Identifiable. Old classes are still available with a deprecation warning.

Moreover, AbstractObjectProvider and AbstractObjectStore are now generic to be able to handle more classes than just Identifiables.

In order to handle the new AASDescriptor, a new class HasIdentifier has been added. It is intended to be an abstract superclass for all classes that have an identifier, but are not Identifiables.

As of now, this PR is intended to serve as a basis for discussion. Therefore, the documentation has not yet been adapted.

Fixes #428

@moritzsommer moritzsommer marked this pull request as draft November 3, 2025 19:41
@moritzsommer moritzsommer reopened this Dec 1, 2025
@moritzsommer moritzsommer marked this pull request as ready for review December 1, 2025 17:44
Copy link
Contributor

@s-heppner s-heppner left a comment

Choose a reason for hiding this comment

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

I'm fine with the current design, except for the small nitpicks I have in the comments.

I also agree that the newly created methods and classes should be used everywhere in our code.
However: We absolutely need the old methods retained wrapping the new methods with a deprecation warning, otherwise we need to release this as a version 3.0.0, which I don't think we should.

This applies to the methods from:

  • DictObjectStore
  • SetObjectStore
  • LocalFileObjectStore
  • ...

and all other methods that have been refactored.

def __init__(self) -> None:
super().__init__()
self.administration: Optional[AdministrativeInformation] = None
# The id attribute is set by all inheriting classes __init__ functions.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd keep the comment here, if it still applies.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why commenting it and not enforcing it through a parameter in the constructor? Besides that, some test cases don't set the ID attribute.

Previously, the `AbstractObjectProvider` only worked with
`Identifiables`, which made it incompatible with the new version of the
AAS metamodel.

This renames and restructures both the `AbstractObjectProvider` and the
`AbstractObjectStore`. In all non-abstract subclasses where `Object`
appears in the class or method name, it has been replaced with
`Identifiable`. Old classes are still available with a deprecation
warning.

Moreover, `AbstractObjectProvider` and `AbstractObjectStore` are now
generic to be able to handle more classes than just `Identifiables`.

In order to handle the new `AASDescriptor`, a new class `HasIdentifier`
has been added. It is intended to be an abstract superclass for all
classes that have an identifier, but are not `Identifiables`.

As of now, this PR is intended to serve as a basis for discussion.
Therefore, the documentation has not yet been adapted.

Fixes eclipse-basyx#428
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.

2 participants