Skip to content

Manage namespaces (GDB-3280)

Mihail Radkov requested to merge feature/GDB-3280-manage-namespaces into master

Added namespace management in the RDF repository client.

The results are parsed via N3's DataFactory to NamedNode and finally returned as namespace object containing the prefix and the namespace behind it.

The RDF client uses the execute/retry mechanism of its parent class.

Added stubbed data to test the conversion to NamedNode.

Added utility class for string operations.

Implemented retry mechanism in BaseRepositoryClient

The mechanism has the following flow:

  • retries the same request if the error response is 503 (server busy) with another server endpoint until one of the retry attempts results in a successful response
  • if there are no endpoints left and has retry count & timeout   configured -> it tries the request again with the first endpoint client   until success or no more retries
  • if there are no retries/clients left -> rejects the request

Extended the repository client configuration to include retry count to limit the retry attempts. Updated affected classes/tests.

Added http client stub to make testing more easy.

Additional changes:

  • Extended HttpClient to register default headers for all requests. Additionally made the client timeout to be 0 by default. All request methods' config objects have default values too (effectively making them as optional parameters).

  • Cleaned up ServerClient issues

    • Updated to use the actual deleteResource method from HttpClient
    • Fixed import paths
    • Removed dangling commas
    • Removed dangling commas from other classes too.
  • Registered the content types supported by RDF4J REST API

  • Added Iterable utility class allowing to iterate array of objects

  • Configured eslint & npmrc: Eslint now disallow danglign commas in object declarations because they are useless and increase code smell.

  • Added module resolving in webpack config. Needed to avoid using ../../ in component imports

https://jira.ontotext.com/browse/GDB-3280

Merge request reports