(* SCHEMA step_merged_ap_schema; *)
-- IN AP242 FUNCTION validate_locations_of_extreme_value_type (ei : shape_data_quality_criterion; type_list : BAG OF STRING ) : LOGICAL; LOCAL sdqir : SET OF shape_data_quality_inspection_result := []; sdir : SET OF shape_data_quality_inspection_instance_report := []; sdei : SET OF instance_report_item_with_extreme_instances := []; t_type_list : BAG OF STRING := []; END_LOCAL; sdqir := QUERY (q <* bag_to_set(USEDIN(ei, 'STEP_MERGED_AP_SCHEMA.DATA_QUALITY_INSPECTION_RESULT.CRITERION_INSPECTED'))| 'STEP_MERGED_AP_SCHEMA.SHAPE_DATA_QUALITY_INSPECTION_RESULT' IN TYPEOF(q)); IF SIZEOF(sdqir) = 0 THEN RETURN (TRUE); END_IF; REPEAT i := 1 TO SIZEOF(sdqir); sdir := sdir + QUERY (q <* bag_to_set(USEDIN(sdqir[i], 'STEP_MERGED_AP_SCHEMA.DATA_QUALITY_INSPECTION_REPORT.INSPECTION_RESULT'))| ('STEP_MERGED_AP_SCHEMA.SHAPE_DATA_QUALITY_INSPECTION_INSTANCE_REPORT' IN TYPEOF(q))); END_REPEAT; REPEAT i := 1 TO SIZEOF(sdir); sdei := sdei + QUERY (q <* sdir[i].inspected_instances| ('STEP_MERGED_AP_SCHEMA.INSTANCE_REPORT_ITEM_WITH_EXTREME_INSTANCES' IN TYPEOF(q))); END_REPEAT; IF SIZEOF(sdei) = 0 THEN RETURN (TRUE); END_IF; IF (SIZEOF(type_list) = 0) AND (SIZEOF(sdei) <> 0) THEN RETURN (FALSE); END_IF; REPEAT i := 1 TO SIZEOF(sdei); REPEAT j := 1 TO SIZEOF(sdei[i].extreme_instances); IF SIZEOF(sdei[i].extreme_instances[j].locations_of_extreme_value) <> SIZEOF(type_list) THEN RETURN (FALSE); END_IF; t_type_list := type_list; REPEAT k := 1 TO SIZEOF(sdei[i].extreme_instances[j].locations_of_extreme_value); REPEAT l := 1 TO SIZEOF(t_type_list); IF t_type_list[l] IN TYPEOF(sdei[i].extreme_instances[j].locations_of_extreme_value[k]) THEN t_type_list := t_type_list - t_type_list[l]; ESCAPE; END_IF; END_REPEAT; END_REPEAT; IF SIZEOF(t_type_list) > 0 THEN RETURN (FALSE); END_IF; END_REPEAT; END_REPEAT; RETURN (TRUE); END_FUNCTION;
Generated by STEP Tools® EXPRESS to HTML Converter
2024-09-06T14:00:33-04:00