acyclic_document_relationship

EXPRESS specification:

FUNCTION acyclic_document_relationship
(* Modified for LPM/6 *)(relation : document_relationship; relatives : SET [1:?] OF document; specific_relation : STRING) : BOOLEAN; LOCAL x : SET OF document_relationship; END_LOCAL; IF relation.relating_document IN relatives THEN RETURN (FALSE); END_IF; x := QUERY (doc <* bag_to_set (USEDIN (relation.relating_document, 'STRUCTURAL_FRAME_SCHEMA.' + 'DOCUMENT_RELATIONSHIP.' + 'RELATED_DOCUMENT')) | specific_relation IN TYPEOF (doc)); REPEAT i := 1 TO HIINDEX(x); IF NOT acyclic_document_relationship (x[i], relatives + relation.relating_document, specific_relation) THEN RETURN(FALSE); END_IF; END_REPEAT; RETURN(TRUE);
END_FUNCTION;