Ifd:addChildren

From dev.ifd-library.org

Jump to: navigation, search

API version 2

public IfdConceptInRelationship [] addChildren (
                                                          string concept_guid,
                                                          IfdConceptInRelationship[] children,
                                                          String rel_context_guid,
                                                          String session_id ) throws IfdServerException

EXPRESS Heading:

QUERY_FUNCTION addChildren (concept_guid : STRING; 
                            children : LIST OF IfdConceptInRelationship ; 
                            rel_context: IfdContext ) :  LIST OF IfdConceptInRelationship;

Function to add one or more children to a concept. The function takes an array of IfdConceptInRelationship, the concept itself as a global indentifier concept_guid , a global identifier for a relative context rel_context and a session_id as input.

Input:

  • String concept_guid - The guid of the concept to which we want to add children (must exist in the library)
  • IfdConceptInRelationship [] children - Array of one or more IfdConceptInRelationship. All the concepts in this list must already exist in the library
  • String rel_context The global unique identifier for the relative context.
  • String session_id - The session id for the active user

Returns:

API version 3

Function public IfdConceptInRelationship [] addChildren (
                                                          String session_id,
                                                          string concept_guid,
                                                          IfdConceptInRelationship[] children,
                                                          String rel_context_guid) throws IfdServerException

EXPRESS heading

QUERY_FUNCTION addChildren(
                      concept_guid : STRING;
                      children : LIST OF IfdConceptInRelationship;	
                      rel_context_guid : STRING) :  LIST OF IfdConceptInRelationship;

The function creates relationships between parent concept and list of child concepts in a specified context.

Input:

  • String session_id - The session id for the active user
  • String concept_guid - global unique id of a concept (not a context) to be parent for the relationships in the target IFD population;

IfdConceptInRelationship [] children - list of specifications for relationships, for every element of the aggregate shall be specified the following attributes:

  • base.guid – global unique id of the child concept, it shall be instantiated in target population before call to addChildren;
  • relationship_type – type of the relationship
  • context_guids – ignored in the input;
  • String rel_context - global unique id of the relationships context, the context shall exist before the call and user shall be an owner of the context

Returns: IfdConceptInRelationship [] - Full list of children (including assigned before the call) of the specified parent concept in the provided target context. Every element of the output has the following attributes:

  • base - fully specified (in all available languages) child concept, the same as in getConcept
  • relationship_type - type of the relationship, the same as in input
  • context_guids - list of context (owned or used) of the relationship

Difference against v.2.00

  • (1) Depending of target population structure and volume it responds 3-10 times quicker then in v.2.00;
  • (2) The function checks correspondence of parent and child types to relationship type. In v.2.00 the function could create e.g. relationship ‘COLLECTS’ from an actor to a measure or 'DOCUMENTS' from a value to a concept;
  • (3) 'ASSIGNS_COLLECTIONS' mapped to xtdRelAssignsCollections of ISO12006-3. In v.2.00 the IFD relationship type was mapped to xtdRelCollects (the same ISO12006-3 type for 'COLLECTS' and 'ASSIGNS_COLLECTIONS');
  • (4) For relationship type 'SEQUENCES' parent activity is precedence (previous) of child. In v.2.00 it was interpreted in opposite way;
  • (5) The function raises an exception in incorrect relationship_type. The function in v.2.00 just ignore incorrect relationship_type;
  • (6) Created relationship (instance of xtdRelationship of ISO12006-3) is assigned with dummy name (constant DEFAULT_CONCEPT_NAME = 'Anonymous') in default language (constant DEFAULT_LANGUAGE_NAME = 'English'), VersionDate is set to current data/time stamp, status is set to ‘DRAFT’, is_maintained_by is set (implicitly) to the organization of the logged user. In v.2.00 all these attributes are left unset producing invalid population of ISO12006-3;
*(7)	Output reflects actual children population. v.2.00 returns narrowed set of children: representation in contrast of creating checks types of input parameters and can not show created invalid relationships; 
  • (8) Elements of output aggregate have the same difference with v.2.00 as output of getChildrenConcepts


Back to the API

Comments: Talk:Ifd:addChildren