This PR introduces the query parameter preferredDescriptionType to the browser endpoint's getConceptChildren and searchDescriptions methods, and converts them to use internal requests.
The default (and backwards compatible) behaviour is to retrieve the FSN for all results, making them available on property fsn; setting this parameter to SYNONYM will collect preferred synonyms instead and sets the term on property preferredSynonym. Only one of these properties will be set, depending on the current value of preferredDescriptionType.
For performance reasons, the isLeaf*** values on concepts returned from getConceptChildren will only be valid for the tree determined by the form query parameter, the other value will always be set to false; eg. if the inferred tree is queried, only the isLeafInferred value will be set accordingly.
The Accept-Language header controls the order of preference in which language reference sets will be checked for a preferred description. Non-international dialects should be specified with the -x- extension notation, eg. an Accept-Language header with the value of da-DK-x-554461000005103;q=0.8,en-US;q=0.5 will check the presence of a description preferred in the Danish language reference set, and if no such FSN or SYN is present, falls back to the US English preferred one.
This PR introduces the query parameter
preferredDescriptionType
to the browser endpoint'sgetConceptChildren
andsearchDescriptions
methods, and converts them to use internal requests.The default (and backwards compatible) behaviour is to retrieve the
FSN
for all results, making them available on propertyfsn
; setting this parameter toSYNONYM
will collect preferred synonyms instead and sets the term on propertypreferredSynonym
. Only one of these properties will be set, depending on the current value ofpreferredDescriptionType
.For performance reasons, the
isLeaf***
values on concepts returned fromgetConceptChildren
will only be valid for the tree determined by theform
query parameter, the other value will always be set tofalse
; eg. if the inferred tree is queried, only theisLeafInferred
value will be set accordingly.The
Accept-Language
header controls the order of preference in which language reference sets will be checked for a preferred description. Non-international dialects should be specified with the-x-
extension notation, eg. anAccept-Language
header with the value ofda-DK-x-554461000005103;q=0.8,en-US;q=0.5
will check the presence of a description preferred in the Danish language reference set, and if no such FSN or SYN is present, falls back to the US English preferred one.