FUNCTION acyclic_event_occurrence_relationship
(relation : event_occurrence_relationship, relatives : SET [1:?] OF event_occurrence, specific_relation : STRING) : BOOLEAN;
LOCAL x : SET OF event_occurrence_relationship; END_LOCAL;
IF relation.relating_event IN relatives THEN RETURN (FALSE); END_IF; x := QUERY(evnt <* bag_to_set(USEDIN(relation.relating_event, 'DATE_TIME_SCHEMA.' + 'EVENT_OCCURRENCE_RELATIONSHIP.' + 'RELATED_EVENT')) | specific_relation IN TYPEOF(evnt)); REPEAT i := 1 TO HIINDEX(x); IF NOT acyclic_event_occurrence_relationship(x[i], relatives + relation.relating_event, specific_relation) THEN RETURN (FALSE); END_IF; END_REPEAT; RETURN (TRUE); END_FUNCTION; -- acyclic_event_occurrence_relationship
|