Ifd:getNames

IfdName [] getNames(IfdLanguage[] languages[], IfdNameTypeEnum[] name_types[], string session_id)

''Function to list names that exist in the Ifd dictionary, constrained by the languages in the given array of languages and the name types in the given array name_type_list. The namesare returned as an array of IfdName ''

Input:


 * languages [] - array of strings, containing a language_code; if the array is empty, names in all languages will be returned
 * name_types [] - array of strings, containing the selected IfdNameTypeEnum; if the array is empty, all name types will be returned
 * session_id - the session id for the current user

Return:

IfdName [] - an array containg the requested names

Comments: This is most likely a server-killer as the amount of names retrieved would wary from 5000 to possibly 100.000. I see the need for the function in an application that want to do the name search locally. An alternative way is to use the search function trough the API in stead --Lars.Bjørkhaug 13:14, 31 August 2006 (CEST)

The search function can be used for this purpose. A search for "*" will most likely not be allowed because of the overload on the servers, but e.g "a*" would give all names starting on "a". (as well as synonyms for the particular name) A search can also filter on languages thus giving the functionality required in this function. Name types are also supported since the IfdConcept already separates names according to it's type. By using search in this way we can easily retrieve all names in the database by stepping through the alphabet.--Lars.Bjørkhaug 19:49, 5 September 2006 (CEST)

Comments: This function should have search criteria, just as the search function, and would then be an alternative for the searc function. With search criteria like "a*" the function would return a list of Names from the library starting with "a" or "A". Each Name retrieved really exists in the library and will probably have assignments to one or more Concepts. These Concepts might then be retrieved with a call to the search function as it is currently, or with a call to the - not yet available - getConceptsWithName function. Note, that the current search function does not retrieve Names, see my comments at that function. The 'server-killer' argument in Lars's comment does not apply when using search criteria, and would apply as well to the search function. My proposal is to implement this function with the extra search criteria string and with an array of language_codes in stead of languages as I proposed earlier: IfdName [] getNames (string search_criteria, string[] language_codes (optional), IfdNameTypeEnum[] name_types[] (optional), string session_id). --Kees.Woestenenk