A way to ask a Repository what operations it supports #3191
abrokenjester
started this conversation in
Ideas
Replies: 1 comment
-
@aschwarte10 just created a ticket with your idea - so we don't forget. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Repository API has many different implementations, each of which have their own peculariaties. While the intent of the interfaces is of transparency and being able to swap any implementation for any other with minimal changes, in practice this is not always possible:
...and so on.
While it is of course possible to simply execute the operation and catch an UnsupportedOperationException, it may be useful to have a mechanism to check in advance if an operation is permitted.
A possible approach would be along the same lines of what we have in Rio: the getSupportedSettings method. Except here, we are not talking about (configuration) settings, but about supported operations.
We could also potentially use it to feed back which TransactionSettings are supported by the Repository in question, e.g. if the sail stack includes a ShaclSail, feed back that that ValidationSettings are supported.
Rough sketch of what it could look like:
Beta Was this translation helpful? Give feedback.
All reactions