Ifd:addConcepts
From dev.ifd-library.org
API version 2
public IfdConcept [] addConcepts ( IfdConcept [] new_concepts [], String session_id ) throws IfdServerException
Function to add a new concept to the IFD library. The function takes an array of IfdConcepts. as input and in addition a session identifier.
Input:
| |
Returns:
| |
| Please note:
The only information needed when creating a new concept is the new_concept.EntityTypeEnum attribute. All other information is ignored. The API will generate the GUID, version number and date. You cannot add names or descriptions on this stage. Use addNamesToConcept to add names. (And similar functions for descriptions and illustrations) The new concept is not a valid concept before you add at least one name in your own language and minimum one name or a description in International English. Concepts without names will be removed from the library after a given time. | |
| Improvments for next versions:
Limit the input of the function to only the needed information. In this case the type of object to create. |
API version 3
Function public IfdConcept [] addConcepts (' String session_id, IfdConcept [] concepts []) throws IfdServerException
EXPRESS heading
QUERY_FUNCTION addConcepts(
concepts : LIST OF IfdConcept): LIST OF IfdConcept;
The function adds aggregate of specified concepts to the target IFD population.
Input:
- session_id -|The session id for the active user
new_concepts[] - list of fully specified concepts to be created in target population, with the following attributes for every element:
- guid – (optional) desired global unique id of the concept. It shall be specified only if user application is care about unique id generation (it is raised corresponding exception if not unique id is specified). If the attribute is unset it will be generated by database;
- version_id – (optional) desired version specification for the concept. It shall be string with an integer value. If the attribute is unset value ‘1’ will be used;
- version_date – ignored in input;
- status – ignored in input;
- concept_type – type for the concept, it shall be one of the following:
'ACTOR' 'ACTIVITY' 'DOCUMENT' 'PROPERTY' 'SUBJECT' 'UNIT' 'MEASURE' 'VALUE' 'NEST' 'BAG'
- full_names – (optional) aggregate of fully specified names (by default – full names) to be assigned to the newly created concept;
- short_names – (optional) aggregate of fully specified names (by default – short names) to be assigned to the newly created concept;
- lexemes – (optional) aggregate of fully specified names (by default – lexemes) to be assigned to the newly created concept;
- definitions – (optional) aggregate of fully specified descriptions (by default – definitions) to be assigned to the newly created concept;
- comments – (optional) aggregate of fully specified descriptions (by default – comments) to be assigned to the newly created concept;
- illustrations – (optional) aggregate of fully specified illustrations to be assigned to the newly created concept;
- owner – (optional) specified by guid organization which shall maintain the concept. By default it is home organization of the logged user;
Returns:
List of fully specified IfdConcept []created in the call with the following attributes:
- guid - global unique id of the newly created concept;
- version_id - version (integer) of the concept;
- version_date - date/time of the concept creation in format ‘YYYY.MM.DD hh:mm:ss’
- status - after creating is set to ‘DRAFT’;
- concept_type - type of the newly created concept – the same as in input;
- full_names - aggregate of fully specified full names of the concept in all languages;
- short_names - aggregate of fully specified short names) names of the concept in all languages;
- lexemes - aggregate of fully specified lexemes of the concept in all languages;
- definitions - aggregate of fully specified definitions of the concept in all languages;
- comments - aggregate of fully specified descriptions of the concept in all languages;
- illustrations - aggregate of fully specified illustrations of the concept in all languages;
- owner - fully specified organization which maintains the concept
Difference with v.2.00
- (16) The last version is much more better in performance than v.2.00;
- (17) The function can not create context, user shall use specialized addContexts function. In v.2.00 the function can create invalid context instance (without set mandatory ContextOwners, IsRestricted, etc.);
- (18) The function in one call creates fully specified IFD concept and keep IFD population valid against ISO12006-3 constraints. In v.2.00 the function creates invalid (in terms of ISO12006-3) concept without required names and preferences;
- (19) The function allows user manage with guids and version id: just checking validity of the value if they are specified. The values are generated only if corresponding attributes are unset in input. The function in v.2.00 generated values of the attributes in any way;
- (20) By default the function set version of newly created concept in ‘1’. The function in v.2.00 generated values of version id for newly created concept in format ‘1 YYYY.MM.DD’
Comments:
See: Talk:Ifd:addConcepts
Back to the API