How to change the URL of a SPARQL repository "on the fly"? #3319
-
I have an application where users can create connections to SPARQL repositories via the UI. If a user makes a typo in the URL or if the service provider changes the URL, the URL must be updated. Currently, this requires a restart of my application because I did not find a way of changing the URL of a SPARQL repository if it is already in use. I can only see methods in the RepositoryManager API for creating a repo, getting the repo configuration and deleting the repository - but none for updating the repository configuration. So is there a way to actually update a repository configuration - in particular the URL of a SPARQLRepositoryConfig? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's perhaps worth pointing out that from the point of view of RDF4J, the endpoint url is the unique identifier of a SPARQLRepository. A change in that url conceptually means you are accesing a different endpoint, therefore a different Repository. |
Beta Was this translation helpful? Give feedback.
RepositoryManager#addRepositoryConfig
can be used to create a new config or updating an existing one. However, this won't change the configuration of any existing initializedRepository
object that you already have for that endpoint - you'll have to shut that down and re-initialize.It's perhaps worth pointing out that from the point of view of RDF4J, the endpoint url is the unique identifier of a SPARQLRepository. A change in that url conceptually means you are accesing a different endpoint, therefore a different Repository.