FUNCTION validate_ecdq_inspected_elements_type

(* SCHEMA step_merged_ap_schema; *)
-- IN AP242
FUNCTION validate_ecdq_inspected_elements_type
      (ei : externally_conditioned_data_quality_criterion;
       type_list : BAG OF STRING ) : LOGICAL;
   LOCAL
      sdqir : SET OF externally_conditioned_data_quality_inspection_result := [];
      dir : SET OF data_quality_inspection_instance_report := [];
      sdiri : SET OF externally_conditioned_data_quality_inspection_instance_report_item := [];
      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.' + 'EXTERNALLY_CONDITIONED_DATA_QUALITY_INSPECTION_RESULT' IN TYPEOF(q));
      IF SIZEOF(sdqir) = 0 THEN
         RETURN (TRUE);
      END_IF;
      REPEAT i := 1 TO SIZEOF(sdqir) BY 1;
         dir := dir + QUERY (q <* bag_to_set(USEDIN(sdqir[i], 'STEP_MERGED_AP_SCHEMA.' + 'DATA_QUALITY_INSPECTION_REPORT.' + 'INSPECTION_RESULT'))| ('STEP_MERGED_AP_SCHEMA.' + 'DATA_QUALITY_INSPECTION_INSTANCE_REPORT' IN TYPEOF(q)));
      END_REPEAT;
      IF SIZEOF(dir) = 0 THEN
         RETURN (TRUE);
      END_IF;
      REPEAT i := 1 TO SIZEOF(dir) BY 1;
         sdiri := sdiri + QUERY (q <* dir[i].inspected_instances| ('STEP_MERGED_AP_SCHEMA.' + 'EXTERNALLY_CONDITIONED_DATA_QUALITY_INSPECTION_INSTANCE_REPORT_ITEM' IN TYPEOF(q)));
      END_REPEAT;
      IF SIZEOF(sdiri) = 0 THEN
         RETURN (TRUE);
      END_IF;
      REPEAT i := 1 TO SIZEOF(sdiri) BY 1;
         IF SIZEOF(sdiri[i].inspected_elements) <> SIZEOF(type_list) THEN
            RETURN (FALSE);
         END_IF;
         t_type_list := type_list;
         REPEAT j := 1 TO SIZEOF(sdiri[i].inspected_elements) BY 1;
            REPEAT k := 1 TO SIZEOF(t_type_list) BY 1;
               IF t_type_list[k] IN TYPEOF(sdiri[i].inspected_elements[j]) THEN
                  t_type_list := t_type_list - t_type_list[k];
                  ESCAPE;
               END_IF;
            END_REPEAT;
         END_REPEAT;
         IF SIZEOF(t_type_list) > 0 THEN
            RETURN (FALSE);
         END_IF;
      END_REPEAT;
      RETURN (TRUE);
END_FUNCTION;

Referenced By

Defintion validate_ecdq_inspected_elements_type is references by the following definitions:
DefinitionType
 disallowed_assembly_relationship_usage ENTITY
 excessive_use_of_groups ENTITY
 excessive_use_of_layers ENTITY
 inappropriate_element_visibility ENTITY
 inappropriate_use_of_layer ENTITY
 inconsistent_element_reference ENTITY
 non_agreed_accuracy_parameter_usage ENTITY
 non_agreed_scale_usage ENTITY
 non_agreed_unit_usage ENTITY
 non_referenced_coordinate_system ENTITY
 unused_shape_element ENTITY
 wrong_element_name ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2017-01-19T11:17:24-05:00