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

Clean up CreationEvent hierarchy #234

Open
berezovskyi opened this issue Dec 26, 2021 · 2 comments
Open

Clean up CreationEvent hierarchy #234

berezovskyi opened this issue Dec 26, 2021 · 2 comments

Comments

@berezovskyi
Copy link
Member

berezovskyi commented Dec 26, 2021

IIRC, in Lyo 2.2.0 we removed the abstract modifier from the ChangeEvent class due to shortcomings in the JenaModelHelper at the time.

I have 3 thoughts:

  1. We should make it abstract again.
  2. We should create a superclass over Creation and Modification events, for example, a CreationOrModificationEvent. The reason for this is that the TRS 3.0 spec changes the semantics to strip Creation and Modification events of any semantically meaningful distinction. The reason is that many apps in the field violate the existing semantics and we shall codify it. I was against it but it got into the spec text anyway. This way, app developers would be able to check if a resource is an instance of CreationOrModificationEvent, which is in line with the spec text (i.e., you cannot check further for the instance of a Creation event because it may a modification labelled as a creation or vice versa).
  3. Make use of the JDK 17 sealed feature and seal both the ChangeEvent class and the CreationOrModificationEvent.
@berezovskyi
Copy link
Member Author

As I was experimenting with dynamic proxies in Java that only support interfaces, we also need to extract an interface from each of these classes as well (and bring along the annotations).

@berezovskyi
Copy link
Member Author

Breaking because some apps may now depend on the non-abstract nature of the ChangeEvent.

@berezovskyi berezovskyi added this to the 5.1 milestone May 9, 2022
@berezovskyi berezovskyi modified the milestones: 5.1, 5.x May 19, 2022
@berezovskyi berezovskyi modified the milestones: 5.x, 7.x, 6.0 Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant