Ifd:searchForConcepts

From dev.ifd-library.org

Jump to: navigation, search

API version 2

public IfdConcept [] searchForConcepts(
                                    String search_criteria,
                                    Ifd:IfdLanguage [] languages,
                                    IfdConceptTypeEnum [] concept_types,
                                    String session_id )
                 throws IfdServerException

EXPRESS heading

QUERY_FUNCTION searchForConcepts( search_criteria : STRING; 
                        languages : LIST OF IfdLanguage; 
                        concept_types : LIST OF STRING) : LIST OF IfdConcept;

Standard function to search in the Ifd library.

Input:

  • search_criteria - The search string made by the user. See pattern matching options below.
  • languages[] - Optional: Array of IfdLanguage objects for the languages the search should be limited to. If not given, names in any language are returned.
  • concept_types[] - Optional: Array of IfdConceptTypeEnum for the type of object the search should be limited to. If not given concepts of all types are returned.
  • session_id - The session id for the active user

Returns:

  • IfdConcept [] - An array of Ifd concepts or one of it's subtypes.

API version 3

public IfdConcept [] searchForConcepts(
                                    String session_id 
                                    String search_criteria,
                                    Ifd:IfdLanguage [] languages,
                                    IfdConceptTypeEnum [] concept_types)
                 throws IfdServerException

EXPRESS heading

 QUERY_FUNCTION searchForConcepts( search_criteria : STRING; 
                        languages : LIST OF IfdLanguage; 
                        concept_types : LIST OF STRING) : LIST OF IfdConcept;

The function searches for concepts applying specified string pattern to concept names.

Input:

  • session_id - The session id for the active user
  • search_criteria - string pattern to apply to the concept names to filter them. The pattern can include the whole interesting name or its part (letters are case insensitive)
  • languages[] - (optional) list of required language specifications, every element of the aggregate shall be uniquely specified with one of the following attribute (in priority order):

language_code – two or three letter international language code (as they stored in the target IFD population, see getLanguages), guid – global unique id of the language in IFD population, name_in_english – name of the language as it stored in IFD population. The function will apply search_criteria to names within listed languages and then result will be represented in the same languages. If the parameter is unset (empty aggregate) search will be done for all languages as well as result representation.

  • concept_types[] - (optional) list of required concept types. The function will apply search_criteria to names of concept with type only listed within the parameter.

If the parameter is unset (empty aggregate) search will be done within all concept types.

Return:

  • IfdConcept[] - List of found concepts which names matched to search_criteria taking into account constraints of languages and concept_types. The concepts are represented in all languages listed in languages (or in all available in IFD population languages, if the languages is empty).

Possible pattern matching characters:

@   Matches any letter
^   Matches any upper case letter
?   Matches any character
&   Matches remainder of string
#   Matches any digit
$   Matches a substring terminated by a space character or end-of-string
*   Matches any number of characters
\   Begins a pattern escape sequence
!   Negation character (used with the other characters)

Difference against v.2.0

  • (138) The current version responds in 10-50 times quicker then in v.2.0


Back to the API