Ifd:getParentConcepts

API version 2
IfdConceptInRelationship[] getParentConcepts(                             String concept_guid,                              String[] context_guids,                              IfdRelationshipTypeEnum [] relationship_types,                              IfdLanguage[] languages,                              String session_id) throws Ifd:IfdServerException

Express heading QUERY_FUNCTION getParentConcepts (                            concept_guid : STRING;                             context_guids : LIST OF STRING;                              relationship_types : LIST OF STRING;                             languages : LIST OF IfdLanguage) : LIST OF IfdConceptInRelationship;

''Function to list the parents (relating concepts) of the given concept, constrained by the given array of contexts, the given array of relationship_types and the given array of languages. The parents are returned as an array of IfdConceptInRelationship ''

Input:
 * - the concept_guid for which we want the parents
 * - array of context_guids in which you want to constrain the results
 * - array of relationships from enumeration of the selected IfdRelationshipTypeEnum
 * - array of languages in which you want to constrain the results
 * - the session id for the current user

Return:
 * - an array containing the requested parents

Comments: -The Concept parameter should be the guid of the Concept, not the Concept itself. (resolved) -The Context parameter is not clear, what is it used for, what content might it have? I suggest to leave it out. (declined) -The language parameter is not needed, I suggest to leave it out. (declined) -An additional parameter is needed for filtering between Definition and Specification. For this I suggest to use IfdPropertyTypeEnum. (not relevant here) -The function should only return a list of guids. (declined) -The function should not throw an exception when returning nothing. (resolved) Kees Woestenenk

API version 3
Function public IfdConceptInRelationship[] getParentConcepts(                      String session_id,                       String concept_guid,                       String[] context_guids,                       IfdRelationshipTypeEnum [] relationship_type,                       IfdLanguage[] languages) throws Ifd:IfdServerException

EXPRESS heading QUERY_FUNCTION getParentConcepts(concept_guid : STRING;                       context_guids, relationship_type : LIST OF STRING;                        languages	: LIST OF IfdLanguage): LIST OF IfdConceptInRelationship;

The function collects all parent concepts related to the specified IFD concept.

Input:
 * string session_id - the session id for the current user
 * string concept_guid - global unique id of a child IFD concept;
 * string[] context_guids - (optional) list of global unique id-s of the required relationship contexts – the function returns only parents related to the child in specified contexts; the aggregate can be unset or empty if user is looking for relationships in any available for him contexts;
 * IfdRelationshipTypeEnum relationship_types[] -(optional) list of required relationship types. The list can be unset or empty to get all kind parents of specified concept;
 * IfdLanguage languages[] - (optional) list of languages to represent child concepts, in all languages by default

Return:

IfdConceptInRelationship[] - Full list of parents of the child concept. Every element of the output has the following attributes:
 * base - fully specified (in all specified languages) parent concept with the same attributes as in getConcept
 * relationship_type - type of the relationship (one of relationship_types if specified)
 * context_guids - list of contexts’ guid-s of the relationship

Difference against v.2.00
 * (98) Depending of target population structure and volume it responds 2-3 times quicker then in v.2.00;
 * (99) In v.2.00 the function did not check if any children were defined in restricted for the user context and returned everything;
 * (100) In v.2.00 the function ignored input context_guids and return relationships for all defined in IFD contexts;
 * (101) In v.2.00 the function had a bug working with 'ASSIGNS_COLLECTIONS';
 * (102) The function returns children in scope of 'ASSIGNS_PROPERTY_WITH_VALUES' relationship. In v.2.00 the function ignored the relationship type. To make the current version blend against the type of relationship set its internal constant SHOW_CONSTRAINED_VALUES := FALSE;
 * (103) The function maps children activities to the ISO 12006-3 xtd_activity.next_activities.RelatingActivity. The function in v.2.00 maps them in mistake to opposite arm of the relationship: xtd_activity.next_activities.RelatedActivities.