Ifd:addCommentsToConcept

From dev.ifd-library.org

Jump to: navigation, search

API version 2

public IfdDescription [] addCommentsToConcept (
                                           String concept_guid,
                                           IfdDescription[] comments,
                                           String session_id )
                   throws IfdServerException

Function to add one or more comments to a concept. The function takes an array of IfdDescription as input in addition to the global unique identifier for the concept itself and the session_id.

Input:

  • String concept_guid - The global unique identifier for the concept to which we want to add names (names may not exist in the library)
  • IfdDescription comments [] - Array of one or more IfdDescriptions.
  • string session_id - The session id for the active user

Returns:

API version 3

public IfdDescription [] addCommentsToConcept (

                                           String session_id
                                           String concept_guid,
                                           IfdDescription[] comments)
                   throws IfdServerException

EXPRESS heading

QUERY_FUNCTION addCommentsToConcept(
                      concept_guid : STRING;
                      comments : LIST OF IfdDescription) : LIST OF IfdDescription;

Function to add one or more comments to a concept. The function takes an array of IfdDescription as input in addition to the global unique identifier for the concept itself and the session_id.

Input:

  • string session_id - The session id for the active user
  • String concept_guid - global unique id of a concept (or context, where user is owner) to be added with specified description (comment or definition);

IfdDescription comments [] - list of descriptions to be assigned to the concept, for every element of the aggregate shall be specified the following attributes:

  • guid – (optional) global unique id of the existing in database description. If the item defined yet in target population the attribute shall be set (as well as other attributes) and existing description will be assigned to the concept;
  • language – (optional) language of the description (shall be defined yet in target population), by default it is dedicated language with code equal to internal constant DEFAULT_LANGUAGE_CODE (‘en’ in current version);
  • description – text of the description;
  • description_type – (optional) type of the description, shall be one of the following: 'COMMENT' (default) or 'DEFINITION'; so it is possible to add either comments or definitions to the concept within the same function;
  • preferred_by – (optional) aggregate of organizations which will prefer the description, by default set with home organization of the logged user

Returns:

IfdDescription [] - List of fully specified comments (definitions) of the specified concept added with the function. Every element of the aggregate will have the following attributes:

  • guid - global unique id of the description (comment or definition);
  • language - language of the description;
  • description - text of the description;
  • description_type - type of the description, one of the following: 'COMMENT' or 'DEFINITION';
  • preferred_by - aggregate of organizations which prefers the description

Difference against v.2.00

  • (9) Depending of input parameters and target population structure and volume it responds 2-4 times quicker then in v.2.00;
  • (10) The function can accept language specification by default in contrast to v.2.00;
  • (11) The function identifies existing description by whole set of provided attributes. In v.2.00 the function identified description only by guid, in spite of specified text, language and type. So the function was able to assign description (definition or comment) that different by value from specified;
  • (12) The function can add comment (by default) as well as definitions (if this specified by description_type). In v.2.00 the function creates only comments in spite of value description_type but could add existing definition (found by guid);
  • (13) The function returns actual attributes of added descriptions. In v.2.00 the function returns the same structures as in input with only modified guids. So taking into account (11) and (12) the output could be different from actual;
  • (14) The function keeps the last date/time of concept change and cares about constraint xtdRoot. has_preferred_representations (mandatory SET[1:?]) specified by ISO12006-3. In v.2.00 the function did not care about the both;
  • (15) The function checks type of the concept and allows adding description to the context only to its owners. In v.2.00 the function did not check the case


Back to the API

Comments: Probably better to add a single comment only with one function call. Kees Woestenenk