Imported from JIRA [DS-4372] created by julius.gruber
Use case
Please see the attached picture for a graphical representation of the use case.
REST API changes
Currently a REST API call to get the entries for a controlled vocabulary or a form-value-pair look like this:
Get entries for a controlled vocabulary: host/api/integration/authorities/srsc/entries?query=&metadata=dc.subject&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100
Get entries for a form-value-pair: host/api/integration/authorities/common_types/entries?query=&metadata=dc.type&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100
A REST API call to fetch language-specific form-value-pairs or controlled vocabularies may look like this:
REST API calls to get a controlled vocabulary in German: host/api/integration/authorities/srsc/entries?query=&metadata=dc.subject&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100&Accept-Language=de
REST API call to get a form-value-pair in German: host/api/integration/authorities/common_types/entries?query=&metadata=dc.type&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100&Accept-Language=de
First (naïve) approach on what has to be changed at the backend:
Add a new language attribute to form-value-pairs and controlled vocabularies. Allow two or more form-value-pairs or controlled vocabularies to have the same name attribute. If two or more form-value-pairs or controlled vocabulary have the same name attribute make sure they have different language attributes.
Imported from JIRA [DS-4372] created by julius.gruber
Use case
Please see the attached picture for a graphical representation of the use case.
REST API changes
Currently a REST API call to get the entries for a controlled vocabulary or a form-value-pair look like this:
Get entries for a controlled vocabulary: host/api/integration/authorities/srsc/entries?query=&metadata=dc.subject&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100
Get entries for a form-value-pair: host/api/integration/authorities/common_types/entries?query=&metadata=dc.type&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100
In order to get language-specific vocabularies or form-value-Pairs the Angular client should use the Accept-Language header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language).
A REST API call to fetch language-specific form-value-pairs or controlled vocabularies may look like this:
REST API calls to get a controlled vocabulary in German: host/api/integration/authorities/srsc/entries?query=&metadata=dc.subject&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100&Accept-Language=de
REST API call to get a form-value-pair in German: host/api/integration/authorities/common_types/entries?query=&metadata=dc.type&uuid=a7fd0586-c098-4b2e-966b-c6b13fc8e96a&page=0&size=100&Accept-Language=de
First (naïve) approach on what has to be changed at the backend:
Add a new language attribute to form-value-pairs and controlled vocabularies. Allow two or more form-value-pairs or controlled vocabularies to have the same name attribute. If two or more form-value-pairs or controlled vocabulary have the same name attribute make sure they have different language attributes.