|
FUNCTION acyclic_composite_text (start_composite : composite_text, child_text : SET [1:?] OF text_or_character) : LOGICAL; LOCAL i : INTEGER ; local_composite_text : SET [ 0 : ? ] OF composite_text ; local_annotation_text : SET [ 0 : ? ] OF annotation_text ; local_children : SET [ 0 : ? ] OF text_or_character ; END_LOCAL ; local_composite_text := QUERY ( child <* child_text | ( 'presentation_definition_schema.composite_text' IN TYPEOF ( child ) ) ) ; IF ( SIZEOF ( local_composite_text ) > 0 ) THEN REPEAT i := 1 TO HIINDEX ( local_composite_text ) ; IF ( start_composite :=: local_composite_text [ i ] ) THEN RETURN ( FALSE ) ; END_IF ; END_REPEAT ; END_IF ; local_children := child_text ; IF ( SIZEOF ( local_composite_text ) ) > 0 THEN REPEAT i := 1 TO HIINDEX ( local_composite_text ) ; local_children := local_children + local_composite_text [ i ] . collected_text ; END_REPEAT ; END_IF ; local_annotation_text := QUERY ( child <* child_text | ( 'presentation_definition_schema.annotation_text' IN TYPEOF ( child ) ) ) ; IF ( SIZEOF ( local_annotation_text ) > 0 ) THEN REPEAT i := 1 TO HIINDEX ( local_annotation_text ) ; local_children := local_children + QUERY ( item <* local_annotation_text [ i ] \ mapped_item . mapping_source . mapped_representation . items | SIZEOF ( [ 'presentation_definition_schema.annotation_text' , 'presentation_definition_schema.composite_text' ] * TYPEOF ( item ) ) > 0 ) ; END_REPEAT ; END_IF ; IF ( local_children :<>: child_text ) THEN RETURN ( acyclic_composite_text ( start_composite , local_children ) ) ; ELSE RETURN ( TRUE ) ; END_IF ; END_FUNCTION; -- acyclic_composite_text |
|
public class FAcyclic_composite_text public static Value run(SdaiContext _context, Value start_composite, Value child_text) |